37 references to SslErrorCode
System.Net.Security (37)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (19)
664int ret = Interop.Ssl.SslRenegotiate(sslContext, out Ssl.SslErrorCode errorCode); 688int retVal = Ssl.SslDoHandshake(context, out Ssl.SslErrorCode errorCode); 691if (errorCode == Ssl.SslErrorCode.SSL_ERROR_WANT_X509_LOOKUP) 696if ((retVal != -1) || (errorCode != Ssl.SslErrorCode.SSL_ERROR_WANT_READ)) 741if (context.IsServer && token.Size == 0 && errorCode == Ssl.SslErrorCode.SSL_ERROR_NONE && Ssl.IsSslRenegotiatePending(context)) 755internal static Ssl.SslErrorCode Encrypt(SafeSslHandle context, ReadOnlySpan<byte> input, ref ProtocolToken outToken) 757int retVal = Ssl.SslWrite(context, ref MemoryMarshal.GetReference(input), input.Length, out Ssl.SslErrorCode errorCode); 765case Ssl.SslErrorCode.SSL_ERROR_ZERO_RETURN: 766case Ssl.SslErrorCode.SSL_ERROR_WANT_READ: 794internal static int Decrypt(SafeSslHandle context, Span<byte> buffer, out Ssl.SslErrorCode errorCode) 807case Ssl.SslErrorCode.SSL_ERROR_ZERO_RETURN: 810case Ssl.SslErrorCode.SSL_ERROR_WANT_READ: 813? Ssl.SslErrorCode.SSL_ERROR_RENEGOTIATE 814: Ssl.SslErrorCode.SSL_ERROR_WANT_READ; 817case Ssl.SslErrorCode.SSL_ERROR_WANT_X509_LOOKUP: 821errorCode = Ssl.SslErrorCode.SSL_ERROR_RENEGOTIATE; 1018private static Exception? GetSslError(int result, Ssl.SslErrorCode retVal) 1023case Ssl.SslErrorCode.SSL_ERROR_SYSCALL: 1033case Ssl.SslErrorCode.SSL_ERROR_SSL:
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (6)
32internal static partial SslErrorCode SslGetError(SafeSslHandle ssl, int ret); 35internal static partial SslErrorCode SslGetError(IntPtr ssl, int ret); 81internal static partial int SslWrite(SafeSslHandle ssl, ref byte buf, int num, out SslErrorCode error); 84internal static partial int SslRead(SafeSslHandle ssl, ref byte buf, int num, out SslErrorCode error); 105internal static partial int SslRenegotiate(SafeSslHandle ssl, out SslErrorCode error); 121internal static partial int SslDoHandshake(SafeSslHandle ssl, out SslErrorCode error);
System\Net\Security\SslStreamPal.Unix.cs (12)
69Interop.Ssl.SslErrorCode errorCode = Interop.OpenSsl.Encrypt((SafeSslHandle)securityContext, input.Span, ref token); 87int resultSize = Interop.OpenSsl.Decrypt((SafeSslHandle)securityContext, buffer, out Interop.Ssl.SslErrorCode errorCode); 105private static SecurityStatusPal MapNativeErrorCode(Interop.Ssl.SslErrorCode errorCode) => 108Interop.Ssl.SslErrorCode.SSL_ERROR_RENEGOTIATE => new SecurityStatusPal(SecurityStatusPalErrorCode.Renegotiate), 109Interop.Ssl.SslErrorCode.SSL_ERROR_ZERO_RETURN => new SecurityStatusPal(SecurityStatusPalErrorCode.ContextExpired), 110Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_X509_LOOKUP => new SecurityStatusPal(SecurityStatusPalErrorCode.CredentialsNeeded), 111Interop.Ssl.SslErrorCode.SSL_ERROR_NONE or 112Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_READ => new SecurityStatusPal(SecurityStatusPalErrorCode.OK), 264Interop.Ssl.SslErrorCode code = Interop.Ssl.SslGetError((SafeSslHandle)context, status); 265if (code == Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_READ || 266code == Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_WRITE) 270else if (code == Interop.Ssl.SslErrorCode.SSL_ERROR_SSL)