X509Certificate.Import Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mengisi X509Certificate objek.
Overload
Import(String, String, X509KeyStorageFlags) |
Kedaluwarsa.
Kedaluwarsa.
Mengisi X509Certificate objek dengan informasi dari file sertifikat, kata sandi, dan X509KeyStorageFlags nilai. |
Import(String, SecureString, X509KeyStorageFlags) |
Kedaluwarsa.
Kedaluwarsa.
Mengisi X509Certificate objek dengan informasi dari file sertifikat, kata sandi, dan bendera penyimpanan kunci. |
Import(Byte[], String, X509KeyStorageFlags) |
Kedaluwarsa.
Kedaluwarsa.
Mengisi X509Certificate objek menggunakan data dari array byte, kata sandi, dan bendera untuk menentukan bagaimana kunci privat diimpor. |
Import(Byte[]) |
Kedaluwarsa.
Kedaluwarsa.
Mengisi X509Certificate objek dengan data dari array byte. |
Import(String) |
Kedaluwarsa.
Kedaluwarsa.
Mengisi X509Certificate objek dengan informasi dari file sertifikat. |
Import(Byte[], SecureString, X509KeyStorageFlags) |
Kedaluwarsa.
Kedaluwarsa.
Mengisi X509Certificate objek menggunakan data dari array byte, kata sandi, dan bendera penyimpanan kunci. |
Import(String, String, X509KeyStorageFlags)
- Sumber:
- X509Certificate.cs
- Sumber:
- X509Certificate.cs
- Sumber:
- X509Certificate.cs
Perhatian
X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.
Perhatian
X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.
Mengisi X509Certificate objek dengan informasi dari file sertifikat, kata sandi, dan X509KeyStorageFlags nilai.
public:
virtual void Import(System::String ^ fileName, System::String ^ password, System::Security::Cryptography::X509Certificates::X509KeyStorageFlags keyStorageFlags);
public virtual void Import (string fileName, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual void Import (string fileName, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual void Import (string fileName, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
public virtual void Import (string fileName, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.Runtime.InteropServices.ComVisible(false)]
public virtual void Import (string fileName, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.Runtime.InteropServices.ComVisible(false)]
[System.Security.SecurityCritical]
public virtual void Import (string fileName, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
abstract member Import : string * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : string * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member Import : string * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : string * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member Import : string * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : string * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Runtime.InteropServices.ComVisible(false)>]
abstract member Import : string * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : string * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Runtime.InteropServices.ComVisible(false)>]
[<System.Security.SecurityCritical>]
abstract member Import : string * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : string * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
Public Overridable Sub Import (fileName As String, password As String, keyStorageFlags As X509KeyStorageFlags)
Parameter
- fileName
- String
Nama file sertifikat yang direpresentasikan sebagai string.
- password
- String
Kata sandi yang diperlukan untuk mengakses data sertifikat X.509.
- keyStorageFlags
- X509KeyStorageFlags
Kombinasi bitwise dari nilai enumerasi yang mengontrol di mana dan bagaimana mengimpor sertifikat.
- Atribut
Pengecualian
Parameternya fileName
adalah null
.
Hanya .NET Core dan .NET 5+: Dalam semua kasus.
Keterangan
Penting
Jangan pernah mengodekan kata sandi secara permanen dalam kode sumber Anda. Kata sandi yang dikodekan secara permanen dapat diambil dari perakitan menggunakan Ildasm.exe (IL Disassembler), editor hex, atau hanya dengan membuka perakitan di editor teks seperti Notepad.exe.
Berlaku untuk
Import(String, SecureString, X509KeyStorageFlags)
- Sumber:
- X509Certificate.cs
- Sumber:
- X509Certificate.cs
- Sumber:
- X509Certificate.cs
Perhatian
X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.
Perhatian
X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.
Penting
API ini bukan kompatibel CLS.
Mengisi X509Certificate objek dengan informasi dari file sertifikat, kata sandi, dan bendera penyimpanan kunci.
public:
virtual void Import(System::String ^ fileName, System::Security::SecureString ^ password, System::Security::Cryptography::X509Certificates::X509KeyStorageFlags keyStorageFlags);
[System.CLSCompliant(false)]
public virtual void Import (string fileName, System.Security.SecureString? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.CLSCompliant(false)]
[System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual void Import (string fileName, System.Security.SecureString? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.CLSCompliant(false)]
[System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual void Import (string fileName, System.Security.SecureString? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.CLSCompliant(false)]
public virtual void Import (string fileName, System.Security.SecureString password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
public virtual void Import (string fileName, System.Security.SecureString password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.Security.SecurityCritical]
public virtual void Import (string fileName, System.Security.SecureString password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[<System.CLSCompliant(false)>]
abstract member Import : string * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : string * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.CLSCompliant(false)>]
[<System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member Import : string * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : string * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.CLSCompliant(false)>]
[<System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member Import : string * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : string * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
abstract member Import : string * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : string * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Security.SecurityCritical>]
abstract member Import : string * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : string * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
Public Overridable Sub Import (fileName As String, password As SecureString, keyStorageFlags As X509KeyStorageFlags)
Parameter
- fileName
- String
Nama file sertifikat.
- password
- SecureString
Kata sandi yang diperlukan untuk mengakses data sertifikat X.509.
- keyStorageFlags
- X509KeyStorageFlags
Kombinasi bitwise dari nilai enumerasi yang mengontrol di mana dan bagaimana mengimpor sertifikat.
- Atribut
Pengecualian
Parameternya fileName
adalah null
.
Hanya .NET Core dan .NET 5+: Dalam semua kasus.
Keterangan
Penting
Jangan pernah mengodekan kata sandi secara permanen dalam kode sumber Anda. Kata sandi yang dikodekan secara permanen dapat diambil dari perakitan menggunakan Ildasm.exe (IL Disassembler), editor hex, atau hanya dengan membuka perakitan di editor teks seperti Notepad.exe.
Berlaku untuk
Import(Byte[], String, X509KeyStorageFlags)
- Sumber:
- X509Certificate.cs
- Sumber:
- X509Certificate.cs
- Sumber:
- X509Certificate.cs
Perhatian
X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.
Perhatian
X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.
Mengisi X509Certificate objek menggunakan data dari array byte, kata sandi, dan bendera untuk menentukan bagaimana kunci privat diimpor.
public:
virtual void Import(cli::array <System::Byte> ^ rawData, System::String ^ password, System::Security::Cryptography::X509Certificates::X509KeyStorageFlags keyStorageFlags);
public virtual void Import (byte[] rawData, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual void Import (byte[] rawData, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual void Import (byte[] rawData, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
public virtual void Import (byte[] rawData, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.Runtime.InteropServices.ComVisible(false)]
public virtual void Import (byte[] rawData, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.Runtime.InteropServices.ComVisible(false)]
[System.Security.SecurityCritical]
public virtual void Import (byte[] rawData, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
abstract member Import : byte[] * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : byte[] * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member Import : byte[] * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : byte[] * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member Import : byte[] * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : byte[] * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Runtime.InteropServices.ComVisible(false)>]
abstract member Import : byte[] * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : byte[] * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Runtime.InteropServices.ComVisible(false)>]
[<System.Security.SecurityCritical>]
abstract member Import : byte[] * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : byte[] * string * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
Public Overridable Sub Import (rawData As Byte(), password As String, keyStorageFlags As X509KeyStorageFlags)
Parameter
- rawData
- Byte[]
Array byte yang berisi data dari sertifikat X.509.
- password
- String
Kata sandi yang diperlukan untuk mengakses data sertifikat X.509.
- keyStorageFlags
- X509KeyStorageFlags
Kombinasi bitwise dari nilai enumerasi yang mengontrol di mana dan bagaimana mengimpor sertifikat.
- Atribut
Pengecualian
Hanya .NET Core dan .NET 5+: Dalam semua kasus.
Keterangan
Metode ini dapat digunakan untuk mengisi X509Certificate objek menggunakan kata sandi untuk sertifikat yang diwakili oleh array byte. Nilai X509KeyStorageFlags dapat digunakan untuk mengontrol di mana dan bagaimana kunci privat diimpor.
Berlaku untuk
Import(Byte[])
- Sumber:
- X509Certificate.cs
- Sumber:
- X509Certificate.cs
- Sumber:
- X509Certificate.cs
Perhatian
X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.
Perhatian
X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.
Mengisi X509Certificate objek dengan data dari array byte.
public:
virtual void Import(cli::array <System::Byte> ^ rawData);
public virtual void Import (byte[] rawData);
[System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual void Import (byte[] rawData);
[System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual void Import (byte[] rawData);
[System.Runtime.InteropServices.ComVisible(false)]
public virtual void Import (byte[] rawData);
[System.Runtime.InteropServices.ComVisible(false)]
[System.Security.SecurityCritical]
public virtual void Import (byte[] rawData);
abstract member Import : byte[] -> unit
override this.Import : byte[] -> unit
[<System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member Import : byte[] -> unit
override this.Import : byte[] -> unit
[<System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member Import : byte[] -> unit
override this.Import : byte[] -> unit
[<System.Runtime.InteropServices.ComVisible(false)>]
abstract member Import : byte[] -> unit
override this.Import : byte[] -> unit
[<System.Runtime.InteropServices.ComVisible(false)>]
[<System.Security.SecurityCritical>]
abstract member Import : byte[] -> unit
override this.Import : byte[] -> unit
Public Overridable Sub Import (rawData As Byte())
Parameter
- rawData
- Byte[]
Array byte yang berisi data dari sertifikat X.509.
- Atribut
Pengecualian
Hanya .NET Core dan .NET 5+: Dalam semua kasus.
Keterangan
Metode ini dapat digunakan untuk mengambil array byte mentah dari sertifikat X.509 dan mengisi X509Certificate objek dengan nilai terkait.
Berlaku untuk
Import(String)
- Sumber:
- X509Certificate.cs
- Sumber:
- X509Certificate.cs
- Sumber:
- X509Certificate.cs
Perhatian
X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.
Perhatian
X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.
Mengisi X509Certificate objek dengan informasi dari file sertifikat.
public:
virtual void Import(System::String ^ fileName);
public virtual void Import (string fileName);
[System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual void Import (string fileName);
[System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual void Import (string fileName);
[System.Runtime.InteropServices.ComVisible(false)]
public virtual void Import (string fileName);
[System.Runtime.InteropServices.ComVisible(false)]
[System.Security.SecurityCritical]
public virtual void Import (string fileName);
abstract member Import : string -> unit
override this.Import : string -> unit
[<System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member Import : string -> unit
override this.Import : string -> unit
[<System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member Import : string -> unit
override this.Import : string -> unit
[<System.Runtime.InteropServices.ComVisible(false)>]
abstract member Import : string -> unit
override this.Import : string -> unit
[<System.Runtime.InteropServices.ComVisible(false)>]
[<System.Security.SecurityCritical>]
abstract member Import : string -> unit
override this.Import : string -> unit
Public Overridable Sub Import (fileName As String)
Parameter
- fileName
- String
Nama file sertifikat yang direpresentasikan sebagai string.
- Atribut
Pengecualian
Parameternya fileName
adalah null
.
Hanya .NET Core dan .NET 5+: Dalam semua kasus.
Contoh
Contoh berikut memuat sertifikat X.509 dari file, memanggil ToString metode , dan menampilkan hasilnya ke konsol.
using namespace System;
using namespace System::Security::Cryptography::X509Certificates;
int main()
{
// The path to the certificate.
String^ Certificate = L"Certificate.cer";
// Load the certificate into an X509Certificate object.
X509Certificate^ cert = gcnew X509Certificate;
cert->Import(Certificate);
// Get the value.
String^ resultsTrue = cert->ToString( true );
// Display the value to the console.
Console::WriteLine( resultsTrue );
// Get the value.
String^ resultsFalse = cert->ToString( false );
// Display the value to the console.
Console::WriteLine( resultsFalse );
}
using System;
using System.Security.Cryptography.X509Certificates;
class X509
{
static void Main()
{
// The path to the certificate.
string Certificate = "Certificate.cer";
// Load the certificate into an X509Certificate object.
X509Certificate cert = new X509Certificate();
cert.Import(Certificate);
// Get the value.
string resultsTrue = cert.ToString(true);
// Display the value to the console.
Console.WriteLine(resultsTrue);
// Get the value.
string resultsFalse = cert.ToString(false);
// Display the value to the console.
Console.WriteLine(resultsFalse);
}
}
Imports System.Security.Cryptography.X509Certificates
Module X509
Sub Main()
' The path to the certificate.
Dim Certificate As String = "Certificate.cer"
' Load the certificate into an X509Certificate object.
Dim cert As New X509Certificate
cert.Import(Certificate)
' Get the value.
Dim resultsTrue As String = cert.ToString(True)
' Display the value to the console.
Console.WriteLine(resultsTrue)
' Get the value.
Dim resultsFalse As String = cert.ToString(False)
' Display the value to the console.
Console.WriteLine(resultsFalse)
End Sub
End Module
Keterangan
Metode ini menggunakan file sertifikat (seperti file dengan ekstensi .cer) yang mewakili sertifikat X.509, dan mengisi objek dengan sertifikat yang dikandung X509Certificate file.
Berlaku untuk
Import(Byte[], SecureString, X509KeyStorageFlags)
- Sumber:
- X509Certificate.cs
- Sumber:
- X509Certificate.cs
- Sumber:
- X509Certificate.cs
Perhatian
X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.
Perhatian
X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.
Penting
API ini bukan kompatibel CLS.
Mengisi X509Certificate objek menggunakan data dari array byte, kata sandi, dan bendera penyimpanan kunci.
public:
virtual void Import(cli::array <System::Byte> ^ rawData, System::Security::SecureString ^ password, System::Security::Cryptography::X509Certificates::X509KeyStorageFlags keyStorageFlags);
[System.CLSCompliant(false)]
public virtual void Import (byte[] rawData, System.Security.SecureString? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.CLSCompliant(false)]
[System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual void Import (byte[] rawData, System.Security.SecureString? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.CLSCompliant(false)]
[System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual void Import (byte[] rawData, System.Security.SecureString? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.CLSCompliant(false)]
public virtual void Import (byte[] rawData, System.Security.SecureString password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
public virtual void Import (byte[] rawData, System.Security.SecureString password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[System.Security.SecurityCritical]
public virtual void Import (byte[] rawData, System.Security.SecureString password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags);
[<System.CLSCompliant(false)>]
abstract member Import : byte[] * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : byte[] * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.CLSCompliant(false)>]
[<System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member Import : byte[] * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : byte[] * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.CLSCompliant(false)>]
[<System.Obsolete("X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.", DiagnosticId="SYSLIB0026", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member Import : byte[] * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : byte[] * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
abstract member Import : byte[] * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : byte[] * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
[<System.Security.SecurityCritical>]
abstract member Import : byte[] * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
override this.Import : byte[] * System.Security.SecureString * System.Security.Cryptography.X509Certificates.X509KeyStorageFlags -> unit
Public Overridable Sub Import (rawData As Byte(), password As SecureString, keyStorageFlags As X509KeyStorageFlags)
Parameter
- rawData
- Byte[]
Array byte yang berisi data dari sertifikat X.509.
- password
- SecureString
Kata sandi yang diperlukan untuk mengakses data sertifikat X.509.
- keyStorageFlags
- X509KeyStorageFlags
Kombinasi bitwise dari nilai enumerasi yang mengontrol di mana dan bagaimana mengimpor sertifikat.
- Atribut
Pengecualian
Hanya .NET Core dan .NET 5+: Dalam semua kasus.
Keterangan
Penting
Jangan pernah mengodekan kata sandi secara permanen dalam kode sumber Anda. Kata sandi yang dikodekan secara permanen dapat diambil dari perakitan menggunakan Ildasm.exe (IL Disassembler), editor hex, atau hanya dengan membuka perakitan di editor teks seperti Notepad.exe.