Bagikan melalui


X509Certificate2Collection.Import Metode

Definisi

Mengimpor sertifikat ke dalam objek X509Certificate2Collection.

Overload

Import(String, String, X509KeyStorageFlags)
Kedaluwarsa.

Mengimpor file sertifikat yang memerlukan kata sandi ke dalam objek X509Certificate2Collection.

Import(String, ReadOnlySpan<Char>, X509KeyStorageFlags)
Kedaluwarsa.

Mengimpor sertifikat dari file yang ditentukan ke dalam koleksi ini.

Import(ReadOnlySpan<Byte>, String, X509KeyStorageFlags)
Kedaluwarsa.

Mengimpor sertifikat dari data yang disediakan ke dalam koleksi ini.

Import(ReadOnlySpan<Byte>, ReadOnlySpan<Char>, X509KeyStorageFlags)
Kedaluwarsa.

Mengimpor sertifikat dari data yang disediakan ke dalam koleksi ini.

Import(ReadOnlySpan<Byte>)
Kedaluwarsa.

Mengimpor sertifikat dari data yang disediakan ke dalam koleksi ini.

Import(String)
Kedaluwarsa.

Mengimpor file sertifikat ke dalam objek X509Certificate2Collection.

Import(Byte[])
Kedaluwarsa.

Mengimpor sertifikat dalam bentuk array byte ke dalam objek X509Certificate2Collection.

Import(Byte[], String, X509KeyStorageFlags)
Kedaluwarsa.

Mengimpor sertifikat, dalam bentuk array byte yang memerlukan kata sandi untuk mengakses sertifikat, ke dalam objek X509Certificate2Collection.

Import(String, String, X509KeyStorageFlags)

Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs

Perhatian

Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.

Mengimpor file sertifikat yang memerlukan kata sandi ke dalam objek X509Certificate2Collection.

public:
 void Import(System::String ^ fileName, System::String ^ password, System::Security::Cryptography::X509Certificates::X509KeyStorageFlags keyStorageFlags);
