Aracılığıyla paylaş


X509Certificate.Import Yöntem

Tanım

Bir X509Certificate nesneyi doldurur.

Aşırı Yüklemeler

Import(String, String, X509KeyStorageFlags)
Geçersiz.
Geçersiz.

Nesneyi bir sertifika dosyasından X509Certificate , paroladan ve X509KeyStorageFlags değerden bilgilerle doldurur.

Import(String, SecureString, X509KeyStorageFlags)
Geçersiz.
Geçersiz.

Bir X509Certificate nesneyi sertifika dosyasından, paroladan ve anahtar depolama bayrağından alınan bilgilerle doldurur.

Import(Byte[], String, X509KeyStorageFlags)
Geçersiz.
Geçersiz.

X509Certificate Bir bayt dizisinden, paroladan ve özel anahtarın nasıl içeri aktarılacağını belirlemek için bayraklardan verileri kullanarak nesneyi doldurur.

Import(Byte[])
Geçersiz.
Geçersiz.

X509Certificate Nesneyi bayt dizisinden alınan verilerle doldurur.

Import(String)
Geçersiz.
Geçersiz.

Nesneyi bir sertifika dosyasındaki X509Certificate bilgilerle doldurur.

Import(Byte[], SecureString, X509KeyStorageFlags)
Geçersiz.
Geçersiz.

Bir X509Certificate bayt dizisinden, paroladan ve anahtar depolama bayrağından verileri kullanarak bir nesneyi doldurur.

Import(String, String, X509KeyStorageFlags)

Kaynak:
X509Certificate.cs
Kaynak:
X509Certificate.cs
Kaynak:
X509Certificate.cs

Dikkat

X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.

Dikkat

X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.

Nesneyi bir sertifika dosyasından X509Certificate , paroladan ve X509KeyStorageFlags değerden bilgilerle doldurur.

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)

Parametreler

fileName
String

Dize olarak temsil edilen bir sertifika dosyasının adı.

password
String

X.509 sertifika verilerine erişmek için gereken parola.

keyStorageFlags
X509KeyStorageFlags

Sertifikanın nerede ve nasıl içeri aktarılacağını denetleen numaralandırma değerlerinin bit düzeyinde birleşimi.

Öznitelikler

Özel durumlar

fileName parametresidirnull.

Yalnızca .NET Core ve .NET 5+ : Her durumda.

Açıklamalar

Önemli

Hiçbir zaman kaynak kodunuz içinde bir parolayı sabit olarak kodlayın. Sabit kodlanmış parolalar ,Ildasm.exe (IL Disassembler), bir onaltılık düzenleyici kullanılarak veya derlemeyi Notepad.exe gibi bir metin düzenleyicisinde açarak bir derlemeden alınabilir.

Şunlara uygulanır

Import(String, SecureString, X509KeyStorageFlags)

Kaynak:
X509Certificate.cs
Kaynak:
X509Certificate.cs
Kaynak:
X509Certificate.cs

Dikkat

X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.

Dikkat

X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.

Önemli

Bu API, CLS uyumlu değildir.

Bir X509Certificate nesneyi sertifika dosyasından, paroladan ve anahtar depolama bayrağından alınan bilgilerle doldurur.

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)

Parametreler

fileName
String

Sertifika dosyasının adı.

password
SecureString

X.509 sertifika verilerine erişmek için gereken parola.

keyStorageFlags
X509KeyStorageFlags

Sertifikanın nerede ve nasıl içeri aktarılacağını denetleen numaralandırma değerlerinin bit düzeyinde birleşimi.

Öznitelikler

Özel durumlar

fileName parametresidirnull.

Yalnızca .NET Core ve .NET 5+ : Her durumda.

Açıklamalar

Önemli

Kaynak kodunuz içinde hiçbir zaman bir parolayı sabit kodlayın. Sabit kodlanmış parolalar ,Ildasm.exe (IL Disassembler), bir onaltılık düzenleyici kullanılarak veya derlemeyi Notepad.exe gibi bir metin düzenleyicisinde açarak bir derlemeden alınabilir.

Şunlara uygulanır

Import(Byte[], String, X509KeyStorageFlags)

Kaynak:
X509Certificate.cs
Kaynak:
X509Certificate.cs
Kaynak:
X509Certificate.cs

Dikkat

X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.

Dikkat

X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.

X509Certificate Bir bayt dizisinden, paroladan ve özel anahtarın nasıl içeri aktarılacağını belirlemek için bayraklardan verileri kullanarak nesneyi doldurur.

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)

