3 instantiations of SafeEvpPKeyHandle
System.Security.Cryptography (3)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.cs (1)
310
return new
SafeEvpPKeyHandle
(evpPKeyHandle, extraHandle: extraHandle);
System\Security\Cryptography\SafeEvpPKeyHandle.OpenSsl.cs (2)
12
internal static readonly SafeEvpPKeyHandle InvalidHandle = new
SafeEvpPKeyHandle
();
72
SafeEvpPKeyHandle 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)
31
internal static partial
SafeEvpPKeyHandle
GetX509EvpPublicKey(SafeX509Handle x509);
System.Net.Security (5)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (1)
885
private static void SetSslCertificate(SafeSslContextHandle contextPtr, SafeX509Handle certPtr,
SafeEvpPKeyHandle
keyPtr)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (1)
174
internal static partial int SslUsePrivateKey(SafeSslHandle ssl,
SafeEvpPKeyHandle
keyPtr);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtxOptions.cs (1)
22
internal static partial int SslCtxUsePrivateKey(SafeSslContextHandle ctx,
SafeEvpPKeyHandle
keyPtr);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509.cs (1)
31
internal static partial
SafeEvpPKeyHandle
GetX509EvpPublicKey(SafeX509Handle x509);
System\Net\Security\SslStreamCertificateContext.Linux.cs (1)
45
internal readonly
SafeEvpPKeyHandle
KeyHandle;
System.Security.Cryptography (144)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.cs (21)
14
internal static partial
SafeEvpPKeyHandle
EvpPkeyCreate();
20
internal static partial int EvpPKeyBits(
SafeEvpPKeyHandle
pkey);
22
internal static int GetEvpPKeySizeBytes(
SafeEvpPKeyHandle
pkey)
40
private static partial int UpRefEvpPkey(
SafeEvpPKeyHandle
handle, IntPtr extraHandle);
42
internal static int UpRefEvpPkey(
SafeEvpPKeyHandle
handle)
48
internal static partial EvpAlgorithmId EvpPKeyType(
SafeEvpPKeyHandle
handle);
51
private static unsafe partial
SafeEvpPKeyHandle
CryptoNative_DecodeSubjectPublicKeyInfo(
57
private static unsafe partial
SafeEvpPKeyHandle
CryptoNative_DecodePkcs8PrivateKey(
62
internal static unsafe
SafeEvpPKeyHandle
DecodeSubjectPublicKeyInfo(
66
SafeEvpPKeyHandle
handle;
85
internal static unsafe
SafeEvpPKeyHandle
DecodePkcs8PrivateKey(
89
SafeEvpPKeyHandle
handle;
136
internal static ArraySegment<byte> RentEncodePkcs8PrivateKey(
SafeEvpPKeyHandle
pkey)
187
internal static ArraySegment<byte> RentEncodeSubjectPublicKeyInfo(
SafeEvpPKeyHandle
pkey)
221
private static partial
SafeEvpPKeyHandle
CryptoNative_LoadPrivateKeyFromEngine(
226
internal static
SafeEvpPKeyHandle
LoadPrivateKeyFromEngine(
233
SafeEvpPKeyHandle
pkey = CryptoNative_LoadPrivateKeyFromEngine(engineName, keyName, out bool haveEngine);
251
private static partial
SafeEvpPKeyHandle
CryptoNative_LoadPublicKeyFromEngine(
256
internal static
SafeEvpPKeyHandle
LoadPublicKeyFromEngine(
263
SafeEvpPKeyHandle
pkey = CryptoNative_LoadPublicKeyFromEngine(engineName, keyName, out bool haveEngine);
287
internal static
SafeEvpPKeyHandle
LoadKeyFromProvider(
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Dsa.cs (2)
13
internal static partial SafeDsaHandle EvpPkeyGetDsa(
SafeEvpPKeyHandle
pkey);
17
internal static partial bool EvpPkeySetDsa(
SafeEvpPKeyHandle
pkey, SafeDsaHandle key);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Ecdh.cs (4)
16
SafeEvpPKeyHandle
pkey,
18
SafeEvpPKeyHandle
peerKey,
22
internal 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)
16
SafeEvpPKeyHandle
pkey,
24
SafeEvpPKeyHandle
pkey,
47
SafeEvpPKeyHandle
pkey,
55
SafeEvpPKeyHandle
pkey,
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.EcKey.cs (4)
13
internal static partial SafeEcKeyHandle EvpPkeyGetEcKey(
SafeEvpPKeyHandle
pkey);
17
private static partial bool CryptoNative_EvpPkeySetEcKey(
SafeEvpPKeyHandle
pkey, SafeEcKeyHandle key);
20
internal static
SafeEvpPKeyHandle
CreateEvpPkeyFromEcKey(SafeEcKeyHandle key)
22
SafeEvpPKeyHandle
pkey = Interop.Crypto.EvpPkeyCreate();
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Rsa.cs (14)
15
private static partial
SafeEvpPKeyHandle
CryptoNative_EvpPKeyCreateRsa(IntPtr rsa);
17
internal static
SafeEvpPKeyHandle
EvpPKeyCreateRsa(IntPtr rsa)
21
SafeEvpPKeyHandle
pkey = CryptoNative_EvpPKeyCreateRsa(rsa);
33
private static partial
SafeEvpPKeyHandle
CryptoNative_RsaGenerateKey(int keySize);
35
internal static
SafeEvpPKeyHandle
RsaGenerateKey(int keySize)
37
SafeEvpPKeyHandle
pkey = CryptoNative_RsaGenerateKey(keySize);
50
SafeEvpPKeyHandle
pkey,
60
SafeEvpPKeyHandle
pkey,
87
SafeEvpPKeyHandle
pkey,
97
SafeEvpPKeyHandle
pkey,
124
SafeEvpPKeyHandle
pkey,
134
SafeEvpPKeyHandle
pkey,
165
SafeEvpPKeyHandle
pkey,
175
SafeEvpPKeyHandle
pkey,
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509.cs (1)
31
internal static partial
SafeEvpPKeyHandle
GetX509EvpPublicKey(SafeX509Handle x509);
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.cs (7)
12
private 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));
153
SafeEvpPKeyHandle
handle = _key.Value;
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.Derive.cs (2)
116
SafeEvpPKeyHandle
? ourKey = _key.Value;
119
SafeEvpPKeyHandle
? theirKey = null;
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSslPublicKey.cs (2)
13
internal ECDiffieHellmanOpenSslPublicKey(
SafeEvpPKeyHandle
pkeyHandle)
80
internal
SafeEvpPKeyHandle
DuplicateKeyHandle()
src\libraries\Common\src\System\Security\Cryptography\ECDsaOpenSsl.cs (14)
18
private Lazy<
SafeEvpPKeyHandle
>? _key;
33
_key = new Lazy<
SafeEvpPKeyHandle
>(ECOpenSsl.GenerateECKey(curve, out int keySize));
63
_key = new Lazy<
SafeEvpPKeyHandle
>(GenerateKeyFromSize);
87
SafeEvpPKeyHandle
key = GetKey();
125
SafeEvpPKeyHandle
key = GetKey();
138
SafeEvpPKeyHandle
key = GetKey();
209
SafeEvpPKeyHandle
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));
273
private
SafeEvpPKeyHandle
GetKey()
277
SafeEvpPKeyHandle
key = _key.Value;
287
private
SafeEvpPKeyHandle
GenerateKeyFromSize()
334
SafeEvpPKeyHandle
handle = _key.Value;
src\libraries\Common\src\System\Security\Cryptography\ECOpenSsl.cs (7)
43
internal
SafeEvpPKeyHandle
CreateEvpPKeyHandle()
118
internal static
SafeEvpPKeyHandle
GenerateECKey(int keySize)
120
SafeEvpPKeyHandle
ret = ImportECKeyCore(new ECOpenSsl(keySize), out int createdKeySize);
125
internal static
SafeEvpPKeyHandle
GenerateECKey(ECCurve curve, out int keySize)
130
internal static
SafeEvpPKeyHandle
ImportECKey(ECParameters parameters, out int keySize)
136
private static
SafeEvpPKeyHandle
ImportECKeyCore(ECOpenSsl ecOpenSsl, out int keySize)
140
SafeEvpPKeyHandle
handle = Interop.Crypto.CreateEvpPkeyFromEcKey(ec.Value);
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (24)
18
private Lazy<
SafeEvpPKeyHandle
>? _key;
39
_key = new Lazy<
SafeEvpPKeyHandle
>(GenerateKey);
56
_key = new Lazy<
SafeEvpPKeyHandle
>(GenerateKey);
88
SafeEvpPKeyHandle
key = GetKey();
116
SafeEvpPKeyHandle
key = GetKey();
168
SafeEvpPKeyHandle
key,
211
SafeEvpPKeyHandle
key = GetKey();
236
SafeEvpPKeyHandle
key = GetKey();
242
SafeEvpPKeyHandle
key,
285
SafeEvpPKeyHandle
key = GetKey();
303
SafeEvpPKeyHandle
key = GetKey();
322
SafeEvpPKeyHandle
key = GetKey();
342
SafeEvpPKeyHandle
key = GetKey();
543
SafeEvpPKeyHandle
newKey = Interop.Crypto.DecodeSubjectPublicKeyInfo(
590
SafeEvpPKeyHandle
newKey = Interop.Crypto.DecodePkcs8PrivateKey(
649
SafeEvpPKeyHandle
handle = _key.Value;
655
private void SetKey(
SafeEvpPKeyHandle
newKey)
658
_key = new Lazy<
SafeEvpPKeyHandle
>(newKey);
708
private
SafeEvpPKeyHandle
GetKey()
712
SafeEvpPKeyHandle
key = _key.Value;
722
private
SafeEvpPKeyHandle
GenerateKey()
734
SafeEvpPKeyHandle
key = GetKey();
760
SafeEvpPKeyHandle
key = GetKey();
792
SafeEvpPKeyHandle
key = GetKey();
System\Security\Cryptography\DSAOpenSsl.cs (4)
25
/// Create an DSAOpenSsl from an <see cref="
SafeEvpPKeyHandle
"/> whose value is an existing
39
public DSAOpenSsl(
SafeEvpPKeyHandle
pkeyHandle)
88
public
SafeEvpPKeyHandle
DuplicateKeyHandle()
91
SafeEvpPKeyHandle
pkeyHandle = Interop.Crypto.EvpPkeyCreate();
System\Security\Cryptography\ECDiffieHellmanOpenSsl.cs (5)
13
/// Create an ECDiffieHellmanOpenSsl from an <see cref="
SafeEvpPKeyHandle
"/> whose value is an existing
25
public ECDiffieHellmanOpenSsl(
SafeEvpPKeyHandle
pkeyHandle)
39
_key = new Lazy<
SafeEvpPKeyHandle
>(pkeyHandle.DuplicateHandle());
68
_key = new Lazy<
SafeEvpPKeyHandle
>(Interop.Crypto.CreateEvpPkeyFromEcKey(ecKeyHandle));
79
public
SafeEvpPKeyHandle
DuplicateKeyHandle()
System\Security\Cryptography\ECDsaOpenSsl.cs (5)
13
/// Create an ECDsaOpenSsl from an <see cref="
SafeEvpPKeyHandle
"/> whose value is an existing
25
public ECDsaOpenSsl(
SafeEvpPKeyHandle
pkeyHandle)
39
_key = new Lazy<
SafeEvpPKeyHandle
>(pkeyHandle.DuplicateHandle());
68
_key = new Lazy<
SafeEvpPKeyHandle
>(Interop.Crypto.CreateEvpPkeyFromEcKey(ecKeyHandle));
79
public
SafeEvpPKeyHandle
DuplicateKeyHandle()
System\Security\Cryptography\RSAOpenSsl.cs (6)
22
_key = new Lazy<
SafeEvpPKeyHandle
>();
47
SafeEvpPKeyHandle
pkey = Interop.Crypto.EvpPKeyCreateRsa(handle);
54
/// Create an RSAOpenSsl from an <see cref="
SafeEvpPKeyHandle
"/> whose value is an existing
68
public RSAOpenSsl(
SafeEvpPKeyHandle
pkeyHandle)
82
SafeEvpPKeyHandle
newKey = pkeyHandle.DuplicateHandle();
91
public
SafeEvpPKeyHandle
DuplicateKeyHandle()
System\Security\Cryptography\SafeEvpPKeyHandle.OpenSsl.cs (6)
12
internal static readonly
SafeEvpPKeyHandle
InvalidHandle = new SafeEvpPKeyHandle();
65
public
SafeEvpPKeyHandle
DuplicateHandle()
72
SafeEvpPKeyHandle
safeHandle = new SafeEvpPKeyHandle();
131
public static
SafeEvpPKeyHandle
OpenPrivateKeyFromEngine(string engineName, string keyId)
184
public static
SafeEvpPKeyHandle
OpenPublicKeyFromEngine(string engineName, string keyId)
236
public static
SafeEvpPKeyHandle
OpenKeyFromProvider(string providerName, string keyUri)
System\Security\Cryptography\X509Certificates\OpenSslExportProvider.cs (1)
25
SafeEvpPKeyHandle
? privateKey = ((OpenSslX509CertificateReader)certificatePal).PrivateKeyHandle;
System\Security\Cryptography\X509Certificates\OpenSslX509CertificateReader.cs (7)
19
private
SafeEvpPKeyHandle
? _privateKey;
541
internal void SetPrivateKey(
SafeEvpPKeyHandle
privateKey)
546
internal
SafeEvpPKeyHandle
? PrivateKeyHandle
573
using (
SafeEvpPKeyHandle
publicKeyHandle = Interop.Crypto.GetX509EvpPublicKey(_cert))
583
using (
SafeEvpPKeyHandle
publicKeyHandle = Interop.Crypto.GetX509EvpPublicKey(_cert))
611
private OpenSslX509CertificateReader CopyWithPrivateKey(
SafeEvpPKeyHandle
privateKey)
772
SafeEvpPKeyHandle
keyHandle = _privateKey.DuplicateHandle();
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (3)
1326
private static readonly bool s_defaultAbort =
SafeEvpPKeyHandle
.OpenSslVersion < OpenSSL_1_1_0_RTM;
1409
if (
SafeEvpPKeyHandle
.OpenSslVersion >= 0x3_00_00_00_0)
1414
if (
SafeEvpPKeyHandle
.OpenSslVersion >= 0x1_01_01_00_0)
System\Security\Cryptography\X509Certificates\X509CertificateLoader.OpenSsl.cs (1)
73
internal 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
))]