34 references to SafeSslContextHandle
System.Net.Security (34)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (12)
28private sealed class SafeSslContextCache : SafeHandleCache<SslContextCacheKey, SafeSslContextHandle> { } 151internal static SafeSslContextHandle GetOrCreateSslContextHandle(SslAuthenticationOptions sslAuthenticationOptions, bool allowCached) 176SafeSslContextHandle? handle = AllocateSslContext(sslAuthenticationOptions, protocols, allowCached); 183SafeSslContextHandle cached = sslAuthenticationOptions.CertificateContext!.SslContexts!.GetOrAdd(protocols | (hasAlpn ? FakeAlpnSslProtocol : SslProtocols.None), handle); 200internal static unsafe SafeSslContextHandle AllocateSslContext(SslAuthenticationOptions sslAuthenticationOptions, SslProtocols protocols, bool enableResume) 205SafeSslContextHandle sslCtx = Ssl.SslCtxCreate(Ssl.SslMethods.SSLv23_method); 380using SafeSslContextHandle sslCtxHandle = GetOrCreateSslContextHandle(sslAuthenticationOptions, cacheSslContext); 781SafeSslContextHandle? ctxHandle = gch.Target as SafeSslContextHandle; 808SafeSslContextHandle? ctxHandle = gch.Target as SafeSslContextHandle; 877private static void SetSslCertificate(SafeSslContextHandle contextPtr, SafeX509Handle certPtr, SafeEvpPKeyHandle keyPtr)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SetProtocolOptions.cs (1)
17internal static partial void SslCtxSetProtocolOptions(SafeSslContextHandle ctx, SslProtocols protocols);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (3)
29internal static partial SafeSslHandle SslCreate(SafeSslContextHandle ctx); 355public SafeSslContextHandle? SslContextHandle; 383public static SafeSslHandle Create(SafeSslContextHandle context, bool isServer)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtx.cs (7)
21internal static partial SafeSslContextHandle SslCtxCreate(IntPtr method); 30internal static partial int SslCtxSetData(SafeSslContextHandle ctx, IntPtr data); 36internal static unsafe partial void SslCtxSetAlpnSelectCb(SafeSslContextHandle ctx, delegate* unmanaged<IntPtr, byte**, byte*, byte*, uint, IntPtr, int> callback, IntPtr arg); 39internal static unsafe partial void SslCtxSetKeylogCallback(SafeSslContextHandle ctx, delegate* unmanaged<IntPtr, char*, void> callback); 42internal static unsafe partial int SslCtxSetCaching(SafeSslContextHandle ctx, int mode, int cacheSize, int contextIdLength, Span<byte> contextId, delegate* unmanaged<IntPtr, IntPtr, int> neewSessionCallback, delegate* unmanaged<IntPtr, IntPtr, void> removeSessionCallback); 45internal static unsafe partial void SslCtxRemoveSession(SafeSslContextHandle ctx, IntPtr session); 47internal static bool AddExtraChainCertificates(SafeSslContextHandle ctx, ReadOnlyCollection<X509Certificate2> chain)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtxOptions.cs (8)
16internal static partial bool SslCtxAddExtraChainCert(SafeSslContextHandle ctx, SafeX509Handle x509); 19internal static partial int SslCtxUseCertificate(SafeSslContextHandle ctx, SafeX509Handle certPtr); 22internal static partial int SslCtxUsePrivateKey(SafeSslContextHandle ctx, SafeEvpPKeyHandle keyPtr); 25internal static partial int SslCtxCheckPrivateKey(SafeSslContextHandle ctx); 28internal static partial void SslCtxSetQuietShutdown(SafeSslContextHandle ctx); 32internal static unsafe partial bool SslCtxSetCiphers(SafeSslContextHandle ctx, byte* cipherList, byte* cipherSuites); 36internal static partial bool SetEncryptionPolicy(SafeSslContextHandle ctx, EncryptionPolicy policy); 39internal static partial void SslCtxSetDefaultOcspCallback(SafeSslContextHandle ctx);
System\Net\Security\CipherSuitesPolicyPal.Linux.cs (1)
30using (SafeSslContextHandle innerContext = Ssl.SslCtxCreate(Ssl.SslMethods.SSLv23_method))
System\Net\Security\SslStreamCertificateContext.Linux.cs (2)
26internal readonly ConcurrentDictionary<SslProtocols, SafeSslContextHandle> SslContexts; 60SslContexts = new ConcurrentDictionary<SslProtocols, SafeSslContextHandle>();