Parametreler

rawData
Byte[]

X.509 sertifikasından veri içeren bayt dizisi.

password
String

X.509 sertifika verilerine erişmek için gereken parola.

keyStorageFlags
X509KeyStorageFlags

Sertifikanın nerede ve nasıl içeri aktarılacağını denetleen numaralandırma değerlerinin bit düzeyinde birleşimi.

Öznitelikler

Özel durumlar

rawData parametresidirnull.

-veya-

Parametrenin rawData uzunluğu 0'dır.

Yalnızca .NET Core ve .NET 5+ : Her durumda.

Açıklamalar

Bu yöntem, bayt dizisi tarafından temsil edilen sertifikanın parolasını kullanarak bir X509Certificate nesneyi doldurmak için kullanılabilir. X509KeyStorageFlags Değeri, özel anahtarın nereye ve nasıl içeri aktarılacağını denetlemek için kullanılabilir.

Şunlara uygulanır

Import(Byte[])

Kaynak:
X509Certificate.cs
Kaynak:
X509Certificate.cs
Kaynak:
X509Certificate.cs

Dikkat

X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.

Dikkat

X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.

X509Certificate Nesneyi bayt dizisinden alınan verilerle doldurur.

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())

Parametreler

rawData
Byte[]

X.509 sertifikasından veri içeren bayt dizisi.

Öznitelikler

Özel durumlar

rawData parametresidirnull.

-veya-

Parametrenin rawData uzunluğu 0'dır.

Yalnızca .NET Core ve .NET 5+ : Her durumda.

Açıklamalar

Bu yöntem, X.509 sertifikasının ham bayt dizisini almak ve nesneyi ilişkili değerleriyle doldurmak X509Certificate için kullanılabilir.

Şunlara uygulanır

Import(String)

Kaynak:
X509Certificate.cs
Kaynak:
X509Certificate.cs
Kaynak:
X509Certificate.cs

Dikkat

X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.

Dikkat

X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.

Nesneyi bir sertifika dosyasındaki X509Certificate bilgilerle doldurur.

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)

Parametreler

fileName
String

Dize olarak temsil edilen bir sertifika dosyasının adı.

Öznitelikler

Özel durumlar

fileName parametresidirnull.

Yalnızca .NET Core ve .NET 5+ : Her durumda.

Örnekler

Aşağıdaki örnek bir dosyadan X.509 sertifikasını ToString yükler, yöntemini çağırır ve sonuçları konsolda görüntüler.

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

Açıklamalar

Bu yöntem, X.509 sertifikasını temsil eden bir sertifika dosyası (.cer uzantısına sahip bir dosya gibi) kullanır ve nesneyi dosyanın içerdiği sertifikayla doldurur X509Certificate .

Şunlara uygulanır

Import(Byte[], SecureString, X509KeyStorageFlags)

Kaynak:
X509Certificate.cs
Kaynak:
X509Certificate.cs
Kaynak:
X509Certificate.cs

Dikkat

X509Certificate and X509Certificate2 are immutable. Use the appropriate constructor to create a new certificate.

Dikkat

X509Certificate and X509Certificate2 are immutable. Use X509CertificateLoader to create a new certificate.

Önemli

Bu API, CLS uyumlu değildir.

Bir X509Certificate bayt dizisinden, paroladan ve anahtar depolama bayrağından verileri kullanarak bir nesneyi doldurur.

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)

Parametreler

rawData
Byte[]

X.509 sertifikasından veri içeren bir bayt dizisi.

password
SecureString

X.509 sertifika verilerine erişmek için gereken parola.

keyStorageFlags
X509KeyStorageFlags

Sertifikanın nerede ve nasıl içeri aktarılacağını denetleen numaralandırma değerlerinin bit düzeyinde birleşimi.

Öznitelikler

Özel durumlar

rawData parametresidirnull.

-veya-

Parametrenin rawData uzunluğu 0'dır.

Yalnızca .NET Core ve .NET 5+ : Her durumda.

Açıklamalar

Önemli

Kaynak kodunuz içinde hiçbir zaman bir parolayı sabit kodlayın. Sabit kodlanmış parolalar ,Ildasm.exe (IL Disassembler), bir onaltılık düzenleyici kullanılarak veya derlemeyi Notepad.exe gibi bir metin düzenleyicisinde açarak bir derlemeden alınabilir.

Şunlara uygulanır