3 instantiations of SafeEvpPKeyHandle
System.Security.Cryptography (3)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.cs (1)
310return new SafeEvpPKeyHandle(evpPKeyHandle, extraHandle: extraHandle);
System\Security\Cryptography\SafeEvpPKeyHandle.OpenSsl.cs (2)
12internal static readonly SafeEvpPKeyHandle InvalidHandle = new SafeEvpPKeyHandle(); 72SafeEvpPKeyHandle safeHandle = new SafeEvpPKeyHandle();
151 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)
885private static void SetSslCertificate(SafeSslContextHandle contextPtr, SafeX509Handle certPtr, SafeEvpPKeyHandle keyPtr)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (1)
174internal 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)
45internal readonly SafeEvpPKeyHandle KeyHandle;
System.Security.Cryptography (144)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.cs (21)
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); 51private static unsafe partial SafeEvpPKeyHandle CryptoNative_DecodeSubjectPublicKeyInfo( 57private static unsafe partial SafeEvpPKeyHandle CryptoNative_DecodePkcs8PrivateKey( 62internal static unsafe SafeEvpPKeyHandle DecodeSubjectPublicKeyInfo( 66SafeEvpPKeyHandle handle; 85internal static unsafe SafeEvpPKeyHandle DecodePkcs8PrivateKey( 89SafeEvpPKeyHandle handle; 136internal static ArraySegment<byte> RentEncodePkcs8PrivateKey(SafeEvpPKeyHandle pkey) 187internal static ArraySegment<byte> RentEncodeSubjectPublicKeyInfo(SafeEvpPKeyHandle pkey) 221private static partial SafeEvpPKeyHandle CryptoNative_LoadPrivateKeyFromEngine( 226internal static SafeEvpPKeyHandle LoadPrivateKeyFromEngine( 233SafeEvpPKeyHandle pkey = CryptoNative_LoadPrivateKeyFromEngine(engineName, keyName, out bool haveEngine); 251private static partial SafeEvpPKeyHandle CryptoNative_LoadPublicKeyFromEngine( 256internal static SafeEvpPKeyHandle LoadPublicKeyFromEngine( 263SafeEvpPKeyHandle pkey = CryptoNative_LoadPublicKeyFromEngine(engineName, keyName, out bool haveEngine); 287internal 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.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.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)); 153SafeEvpPKeyHandle handle = _key.Value;
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.Derive.cs (2)
116SafeEvpPKeyHandle? ourKey = _key.Value; 119SafeEvpPKeyHandle? theirKey = null;
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSslPublicKey.cs (2)
13internal ECDiffieHellmanOpenSslPublicKey(SafeEvpPKeyHandle pkeyHandle) 80internal 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() 334SafeEvpPKeyHandle 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\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\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\X509Certificates\OpenSslExportProvider.cs (1)
25SafeEvpPKeyHandle? 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)) 611private OpenSslX509CertificateReader CopyWithPrivateKey(SafeEvpPKeyHandle privateKey) 772SafeEvpPKeyHandle keyHandle = _privateKey.DuplicateHandle();
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (3)
1326private static readonly bool s_defaultAbort = SafeEvpPKeyHandle.OpenSslVersion < OpenSSL_1_1_0_RTM; 1409if (SafeEvpPKeyHandle.OpenSslVersion >= 0x3_00_00_00_0) 1414if (SafeEvpPKeyHandle.OpenSslVersion >= 0x1_01_01_00_0)
System\Security\Cryptography\X509Certificates\X509CertificateLoader.OpenSsl.cs (1)
73internal static SafeEvpPKeyHandle GetPrivateKey(AsymmetricAlgorithm key)
System.Security.Cryptography.OpenSsl (1)
System.Security.Cryptography.OpenSsl.cs (1)
8[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SafeEvpPKeyHandle))]