X509Certificate2.CopyWithPrivateKey メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
| 名前 | 説明 |
|---|---|
| CopyWithPrivateKey(SlhDsa) |
秘密キーと、関連付けられている公開キーを含む証明書を、秘密キーにアクセスできる新しいインスタンスに結合します。 |
| CopyWithPrivateKey(MLDsa) |
秘密キーと、関連付けられている公開キーを含む証明書を、秘密キーにアクセスできる新しいインスタンスに結合します。 |
| CopyWithPrivateKey(MLKem) |
秘密キーと、関連付けられている公開キーを含む証明書を、秘密キーにアクセスできる新しいインスタンスに結合します。 |
| CopyWithPrivateKey(CompositeMLDsa) |
秘密キーと、関連付けられている公開キーを含む証明書を、秘密キーにアクセスできる新しいインスタンスに結合します。 |
| CopyWithPrivateKey(ECDiffieHellman) |
秘密キーと ECDiffieHellman 証明書の公開キーを組み合わせて、新しい ECDiffieHellman 証明書を生成します。 |
CopyWithPrivateKey(SlhDsa)
秘密キーと、関連付けられている公開キーを含む証明書を、秘密キーにアクセスできる新しいインスタンスに結合します。
public:
System::Security::Cryptography::X509Certificates::X509Certificate2 ^ CopyWithPrivateKey(System::Security::Cryptography::SlhDsa ^ privateKey);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.SlhDsa privateKey);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.CopyWithPrivateKey : System.Security.Cryptography.SlhDsa -> System.Security.Cryptography.X509Certificates.X509Certificate2
Public Function CopyWithPrivateKey (privateKey As SlhDsa) As X509Certificate2
パラメーター
- privateKey
- SlhDsa
この証明書の SLH-DSA 公開キーに対応する SLH-DSA 秘密キー。
返品
HasPrivateKey プロパティが true に設定された新しい証明書。
現在の証明書は変更されません。
- 属性
例外
privateKey は nullです。
指定した秘密キーがこの証明書の公開キーと一致しません。
証明書には、既に秘密キーが関連付けられています。
適用対象
CopyWithPrivateKey(MLDsa)
秘密キーと、関連付けられている公開キーを含む証明書を、秘密キーにアクセスできる新しいインスタンスに結合します。
public:
System::Security::Cryptography::X509Certificates::X509Certificate2 ^ CopyWithPrivateKey(System::Security::Cryptography::MLDsa ^ privateKey);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.MLDsa privateKey);
public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.MLDsa privateKey);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.CopyWithPrivateKey : System.Security.Cryptography.MLDsa -> System.Security.Cryptography.X509Certificates.X509Certificate2
member this.CopyWithPrivateKey : System.Security.Cryptography.MLDsa -> System.Security.Cryptography.X509Certificates.X509Certificate2
Public Function CopyWithPrivateKey (privateKey As MLDsa) As X509Certificate2
パラメーター
- privateKey
- MLDsa
この証明書の ML-DSA 公開キーに対応する ML-DSA 秘密キー。
返品
HasPrivateKey プロパティが true に設定された新しい証明書。
現在の証明書は変更されません。
- 属性
例外
privateKey は nullです。
指定した秘密キーがこの証明書の公開キーと一致しません。
証明書には、既に秘密キーが関連付けられています。
適用対象
CopyWithPrivateKey(MLKem)
秘密キーと、関連付けられている公開キーを含む証明書を、秘密キーにアクセスできる新しいインスタンスに結合します。
public:
System::Security::Cryptography::X509Certificates::X509Certificate2 ^ CopyWithPrivateKey(System::Security::Cryptography::MLKem ^ privateKey);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.MLKem privateKey);
public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.MLKem privateKey);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.CopyWithPrivateKey : System.Security.Cryptography.MLKem -> System.Security.Cryptography.X509Certificates.X509Certificate2
member this.CopyWithPrivateKey : System.Security.Cryptography.MLKem -> System.Security.Cryptography.X509Certificates.X509Certificate2
Public Function CopyWithPrivateKey (privateKey As MLKem) As X509Certificate2
パラメーター
- privateKey
- MLKem
この証明書の ML-KEM 公開キーに対応する ML-KEM 秘密キー。
返品
HasPrivateKey プロパティが true に設定された新しい証明書。
現在の証明書は変更されません。
- 属性
例外
privateKey は nullです。
指定した秘密キーがこの証明書の公開キーと一致しません。
証明書には、既に秘密キーが関連付けられています。
適用対象
CopyWithPrivateKey(CompositeMLDsa)
秘密キーと、関連付けられている公開キーを含む証明書を、秘密キーにアクセスできる新しいインスタンスに結合します。
public:
System::Security::Cryptography::X509Certificates::X509Certificate2 ^ CopyWithPrivateKey(System::Security::Cryptography::CompositeMLDsa ^ privateKey);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.CompositeMLDsa privateKey);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.CopyWithPrivateKey : System.Security.Cryptography.CompositeMLDsa -> System.Security.Cryptography.X509Certificates.X509Certificate2
Public Function CopyWithPrivateKey (privateKey As CompositeMLDsa) As X509Certificate2
パラメーター
- privateKey
- CompositeMLDsa
複合 ML-DSA、この証明書の複合 ML-DSA 公開キーに対応する秘密キーです。
返品
HasPrivateKey プロパティが true に設定された新しい証明書。
現在の証明書は変更されません。
- 属性
例外
privateKey は nullです。
指定した秘密キーがこの証明書の公開キーと一致しません。
証明書には、既に秘密キーが関連付けられています。
このプラットフォームでは、証明書と複合 ML-DSA 秘密キーの組み合わせはサポートされていません。
適用対象
CopyWithPrivateKey(ECDiffieHellman)
秘密キーと ECDiffieHellman 証明書の公開キーを組み合わせて、新しい ECDiffieHellman 証明書を生成します。
public:
System::Security::Cryptography::X509Certificates::X509Certificate2 ^ CopyWithPrivateKey(System::Security::Cryptography::ECDiffieHellman ^ privateKey);
public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.ECDiffieHellman privateKey);
member this.CopyWithPrivateKey : System.Security.Cryptography.ECDiffieHellman -> System.Security.Cryptography.X509Certificates.X509Certificate2
Public Function CopyWithPrivateKey (privateKey As ECDiffieHellman) As X509Certificate2
パラメーター
- privateKey
- ECDiffieHellman
プライベート ECDiffieHellman キー。
返品
HasPrivateKey プロパティが true に設定された新しい ECDiffieHellman 証明書。
現在の証明書は変更されません。
例外
privateKey は nullです。
証明書には、既に秘密キーが関連付けられています。