public void Import (string fileName, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet);
[System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public void Import (string fileName, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet);
public void Import (string fileName, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
member this.Import : string * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.Import : string * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
Public Sub Import (fileName As String, password As String, Optional keyStorageFlags As X509KeyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet)
Public Sub Import (fileName As String, password As String, keyStorageFlags As X509KeyStorageFlags)

Parameter

fileName
String

Nama file yang berisi informasi sertifikat.

password
String

Kata sandi yang diperlukan untuk mengakses informasi sertifikat.

keyStorageFlags
X509KeyStorageFlags

Kombinasi bitwise dari nilai enumerasi yang mengontrol bagaimana dan di mana sertifikat diimpor.

Atribut

Keterangan

Metode ini dapat digunakan dengan file PFX/PKCS12 atau file sertifikat lain yang memerlukan kata sandi. Kontainer kunci yang terkait dengan sertifikat dalam file PFX/PKCS12 dapat dibuat dan nilai X509KeyStorageFlags dapat digunakan untuk mengontrol proses ini. Perhatikan bahwa jika Anda tidak membuat kontainer kunci, kunci privat tidak akan bertahan.

Perhatikan bahwa file PFX/PKCS12 dapat berisi lebih dari satu sertifikat. Metode ini mengimpor sertifikat pertama yang terkait dengan kunci privat atau, jika tidak ada kunci privat yang ditemukan, sertifikat pertama ditemukan.

Metode ini mendukung jenis X509ContentType berikut:

Berlaku untuk

Import(String, ReadOnlySpan<Char>, X509KeyStorageFlags)

Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs

Perhatian

Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.

Mengimpor sertifikat dari file yang ditentukan ke dalam koleksi ini.

public void Import (string fileName, ReadOnlySpan<char> password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet);
[System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public void Import (string fileName, ReadOnlySpan<char> password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet);
member this.Import : string * ReadOnlySpan<char> * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.Import : string * ReadOnlySpan<char> * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
Public Sub Import (fileName As String, password As ReadOnlySpan(Of Char), Optional keyStorageFlags As X509KeyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet)

Parameter

fileName
String

Nama file yang berisi informasi sertifikat.

password
ReadOnlySpan<Char>

Kata sandi yang diperlukan untuk mengakses data sertifikat.

keyStorageFlags
X509KeyStorageFlags

Kombinasi bitwise dari nilai enumerasi yang mengontrol di mana dan cara mengimpor sertifikat.

Atribut

Berlaku untuk

Import(ReadOnlySpan<Byte>, String, X509KeyStorageFlags)

Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs

Perhatian

Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.

Mengimpor sertifikat dari data yang disediakan ke dalam koleksi ini.

public void Import (ReadOnlySpan<byte> rawData, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet);
[System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public void Import (ReadOnlySpan<byte> rawData, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet);
member this.Import : ReadOnlySpan<byte> * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.Import : ReadOnlySpan<byte> * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
Public Sub Import (rawData As ReadOnlySpan(Of Byte), password As String, Optional keyStorageFlags As X509KeyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet)

Parameter

rawData
ReadOnlySpan<Byte>

Data sertifikat yang akan dibaca.

password
String

Kata sandi yang diperlukan untuk mengakses data sertifikat.

keyStorageFlags
X509KeyStorageFlags

Kombinasi bitwise dari nilai enumerasi yang mengontrol di mana dan cara mengimpor sertifikat.

Atribut

Berlaku untuk

Import(ReadOnlySpan<Byte>, ReadOnlySpan<Char>, X509KeyStorageFlags)

Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs

Perhatian

Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.

Mengimpor sertifikat dari data yang disediakan ke dalam koleksi ini.

public void Import (ReadOnlySpan<byte> rawData, ReadOnlySpan<char> password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet);
[System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public void Import (ReadOnlySpan<byte> rawData, ReadOnlySpan<char> password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet);
member this.Import : ReadOnlySpan<byte> * ReadOnlySpan<char> * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.Import : ReadOnlySpan<byte> * ReadOnlySpan<char> * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
Public Sub Import (rawData As ReadOnlySpan(Of Byte), password As ReadOnlySpan(Of Char), Optional keyStorageFlags As X509KeyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet)

Parameter

rawData
ReadOnlySpan<Byte>

Data sertifikat yang akan dibaca.

password
ReadOnlySpan<Char>

Kata sandi yang diperlukan untuk mengakses data sertifikat.

keyStorageFlags
X509KeyStorageFlags

Kombinasi bitwise dari nilai enumerasi yang mengontrol di mana dan cara mengimpor sertifikat.

Atribut

Berlaku untuk

Import(ReadOnlySpan<Byte>)

Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs

Perhatian

Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.

Mengimpor sertifikat dari data yang disediakan ke dalam koleksi ini.

public:
 void Import(ReadOnlySpan<System::Byte> rawData);
public void Import (ReadOnlySpan<byte> rawData);
[System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public void Import (ReadOnlySpan<byte> rawData);
member this.Import : ReadOnlySpan<byte> -> unit
[<System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.Import : ReadOnlySpan<byte> -> unit
Public Sub Import (rawData As ReadOnlySpan(Of Byte))

Parameter

rawData
ReadOnlySpan<Byte>

Data sertifikat yang akan dibaca.

Atribut

Berlaku untuk

Import(String)

Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs

Perhatian

Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.

Mengimpor file sertifikat ke dalam objek X509Certificate2Collection.

public:
 void Import(System::String ^ fileName);
public void Import (string fileName);
[System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public void Import (string fileName);
member this.Import : string -> unit
[<System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.Import : string -> unit
Public Sub Import (fileName As String)

Parameter

fileName
String

Nama file yang berisi informasi sertifikat.

Atribut

Keterangan

Metode ini mendukung jenis X509ContentType berikut:

Berlaku untuk

Import(Byte[])

Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs

Perhatian

Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.

Mengimpor sertifikat dalam bentuk array byte ke dalam objek X509Certificate2Collection.

public:
 void Import(cli::array <System::Byte> ^ rawData);
public void Import (byte[] rawData);
[System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public void Import (byte[] rawData);
member this.Import : byte[] -> unit
[<System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.Import : byte[] -> unit
Public Sub Import (rawData As Byte())

Parameter

rawData
Byte[]

Array byte yang berisi data dari sertifikat X.509.

Atribut

Keterangan

Metode ini mengimpor sertifikat dalam bentuk array byte ke dalam objek X509Certificate2Collection. Metode ini mendukung jenis X509ContentType berikut:

Berlaku untuk

Import(Byte[], String, X509KeyStorageFlags)

Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs
Sumber:
X509Certificate2Collection.cs

Perhatian

Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.

Mengimpor sertifikat, dalam bentuk array byte yang memerlukan kata sandi untuk mengakses sertifikat, ke dalam objek X509Certificate2Collection.

public:
 void Import(cli::array <System::Byte> ^ rawData, System::String ^ password, System::Security::Cryptography::X509Certificates::X509KeyStorageFlags keyStorageFlags);
public void Import (byte[] rawData, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet);
[System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public void Import (byte[] rawData, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet);
public void Import (byte[] rawData, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
member this.Import : byte[] * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Obsolete("Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.", DiagnosticId="SYSLIB0057", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.Import : byte[] * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
Public Sub Import (rawData As Byte(), password As String, Optional keyStorageFlags As X509KeyStorageFlags = System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.DefaultKeySet)
Public Sub Import (rawData As Byte(), password As String, keyStorageFlags As X509KeyStorageFlags)

Parameter

rawData
Byte[]

Array byte yang berisi data dari objek X509Certificate2.

password
String

Kata sandi yang diperlukan untuk mengakses informasi sertifikat.

keyStorageFlags
X509KeyStorageFlags

Kombinasi bitwise dari nilai enumerasi yang mengontrol bagaimana dan di mana sertifikat diimpor.

Atribut

Keterangan

Metode ini dapat digunakan dengan objek besar biner (BLOB) PFX/PKCS12 yang dilindungi oleh kata sandi. Kontainer kunci yang terkait dengan sertifikat dalam BLOB PFX/PKCS12 dapat dibuat dan nilai X509KeyStorageFlags dapat digunakan untuk mengontrol proses ini. Perhatikan bahwa jika Anda tidak membuat kontainer kunci, kunci privat tidak akan bertahan.

Metode ini mengimpor array byte sertifikat ke dalam kumpulan sertifikat. Metode ini mendukung jenis X509ContentType berikut:

Berlaku untuk