Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CopyWithPrivateKey()

X509Certificate2 System.Security.Cryptography.X509Certificates.X509Certificate2.CopyWithPrivateKey ( ECDiffieHellman privateKey)
inline

Definition at line 614 of file X509Certificate2.cs.

615 {
616 if (privateKey == null)
617 {
618 throw new ArgumentNullException("privateKey");
619 }
620 if (HasPrivateKey)
621 {
623 }
624 using (ECDiffieHellman eCDiffieHellman = GetECDiffieHellmanPublicKey())
625 {
626 if (eCDiffieHellman == null)
627 {
629 }
631 {
633 }
634 }
636 return new X509Certificate2(pal);
637 }
static bool AreSamePublicECParameters(ECParameters aParameters, ECParameters bParameters)
Definition Helpers.cs:194
static string Cryptography_Cert_AlreadyHasPrivateKey
Definition SR.cs:40
static string Cryptography_PrivateKey_WrongAlgorithm
Definition SR.cs:86
static string Cryptography_PrivateKey_DoesNotMatch
Definition SR.cs:84
Definition SR.cs:7
ICertificatePal CopyWithPrivateKey(DSA privateKey)

References System.Security.Cryptography.X509Certificates.X509Certificate2.X509Certificate2(), Internal.Cryptography.Helpers.AreSamePublicECParameters(), Internal.Cryptography.ICertificatePal.CopyWithPrivateKey(), System.SR.Cryptography_Cert_AlreadyHasPrivateKey, System.SR.Cryptography_PrivateKey_DoesNotMatch, System.SR.Cryptography_PrivateKey_WrongAlgorithm, System.Runtime.Serialization.Dictionary, System.Security.Cryptography.X509Certificates.X509Certificate2.GetECDiffieHellmanPublicKey(), and System.Security.Cryptography.X509Certificates.X509Certificate2.HasPrivateKey.