90 references to SafeSslHandle
System.Net.Security (90)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (13)
95
internal static SafeChannelBindingHandle? QueryChannelBinding(
SafeSslHandle
context, ChannelBindingKind bindingType)
313
internal static void UpdateClientCertificate(
SafeSslHandle
ssl, SslAuthenticationOptions sslAuthenticationOptions)
348
internal static
SafeSslHandle
AllocateSslHandle(SslAuthenticationOptions sslAuthenticationOptions)
350
SafeSslHandle
? sslHandle = null;
393
sslHandle =
SafeSslHandle
.Create(sslCtxHandle, sslAuthenticationOptions.IsServer);
594
internal static unsafe void ConfigureSignatureAlgorithms(
SafeSslHandle
sslHandle, bool enablePss, bool enablePkcs1)
662
internal static SecurityStatusPal SslRenegotiate(
SafeSslHandle
sslContext, out byte[]? outputBuffer)
674
internal static SecurityStatusPalErrorCode DoSslHandshake(
SafeSslHandle
context, ReadOnlySpan<byte> input, ref ProtocolToken token)
755
internal static Ssl.SslErrorCode Encrypt(
SafeSslHandle
context, ReadOnlySpan<byte> input, ref ProtocolToken outToken)
794
internal static int Decrypt(
SafeSslHandle
context, Span<byte> buffer, out Ssl.SslErrorCode errorCode)
831
internal static IntPtr GetPeerCertificate(
SafeSslHandle
context)
836
internal static SafeSharedX509StackHandle GetPeerCertificateChain(
SafeSslHandle
context)
845
private static void QueryUniqueChannelBinding(
SafeSslHandle
context, SafeChannelBindingHandle bindingHandle)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (52)
29
internal static partial
SafeSslHandle
SslCreate(SafeSslContextHandle ctx);
32
internal static partial SslErrorCode SslGetError(
SafeSslHandle
ssl, int ret);
38
internal static partial void SslSetQuietShutdown(
SafeSslHandle
ssl, int mode);
44
internal static partial void SslSetConnectState(
SafeSslHandle
ssl);
47
internal static partial void SslSetAcceptState(
SafeSslHandle
ssl);
50
internal static unsafe partial int SslSetAlpnProtos(
SafeSslHandle
ssl, byte* protos, int len);
53
internal static partial IntPtr SslGetVersion(
SafeSslHandle
ssl);
57
internal static partial bool SslSetTlsExtHostName(
SafeSslHandle
ssl, string host);
63
internal static unsafe partial int SslSetSession(
SafeSslHandle
ssl, IntPtr session);
66
internal static partial void SslGetAlpnSelected(
SafeSslHandle
ssl, out IntPtr protocol, out int len);
68
internal static unsafe ReadOnlySpan<byte> SslGetAlpnSelected(
SafeSslHandle
ssl)
81
internal static partial int SslWrite(
SafeSslHandle
ssl, ref byte buf, int num, out SslErrorCode error);
84
internal static partial int SslRead(
SafeSslHandle
ssl, ref byte buf, int num, out SslErrorCode error);
105
internal static partial int SslRenegotiate(
SafeSslHandle
ssl, out SslErrorCode error);
109
internal static partial bool IsSslRenegotiatePending(
SafeSslHandle
ssl);
115
internal static partial int SslShutdown(
SafeSslHandle
ssl);
118
internal static partial void SslSetBio(
SafeSslHandle
ssl, SafeBioHandle rbio, SafeBioHandle wbio);
121
internal static partial int SslDoHandshake(
SafeSslHandle
ssl, out SslErrorCode error);
125
internal static partial bool IsSslStateOK(
SafeSslHandle
ssl);
135
internal static partial IntPtr SslGetPeerCertificate(
SafeSslHandle
ssl);
138
internal static partial IntPtr SslGetCertificate(
SafeSslHandle
ssl);
144
private static partial SafeSharedX509StackHandle SslGetPeerCertChain_private(
SafeSslHandle
ssl);
146
internal static SafeSharedX509StackHandle SslGetPeerCertChain(
SafeSslHandle
ssl)
154
internal static partial int SslGetPeerFinished(
SafeSslHandle
ssl, IntPtr buf, int count);
157
internal static partial int SslGetFinished(
SafeSslHandle
ssl, IntPtr buf, int count);
161
internal static partial bool SslSessionReused(
SafeSslHandle
ssl);
164
internal static partial IntPtr SslGetSession(
SafeSslHandle
ssl);
167
private static partial SafeSharedX509NameStackHandle SslGetClientCAList_private(
SafeSslHandle
ssl);
171
internal static partial bool SslGetCurrentCipherId(
SafeSslHandle
ssl, out int cipherId);
174
private static partial IntPtr GetOpenSslCipherSuiteName(
SafeSslHandle
ssl, int cipherSuite, out int isTls12OrLower);
178
internal static unsafe partial bool SslSetCiphers(
SafeSslHandle
ssl, byte* cipherList, byte* cipherSuites);
181
internal static partial void SslSetVerifyPeer(
SafeSslHandle
ssl);
187
internal static partial IntPtr SslGetData(
SafeSslHandle
ssl);
190
internal static partial int SslSetData(
SafeSslHandle
ssl, IntPtr data);
196
internal static partial int SslUseCertificate(
SafeSslHandle
ssl, SafeX509Handle certPtr);
199
internal static partial int SslUsePrivateKey(
SafeSslHandle
ssl, SafeEvpPKeyHandle keyPtr);
202
internal static unsafe partial void SslSetClientCertCallback(
SafeSslHandle
ssl, int set);
205
internal static partial void SslSetPostHandshakeAuth(
SafeSslHandle
ssl, int value);
208
internal static unsafe partial int SslSetSigalgs(
SafeSslHandle
ssl, byte* str);
211
internal static unsafe partial int SslSetClientSigalgs(
SafeSslHandle
ssl, byte* str);
267
internal static unsafe int SslSetAlpnProtos(
SafeSslHandle
ssl, List<SslApplicationProtocol> applicationProtocols)
275
internal static unsafe int SslSetAlpnProtos(
SafeSslHandle
ssl, Span<byte> serializedProtocols)
285
internal static partial bool SslAddExtraChainCert(
SafeSslHandle
ssl, SafeX509Handle x509);
289
private static unsafe partial bool SslAddClientCAs(
SafeSslHandle
ssl, IntPtr* x509s, int count);
291
internal static unsafe bool SslAddClientCAs(
SafeSslHandle
ssl, Span<IntPtr> x509handles)
300
private static unsafe partial void CryptoNative_SslStapleOcsp(
SafeSslHandle
ssl, byte* buf, int len);
302
internal static unsafe void SslStapleOcsp(
SafeSslHandle
ssl, ReadOnlySpan<byte> stapledResponse)
312
internal static bool AddExtraChainCertificates(
SafeSslHandle
ssl, ReadOnlyCollection<X509Certificate2> chain)
331
internal static string? GetOpenSslCipherSuiteName(
SafeSslHandle
ssl, TlsCipherSuite cipherSuite, out bool isTls12OrLower)
338
internal static SafeSharedX509NameStackHandle SslGetClientCAList(
SafeSslHandle
ssl)
416
public static
SafeSslHandle
Create(SafeSslContextHandle context, bool isServer)
420
SafeSslHandle
handle = Interop.Ssl.SslCreate(context);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtx.cs (1)
247
internal bool TrySetSession(
SafeSslHandle
sslHandle, string name)
System\Net\CertificateValidationPal.Unix.cs (4)
39
IntPtr remoteCertificate = Interop.OpenSsl.GetPeerCertificate((
SafeSslHandle
)securityContext);
58
Interop.OpenSsl.GetPeerCertificateChain((
SafeSslHandle
)securityContext))
100
if (ctx is not
SafeSslHandle
ssl)
141
using (SafeSharedX509NameStackHandle names = Interop.Ssl.SslGetClientCAList((
SafeSslHandle
)securityContext))
System\Net\Security\CipherSuitesPolicyPal.Linux.cs (2)
37
using (
SafeSslHandle
ssl =
SafeSslHandle
.Create(innerContext, false))
System\Net\Security\SslConnectionInfo.Linux.cs (2)
11
public void UpdateSslConnectionInfo(
SafeSslHandle
sslContext)
37
private static TlsCipherSuite SslGetCurrentCipherSuite(
SafeSslHandle
ssl)
System\Net\Security\SslStreamPal.Unix.cs (16)
69
Interop.Ssl.SslErrorCode errorCode = Interop.OpenSsl.Encrypt((
SafeSslHandle
)securityContext, input.Span, ref token);
87
int resultSize = Interop.OpenSsl.Decrypt((
SafeSslHandle
)securityContext, buffer, out Interop.Ssl.SslErrorCode errorCode);
132
(
SafeSslHandle
)securityContext,
144
SecurityStatusPal status = Interop.OpenSsl.SslRenegotiate((
SafeSslHandle
)context, out _);
160
connectionInfo.UpdateSslConnectionInfo((
SafeSslHandle
)securityContext);
168
Interop.OpenSsl.UpdateClientCertificate((
SafeSslHandle
)context!, sslAuthenticationOptions);
187
SecurityStatusPalErrorCode errorCode = Interop.OpenSsl.DoSslHandshake((
SafeSslHandle
)context, inputBuffer, ref token);
207
errorCode = Interop.OpenSsl.DoSslHandshake((
SafeSslHandle
)context, ReadOnlySpan<byte>.Empty, ref token);
212
if (token.Size == 0 && Interop.Ssl.IsSslRenegotiatePending((
SafeSslHandle
)context))
214
errorCode = Interop.OpenSsl.DoSslHandshake((
SafeSslHandle
)context, ReadOnlySpan<byte>.Empty, ref token);
221
SafeSslHandle
sslContext = (
SafeSslHandle
)context;
252
Interop.Ssl.SslSetQuietShutdown((
SafeSslHandle
)context, 0);
254
int status = Interop.Ssl.SslShutdown((
SafeSslHandle
)context);
258
status = Interop.Ssl.SslShutdown((
SafeSslHandle
)context);
264
Interop.Ssl.SslErrorCode code = Interop.Ssl.SslGetError((
SafeSslHandle
)context, status);