3 instantiations of SafeEvpPKeyHandle
System.Security.Cryptography (3)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.cs (1)
313return new SafeEvpPKeyHandle(evpPKeyHandle, extraHandle: extraHandle);
System\Security\Cryptography\SafeEvpPKeyHandle.OpenSsl.cs (2)
12internal static readonly SafeEvpPKeyHandle InvalidHandle = new SafeEvpPKeyHandle(); 72SafeEvpPKeyHandle safeHandle = new SafeEvpPKeyHandle();
278 references to SafeEvpPKeyHandle
System.Net.Quic (1)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509.cs (1)
31internal static partial SafeEvpPKeyHandle GetX509EvpPublicKey(SafeX509Handle x509);
System.Net.Security (5)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (1)
1047private static void SetSslCertificate(SafeSslContextHandle contextPtr, SafeX509Handle certPtr, SafeEvpPKeyHandle keyPtr)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (1)
199internal static partial int SslUsePrivateKey(SafeSslHandle ssl, SafeEvpPKeyHandle keyPtr);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtxOptions.cs (1)
22internal static partial int SslCtxUsePrivateKey(SafeSslContextHandle ctx, SafeEvpPKeyHandle keyPtr);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509.cs (1)
31internal static partial SafeEvpPKeyHandle GetX509EvpPublicKey(SafeX509Handle x509);
System\Net\Security\SslStreamCertificateContext.Linux.cs (1)
29internal readonly SafeEvpPKeyHandle KeyHandle;
System.Security.Cryptography (271)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EcDsa.ImportExport.cs (7)
100private static partial int CryptoNative_EvpPKeyGetEcGroupNid(SafeEvpPKeyHandle pkey, out int nid); 102internal static bool EvpPKeyHasCurveName(SafeEvpPKeyHandle pkey) 117internal static string? EvpPKeyGetCurveName(SafeEvpPKeyHandle pkey) 138SafeEvpPKeyHandle key, 196SafeEvpPKeyHandle key, 279SafeEvpPKeyHandle key, 369SafeEvpPKeyHandle key,
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.ExtraHandle.cs (1)
11private static partial IntPtr GetExtraHandle(SafeEvpPKeyHandle handle) => handle.ExtraHandle;
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.Kem.cs (19)
17/// project as links. However, accesses to internal members like <see cref="SafeEvpPKeyHandle.ExtraHandle"/> 27private static partial IntPtr GetExtraHandle(SafeEvpPKeyHandle handle); 40SafeEvpPKeyHandle kem, 49SafeEvpPKeyHandle kem, 55private static partial SafeEvpPKeyHandle CryptoNative_EvpKemGeneratePkey( 62SafeEvpPKeyHandle key, 68SafeEvpPKeyHandle key, 74SafeEvpPKeyHandle key, 80SafeEvpPKeyHandle kem, 87internal static SafeEvpPKeyHandle EvpKemGeneratePkey(string kemName) 89SafeEvpPKeyHandle handle = CryptoNative_EvpKemGeneratePkey(kemName, ReadOnlySpan<byte>.Empty, 0); 101internal static SafeEvpPKeyHandle EvpKemGeneratePkey(string kemName, ReadOnlySpan<byte> seed) 109SafeEvpPKeyHandle handle = CryptoNative_EvpKemGeneratePkey(kemName, seed, seed.Length); 122SafeEvpPKeyHandle key, 149internal static void EvpKemDecapsulate(SafeEvpPKeyHandle key, ReadOnlySpan<byte> ciphertext, Span<byte> sharedSecret) 170internal static void EvpKemExportPrivateSeed(SafeEvpPKeyHandle key, Span<byte> destination) => 173internal static void EvpKemExportDecapsulationKey(SafeEvpPKeyHandle key, Span<byte> destination) => 176internal static void EvpKemExportEncapsulationKey(SafeEvpPKeyHandle key, Span<byte> destination) => 179internal static void EvpKemEncapsulate(SafeEvpPKeyHandle key, Span<byte> ciphertext, Span<byte> sharedSecret)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.cs (22)
14internal static partial SafeEvpPKeyHandle EvpPkeyCreate(); 20internal static partial int EvpPKeyBits(SafeEvpPKeyHandle pkey); 22internal static int GetEvpPKeySizeBytes(SafeEvpPKeyHandle pkey) 40private static partial int UpRefEvpPkey(SafeEvpPKeyHandle handle, IntPtr extraHandle); 42internal static int UpRefEvpPkey(SafeEvpPKeyHandle handle) 48internal static partial EvpAlgorithmId EvpPKeyType(SafeEvpPKeyHandle handle); 51internal static partial EvpAlgorithmFamilyId EvpPKeyFamily(SafeEvpPKeyHandle handle); 54private static unsafe partial SafeEvpPKeyHandle CryptoNative_DecodeSubjectPublicKeyInfo( 60private static unsafe partial SafeEvpPKeyHandle CryptoNative_DecodePkcs8PrivateKey( 65internal static unsafe SafeEvpPKeyHandle DecodeSubjectPublicKeyInfo( 69SafeEvpPKeyHandle handle; 88internal static unsafe SafeEvpPKeyHandle DecodePkcs8PrivateKey( 92SafeEvpPKeyHandle handle; 139internal static ArraySegment<byte> RentEncodePkcs8PrivateKey(SafeEvpPKeyHandle pkey) 190internal static ArraySegment<byte> RentEncodeSubjectPublicKeyInfo(SafeEvpPKeyHandle pkey) 224private static partial SafeEvpPKeyHandle CryptoNative_LoadPrivateKeyFromEngine( 229internal static SafeEvpPKeyHandle LoadPrivateKeyFromEngine( 236SafeEvpPKeyHandle pkey = CryptoNative_LoadPrivateKeyFromEngine(engineName, keyName, out bool haveEngine); 254private static partial SafeEvpPKeyHandle CryptoNative_LoadPublicKeyFromEngine( 259internal static SafeEvpPKeyHandle LoadPublicKeyFromEngine( 266SafeEvpPKeyHandle pkey = CryptoNative_LoadPublicKeyFromEngine(engineName, keyName, out bool haveEngine); 290internal static SafeEvpPKeyHandle LoadKeyFromProvider(
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Dsa.cs (2)
13internal static partial SafeDsaHandle EvpPkeyGetDsa(SafeEvpPKeyHandle pkey); 17internal static partial bool EvpPkeySetDsa(SafeEvpPKeyHandle pkey, SafeDsaHandle key);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Ecdh.cs (4)
16SafeEvpPKeyHandle pkey, 18SafeEvpPKeyHandle peerKey, 22internal static int EvpPKeyDeriveSecretAgreement(SafeEvpPKeyHandle pkey, SafeEvpPKeyHandle peerKey, Span<byte> destination)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.EcDsa.cs (4)
16SafeEvpPKeyHandle pkey, 24SafeEvpPKeyHandle pkey, 47SafeEvpPKeyHandle pkey, 55SafeEvpPKeyHandle pkey,
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.EcKey.cs (4)
13internal static partial SafeEcKeyHandle EvpPkeyGetEcKey(SafeEvpPKeyHandle pkey); 17private static partial bool CryptoNative_EvpPkeySetEcKey(SafeEvpPKeyHandle pkey, SafeEcKeyHandle key); 20internal static SafeEvpPKeyHandle CreateEvpPkeyFromEcKey(SafeEcKeyHandle key) 22SafeEvpPKeyHandle pkey = Interop.Crypto.EvpPkeyCreate();
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.ExportKeyContents.cs (2)
13SafeEvpPKeyHandle key, 15Func<SafeEvpPKeyHandle, Span<byte>, int, int> action)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.FromData.cs (3)
14private static partial SafeEvpPKeyHandle CryptoNative_EvpPKeyFromData( 20internal static SafeEvpPKeyHandle EvpPKeyFromData(string algorithmName, ReadOnlySpan<byte> key, bool privateKey) 22SafeEvpPKeyHandle handle = CryptoNative_EvpPKeyFromData(algorithmName, key, key.Length, privateKey);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.MLDsa.cs (15)
26SafeEvpPKeyHandle mldsa, 32SafeEvpPKeyHandle key, 60private static partial SafeEvpPKeyHandle CryptoNative_MLDsaGenerateKey(string keyType, ReadOnlySpan<byte> seed, int seedLength); 62internal static SafeEvpPKeyHandle MLDsaGenerateKey(string algorithmName, ReadOnlySpan<byte> seed) 64SafeEvpPKeyHandle handle = CryptoNative_MLDsaGenerateKey(algorithmName, seed, seed.Length); 79SafeEvpPKeyHandle pkey, IntPtr extraHandle, 85SafeEvpPKeyHandle pkey, 104SafeEvpPKeyHandle pkey, IntPtr extraHandle, 110SafeEvpPKeyHandle pkey, 136private static partial int CryptoNative_MLDsaExportSecretKey(SafeEvpPKeyHandle pkey, Span<byte> destination, int destinationLength); 139private static partial int CryptoNative_MLDsaExportSeed(SafeEvpPKeyHandle pkey, Span<byte> destination, int destinationLength); 142private static partial int CryptoNative_MLDsaExportPublicKey(SafeEvpPKeyHandle pkey, Span<byte> destination, int destinationLength); 144internal static void MLDsaExportSecretKey(SafeEvpPKeyHandle key, Span<byte> destination) => 147internal static void MLDsaExportSeed(SafeEvpPKeyHandle key, Span<byte> destination) => 150internal static void MLDsaExportPublicKey(SafeEvpPKeyHandle key, Span<byte> destination) =>
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Rsa.cs (14)
15private static partial SafeEvpPKeyHandle CryptoNative_EvpPKeyCreateRsa(IntPtr rsa); 17internal static SafeEvpPKeyHandle EvpPKeyCreateRsa(IntPtr rsa) 21SafeEvpPKeyHandle pkey = CryptoNative_EvpPKeyCreateRsa(rsa); 33private static partial SafeEvpPKeyHandle CryptoNative_RsaGenerateKey(int keySize); 35internal static SafeEvpPKeyHandle RsaGenerateKey(int keySize) 37SafeEvpPKeyHandle pkey = CryptoNative_RsaGenerateKey(keySize); 50SafeEvpPKeyHandle pkey, 60SafeEvpPKeyHandle pkey, 87SafeEvpPKeyHandle pkey, 97SafeEvpPKeyHandle pkey, 124SafeEvpPKeyHandle pkey, 134SafeEvpPKeyHandle pkey, 165SafeEvpPKeyHandle pkey, 175SafeEvpPKeyHandle pkey,
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.SlhDsa.cs (17)
16private static partial SafeEvpPKeyHandle CryptoNative_SlhDsaGenerateKey(string keyType); 18internal static SafeEvpPKeyHandle SlhDsaGenerateKey(string algorithmName) 20SafeEvpPKeyHandle handle = CryptoNative_SlhDsaGenerateKey(algorithmName); 53SafeEvpPKeyHandle slhDsa, 56internal static PalSlhDsaAlgorithmId GetSlhDsaAlgorithmId(SafeEvpPKeyHandle key) 78SafeEvpPKeyHandle pkey, IntPtr extraHandle, 84SafeEvpPKeyHandle pkey, 103SafeEvpPKeyHandle pkey, IntPtr extraHandle, 109SafeEvpPKeyHandle pkey, 136SafeEvpPKeyHandle pkey, IntPtr extraHandle, 141SafeEvpPKeyHandle pkey, 158SafeEvpPKeyHandle pkey, IntPtr extraHandle, 163SafeEvpPKeyHandle pkey, 187private static partial int CryptoNative_SlhDsaExportSecretKey(SafeEvpPKeyHandle pkey, Span<byte> destination, int destinationLength); 190private static partial int CryptoNative_SlhDsaExportPublicKey(SafeEvpPKeyHandle pkey, Span<byte> destination, int destinationLength); 192internal static void SlhDsaExportSecretKey(SafeEvpPKeyHandle key, Span<byte> destination) => 195internal static void SlhDsaExportPublicKey(SafeEvpPKeyHandle key, Span<byte> destination) =>
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509.cs (1)
31internal static partial SafeEvpPKeyHandle GetX509EvpPublicKey(SafeX509Handle x509);
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.cs (7)
12private Lazy<SafeEvpPKeyHandle>? _key; 22_key = new Lazy<SafeEvpPKeyHandle>(ECOpenSsl.GenerateECKey(curve, out int keySize)); 45_key = new Lazy<SafeEvpPKeyHandle>(() => ECOpenSsl.GenerateECKey(keySize)); 79_key = new Lazy<SafeEvpPKeyHandle>(ECOpenSsl.GenerateECKey(value)); 88_key = new Lazy<SafeEvpPKeyHandle>(ECOpenSsl.GenerateECKey(curve, out int keySizeValue)); 107_key = new Lazy<SafeEvpPKeyHandle>(ECOpenSsl.ImportECKey(parameters, out int keySize)); 145SafeEvpPKeyHandle handle = _key.Value;
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.Derive.cs (2)
124SafeEvpPKeyHandle? ourKey = _key.Value; 127SafeEvpPKeyHandle? theirKey = null;
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSslPublicKey.cs (2)
13internal ECDiffieHellmanOpenSslPublicKey(SafeEvpPKeyHandle pkeyHandle) 85internal SafeEvpPKeyHandle DuplicateKeyHandle()
src\libraries\Common\src\System\Security\Cryptography\ECDsaOpenSsl.cs (14)
18private Lazy<SafeEvpPKeyHandle>? _key; 33_key = new Lazy<SafeEvpPKeyHandle>(ECOpenSsl.GenerateECKey(curve, out int keySize)); 63_key = new Lazy<SafeEvpPKeyHandle>(GenerateKeyFromSize); 87SafeEvpPKeyHandle key = GetKey(); 125SafeEvpPKeyHandle key = GetKey(); 138SafeEvpPKeyHandle key = GetKey(); 209SafeEvpPKeyHandle key = GetKey(); 245_key = new Lazy<SafeEvpPKeyHandle>(GenerateKeyFromSize); 254_key = new Lazy<SafeEvpPKeyHandle>(ECOpenSsl.GenerateECKey(curve, out int keySize)); 266_key = new Lazy<SafeEvpPKeyHandle>(ECOpenSsl.ImportECKey(parameters, out int keySize)); 273private SafeEvpPKeyHandle GetKey() 277SafeEvpPKeyHandle key = _key.Value; 287private SafeEvpPKeyHandle GenerateKeyFromSize() 326SafeEvpPKeyHandle handle = _key.Value;
src\libraries\Common\src\System\Security\Cryptography\ECOpenSsl.cs (7)
43internal SafeEvpPKeyHandle CreateEvpPKeyHandle() 118internal static SafeEvpPKeyHandle GenerateECKey(int keySize) 120SafeEvpPKeyHandle ret = ImportECKeyCore(new ECOpenSsl(keySize), out int createdKeySize); 125internal static SafeEvpPKeyHandle GenerateECKey(ECCurve curve, out int keySize) 130internal static SafeEvpPKeyHandle ImportECKey(ECParameters parameters, out int keySize) 136private static SafeEvpPKeyHandle ImportECKeyCore(ECOpenSsl ecOpenSsl, out int keySize) 140SafeEvpPKeyHandle handle = Interop.Crypto.CreateEvpPkeyFromEcKey(ec.Value);
src\libraries\Common\src\System\Security\Cryptography\ECOpenSsl.ImportExport.cs (6)
172private static void CheckInvalidKey(SafeEvpPKeyHandle key) 180public static ECParameters ExportParameters(SafeEvpPKeyHandle pkey, bool includePrivateParameters) 196public static ECParameters ExportExplicitParameters(SafeEvpPKeyHandle pkey, bool includePrivateParameters) 217private static ECParameters ExportECParametersFromEvpPKeyUsingParams(SafeEvpPKeyHandle pkey, bool includePrivateParameters) 230private static ECParameters ExportNamedCurveParametersFromEvpPKeyUsingParams(SafeEvpPKeyHandle pkey, string curveName, bool includePrivateParameters) 248private static ECParameters ExportExplicitCurveParametersFromEvpPKeyUsingParams(SafeEvpPKeyHandle pkey, bool includePrivateParameters)
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (24)
18private Lazy<SafeEvpPKeyHandle>? _key; 39_key = new Lazy<SafeEvpPKeyHandle>(GenerateKey); 56_key = new Lazy<SafeEvpPKeyHandle>(GenerateKey); 88SafeEvpPKeyHandle key = GetKey(); 116SafeEvpPKeyHandle key = GetKey(); 168SafeEvpPKeyHandle key, 211SafeEvpPKeyHandle key = GetKey(); 236SafeEvpPKeyHandle key = GetKey(); 242SafeEvpPKeyHandle key, 285SafeEvpPKeyHandle key = GetKey(); 303SafeEvpPKeyHandle key = GetKey(); 322SafeEvpPKeyHandle key = GetKey(); 342SafeEvpPKeyHandle key = GetKey(); 543SafeEvpPKeyHandle newKey = Interop.Crypto.DecodeSubjectPublicKeyInfo( 590SafeEvpPKeyHandle newKey = Interop.Crypto.DecodePkcs8PrivateKey( 649SafeEvpPKeyHandle handle = _key.Value; 655private void SetKey(SafeEvpPKeyHandle newKey) 658_key = new Lazy<SafeEvpPKeyHandle>(newKey); 708private SafeEvpPKeyHandle GetKey() 712SafeEvpPKeyHandle key = _key.Value; 722private SafeEvpPKeyHandle GenerateKey() 734SafeEvpPKeyHandle key = GetKey(); 760SafeEvpPKeyHandle key = GetKey(); 792SafeEvpPKeyHandle key = GetKey();
System\Security\Cryptography\DSAOpenSsl.cs (4)
25/// Create an DSAOpenSsl from an <see cref="SafeEvpPKeyHandle"/> whose value is an existing 39public DSAOpenSsl(SafeEvpPKeyHandle pkeyHandle) 88public SafeEvpPKeyHandle DuplicateKeyHandle() 91SafeEvpPKeyHandle pkeyHandle = Interop.Crypto.EvpPkeyCreate();
System\Security\Cryptography\ECDiffieHellmanOpenSsl.cs (5)
13/// Create an ECDiffieHellmanOpenSsl from an <see cref="SafeEvpPKeyHandle"/> whose value is an existing 25public ECDiffieHellmanOpenSsl(SafeEvpPKeyHandle pkeyHandle) 39_key = new Lazy<SafeEvpPKeyHandle>(pkeyHandle.DuplicateHandle()); 68_key = new Lazy<SafeEvpPKeyHandle>(Interop.Crypto.CreateEvpPkeyFromEcKey(ecKeyHandle)); 79public SafeEvpPKeyHandle DuplicateKeyHandle()
System\Security\Cryptography\ECDsaOpenSsl.cs (5)
13/// Create an ECDsaOpenSsl from an <see cref="SafeEvpPKeyHandle"/> whose value is an existing 25public ECDsaOpenSsl(SafeEvpPKeyHandle pkeyHandle) 39_key = new Lazy<SafeEvpPKeyHandle>(pkeyHandle.DuplicateHandle()); 68_key = new Lazy<SafeEvpPKeyHandle>(Interop.Crypto.CreateEvpPkeyFromEcKey(ecKeyHandle)); 79public SafeEvpPKeyHandle DuplicateKeyHandle()
System\Security\Cryptography\MLDsaImplementation.OpenSsl.cs (7)
11private SafeEvpPKeyHandle _key = null!; 18SafeEvpPKeyHandle key, 48internal SafeEvpPKeyHandle DuplicateHandle() 94SafeEvpPKeyHandle key = Interop.Crypto.MLDsaGenerateKey(algorithm.Name, ReadOnlySpan<byte>.Empty); 101SafeEvpPKeyHandle key = Interop.Crypto.EvpPKeyFromData(algorithm.Name, source, privateKey: false); 108SafeEvpPKeyHandle key = Interop.Crypto.EvpPKeyFromData(algorithm.Name, source, privateKey: true); 115SafeEvpPKeyHandle key = Interop.Crypto.MLDsaGenerateKey(algorithm.Name, source);
System\Security\Cryptography\MLDsaOpenSsl.cs (9)
26private SafeEvpPKeyHandle _key; 35/// The OpenSSL <c>EVP_PKEY*</c> value to use as the key, represented as a <see cref="SafeEvpPKeyHandle" />. 54public MLDsaOpenSsl(SafeEvpPKeyHandle pkeyHandle) 55: base(AlgorithmFromHandle(pkeyHandle, out SafeEvpPKeyHandle upRefHandle, out bool hasSeed, out bool hasSecretKey)) 63SafeEvpPKeyHandle pkeyHandle, 64out SafeEvpPKeyHandle upRefHandle, 69/// Gets a <see cref="SafeEvpPKeyHandle" /> representation of the cryptographic key. 71/// <returns>A <see cref="SafeEvpPKeyHandle" /> representation of the cryptographic key.</returns> 73public partial SafeEvpPKeyHandle DuplicateKeyHandle();
System\Security\Cryptography\MLDsaOpenSsl.OpenSsl.cs (3)
13public partial SafeEvpPKeyHandle DuplicateKeyHandle() 20SafeEvpPKeyHandle pkeyHandle, 21out SafeEvpPKeyHandle upRefHandle,
System\Security\Cryptography\MLKemImplementation.OpenSsl.cs (7)
11private SafeEvpPKeyHandle _key; 21SafeEvpPKeyHandle key, 34SafeEvpPKeyHandle key = Interop.Crypto.EvpKemGeneratePkey(kemName); 43SafeEvpPKeyHandle key = Interop.Crypto.EvpKemGeneratePkey(kemName, source); 52SafeEvpPKeyHandle key = Interop.Crypto.EvpPKeyFromData(kemName, source, privateKey: true); 61SafeEvpPKeyHandle key = Interop.Crypto.EvpPKeyFromData(kemName, source, privateKey: false); 75internal SafeEvpPKeyHandle DuplicateHandle() => _key.DuplicateHandle();
System\Security\Cryptography\MLKemOpenSsl.cs (9)
26private readonly SafeEvpPKeyHandle _key; 35/// The OpenSSL <c>EVP_PKEY*</c> value to use as the key, represented as a <see cref="SafeEvpPKeyHandle" />. 54public MLKemOpenSsl(SafeEvpPKeyHandle pkeyHandle) : base( 55AlgorithmFromHandle(pkeyHandle, out SafeEvpPKeyHandle upRefHandle, out bool hasSeed, out bool hasDecapsulationKey)) 63SafeEvpPKeyHandle pkeyHandle, 64out SafeEvpPKeyHandle upRefHandle, 69/// Gets a <see cref="SafeEvpPKeyHandle" /> representation of the cryptographic key. 71/// <returns>A <see cref="SafeEvpPKeyHandle" /> representation of the cryptographic key.</returns> 73public partial SafeEvpPKeyHandle DuplicateKeyHandle();
System\Security\Cryptography\MLKemOpenSsl.OpenSsl.cs (3)
12public partial SafeEvpPKeyHandle DuplicateKeyHandle() 19SafeEvpPKeyHandle pkeyHandle, 20out SafeEvpPKeyHandle upRefHandle,
System\Security\Cryptography\RSAOpenSsl.cs (6)
22_key = new Lazy<SafeEvpPKeyHandle>(); 47SafeEvpPKeyHandle pkey = Interop.Crypto.EvpPKeyCreateRsa(handle); 54/// Create an RSAOpenSsl from an <see cref="SafeEvpPKeyHandle"/> whose value is an existing 68public RSAOpenSsl(SafeEvpPKeyHandle pkeyHandle) 82SafeEvpPKeyHandle newKey = pkeyHandle.DuplicateHandle(); 91public SafeEvpPKeyHandle DuplicateKeyHandle()
System\Security\Cryptography\SafeEvpPKeyHandle.OpenSsl.cs (6)
12internal static readonly SafeEvpPKeyHandle InvalidHandle = new SafeEvpPKeyHandle(); 65public SafeEvpPKeyHandle DuplicateHandle() 72SafeEvpPKeyHandle safeHandle = new SafeEvpPKeyHandle(); 131public static SafeEvpPKeyHandle OpenPrivateKeyFromEngine(string engineName, string keyId) 184public static SafeEvpPKeyHandle OpenPublicKeyFromEngine(string engineName, string keyId) 236public static SafeEvpPKeyHandle OpenKeyFromProvider(string providerName, string keyUri)
System\Security\Cryptography\SlhDsaImplementation.OpenSsl.cs (6)
11private SafeEvpPKeyHandle _key = null!; 13private SlhDsaImplementation(SlhDsaAlgorithm algorithm, SafeEvpPKeyHandle key) 23public SafeEvpPKeyHandle DuplicateHandle() => _key.DuplicateHandle(); 59SafeEvpPKeyHandle key = Interop.Crypto.SlhDsaGenerateKey(algorithm.Name); 100SafeEvpPKeyHandle key = Interop.Crypto.EvpPKeyFromData(algorithm.Name, source, privateKey: false); 110SafeEvpPKeyHandle key = Interop.Crypto.EvpPKeyFromData(algorithm.Name, source, privateKey: true);
System\Security\Cryptography\SlhDsaOpenSsl.cs (9)
26private readonly SafeEvpPKeyHandle _key; 33/// The OpenSSL <c>EVP_PKEY*</c> value to use as the key, represented as a <see cref="SafeEvpPKeyHandle" />. 52public SlhDsaOpenSsl(SafeEvpPKeyHandle pkeyHandle) : base(AlgorithmFromHandle(pkeyHandle, out SafeEvpPKeyHandle upRefHandle)) 57private static partial SlhDsaAlgorithm AlgorithmFromHandle(SafeEvpPKeyHandle pkeyHandle, out SafeEvpPKeyHandle upRefHandle); 60/// Gets a <see cref="SafeEvpPKeyHandle" /> representation of the cryptographic key. 62/// <returns>A <see cref="SafeEvpPKeyHandle" /> representation of the cryptographic key.</returns> 64public partial SafeEvpPKeyHandle DuplicateKeyHandle();
System\Security\Cryptography\SlhDsaOpenSsl.OpenSsl.cs (3)
14public partial SafeEvpPKeyHandle DuplicateKeyHandle() 20private static partial SlhDsaAlgorithm AlgorithmFromHandle(SafeEvpPKeyHandle pkeyHandle, out SafeEvpPKeyHandle upRefHandle)
System\Security\Cryptography\X509Certificates\OpenSslExportProvider.cs (1)
26SafeEvpPKeyHandle? privateKey = ((OpenSslX509CertificateReader)certificatePal).PrivateKeyHandle;
System\Security\Cryptography\X509Certificates\OpenSslX509CertificateReader.cs (7)
19private SafeEvpPKeyHandle? _privateKey; 541internal void SetPrivateKey(SafeEvpPKeyHandle privateKey) 546internal SafeEvpPKeyHandle? PrivateKeyHandle 573using (SafeEvpPKeyHandle publicKeyHandle = Interop.Crypto.GetX509EvpPublicKey(_cert)) 583using (SafeEvpPKeyHandle publicKeyHandle = Interop.Crypto.GetX509EvpPublicKey(_cert)) 641private OpenSslX509CertificateReader CopyWithPrivateKey(SafeEvpPKeyHandle privateKey) 854SafeEvpPKeyHandle keyHandle = _privateKey.DuplicateHandle();
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (3)
1327private static readonly bool s_defaultAbort = SafeEvpPKeyHandle.OpenSslVersion < OpenSSL_1_1_0_RTM; 1410if (SafeEvpPKeyHandle.OpenSslVersion >= 0x3_00_00_00_0) 1415if (SafeEvpPKeyHandle.OpenSslVersion >= 0x1_01_01_00_0)
System\Security\Cryptography\X509Certificates\X509CertificateLoader.OpenSsl.cs (1)
84internal static SafeEvpPKeyHandle GetPrivateKey(Pkcs12Key key)
System.Security.Cryptography.OpenSsl (1)
System.Security.Cryptography.OpenSsl.cs (1)
8[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SafeEvpPKeyHandle))]