73 references to SslErrorCode
System.Net.Security (73)
_generated\0\LibraryImports.g.cs (24)
2479internal static partial global::Interop.Ssl.SslErrorCode SslGetError(global::Microsoft.Win32.SafeHandles.SafeSslHandle ssl, int ret) 2484global::Interop.Ssl.SslErrorCode __retVal = default; 2506static extern unsafe global::Interop.Ssl.SslErrorCode __PInvoke(nint __ssl_native, int __ret_native); 2834internal static partial int SslWrite(global::Microsoft.Win32.SafeHandles.SafeSslHandle ssl, ref byte buf, int num, out global::Interop.Ssl.SslErrorCode error) 2849fixed (global::Interop.Ssl.SslErrorCode* __error_native = &error) 2869static extern unsafe int __PInvoke(nint __ssl_native, byte* __buf_native, int __num_native, global::Interop.Ssl.SslErrorCode* __error_native); 2879internal static partial int SslRead(global::Microsoft.Win32.SafeHandles.SafeSslHandle ssl, ref byte buf, int num, out global::Interop.Ssl.SslErrorCode error) 2894fixed (global::Interop.Ssl.SslErrorCode* __error_native = &error) 2914static extern unsafe int __PInvoke(nint __ssl_native, byte* __buf_native, int __num_native, global::Interop.Ssl.SslErrorCode* __error_native); 2949internal static partial int SslRenegotiate(global::Microsoft.Win32.SafeHandles.SafeSslHandle ssl, out global::Interop.Ssl.SslErrorCode error) 2963fixed (global::Interop.Ssl.SslErrorCode* __error_native = &error) 2979static extern unsafe int __PInvoke(nint __ssl_native, global::Interop.Ssl.SslErrorCode* __error_native); 3197internal static partial int SslDoHandshake(global::Microsoft.Win32.SafeHandles.SafeSslHandle ssl, out global::Interop.Ssl.SslErrorCode error) 3212fixed (global::Interop.Ssl.SslErrorCode* __error_native = &error) 3231static extern unsafe int __PInvoke(nint __ssl_native, global::Interop.Ssl.SslErrorCode* __error_native); 3241internal static unsafe partial int SslHandshake(global::Microsoft.Win32.SafeHandles.SafeSslHandle ssl, byte* inputPtr, int inputLen, out int consumed, byte* outputPtr, int outputCap, out int outputWritten, out int outputPending, out global::Interop.Ssl.SslErrorCode errorCode) 3259fixed (global::Interop.Ssl.SslErrorCode* __errorCode_native = &errorCode) 3281static extern unsafe int __PInvoke(nint __ssl_native, byte* __inputPtr_native, int __inputLen_native, int* __consumed_native, byte* __outputPtr_native, int __outputCap_native, int* __outputWritten_native, int* __outputPending_native, global::Interop.Ssl.SslErrorCode* __errorCode_native); 3291internal static unsafe partial int SslEncrypt(global::Microsoft.Win32.SafeHandles.SafeSslHandle ssl, byte* plaintextPtr, int plaintextLen, byte* outputPtr, int outputCap, out int outputWritten, out int outputPending, out global::Interop.Ssl.SslErrorCode errorCode) 3308fixed (global::Interop.Ssl.SslErrorCode* __errorCode_native = &errorCode) 3329static extern unsafe int __PInvoke(nint __ssl_native, byte* __plaintextPtr_native, int __plaintextLen_native, byte* __outputPtr_native, int __outputCap_native, int* __outputWritten_native, int* __outputPending_native, global::Interop.Ssl.SslErrorCode* __errorCode_native); 3339internal static unsafe partial int SslDecrypt(global::Microsoft.Win32.SafeHandles.SafeSslHandle ssl, byte* inputPtr, int inputLen, out int consumed, byte* outputPtr, int outputCap, out int leftoverOffset, out int leftoverLength, out global::Interop.Ssl.SslErrorCode errorCode) 3357fixed (global::Interop.Ssl.SslErrorCode* __errorCode_native = &errorCode) 3379static extern unsafe int __PInvoke(nint __ssl_native, byte* __inputPtr_native, int __inputLen_native, int* __consumed_native, byte* __outputPtr_native, int __outputCap_native, int* __leftoverOffset_native, int* __leftoverLength_native, global::Interop.Ssl.SslErrorCode* __errorCode_native);
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (21)
689int ret = Interop.Ssl.SslRenegotiate(sslContext, out Ssl.SslErrorCode errorCode); 726Ssl.SslErrorCode errorCode; 754if (errorCode == Ssl.SslErrorCode.SSL_ERROR_WANT_X509_LOOKUP) 759if (errorCode == Ssl.SslErrorCode.SSL_ERROR_WANT_RETRY_VERIFY) 768if (errorCode == Ssl.SslErrorCode.SSL_ERROR_SSL && context.CertificateValidationException is Exception ex) 776else if ((retVal != -1) || (errorCode != Ssl.SslErrorCode.SSL_ERROR_WANT_READ)) 807if (context.IsServer && token.Size == 0 && errorCode == Ssl.SslErrorCode.SSL_ERROR_NONE && Ssl.IsSslRenegotiatePending(context)) 821internal static unsafe Ssl.SslErrorCode Encrypt(SafeSslHandle context, ReadOnlySpan<byte> input, ref ProtocolToken outToken) 839Ssl.SslErrorCode errorCode; 869case Ssl.SslErrorCode.SSL_ERROR_ZERO_RETURN: 870case Ssl.SslErrorCode.SSL_ERROR_WANT_READ: 941out Ssl.SslErrorCode errorCode) 973case Ssl.SslErrorCode.SSL_ERROR_ZERO_RETURN: 976case Ssl.SslErrorCode.SSL_ERROR_WANT_READ: 979? Ssl.SslErrorCode.SSL_ERROR_RENEGOTIATE 980: Ssl.SslErrorCode.SSL_ERROR_WANT_READ; 983case Ssl.SslErrorCode.SSL_ERROR_WANT_X509_LOOKUP: 987errorCode = Ssl.SslErrorCode.SSL_ERROR_RENEGOTIATE; 1370internal static Exception? GetSslError(int result, Ssl.SslErrorCode retVal) 1375case Ssl.SslErrorCode.SSL_ERROR_SYSCALL: 1385case Ssl.SslErrorCode.SSL_ERROR_SSL:
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (8)
33internal static partial SslErrorCode SslGetError(SafeSslHandle ssl, int ret); 79internal static partial int SslWrite(SafeSslHandle ssl, ref byte buf, int num, out SslErrorCode error); 82internal static partial int SslRead(SafeSslHandle ssl, ref byte buf, int num, out SslErrorCode error); 103internal static partial int SslRenegotiate(SafeSslHandle ssl, out SslErrorCode error); 128internal static partial int SslDoHandshake(SafeSslHandle ssl, out SslErrorCode error); 140out SslErrorCode errorCode); 151out SslErrorCode errorCode); 163out SslErrorCode errorCode);
System\Net\Security\SslStreamPal.Unix.cs (12)
76Interop.Ssl.SslErrorCode errorCode = Interop.OpenSsl.Encrypt((SafeSslHandle)securityContext, input.Span, ref token); 107out Interop.Ssl.SslErrorCode errorCode); 119private static SecurityStatusPal MapNativeErrorCode(Interop.Ssl.SslErrorCode errorCode) => 122Interop.Ssl.SslErrorCode.SSL_ERROR_RENEGOTIATE => new SecurityStatusPal(SecurityStatusPalErrorCode.Renegotiate), 123Interop.Ssl.SslErrorCode.SSL_ERROR_ZERO_RETURN => new SecurityStatusPal(SecurityStatusPalErrorCode.ContextExpired), 124Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_X509_LOOKUP => new SecurityStatusPal(SecurityStatusPalErrorCode.CredentialsNeeded), 125Interop.Ssl.SslErrorCode.SSL_ERROR_NONE or 126Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_READ => new SecurityStatusPal(SecurityStatusPalErrorCode.OK), 270Interop.Ssl.SslErrorCode code = Interop.Ssl.SslGetError((SafeSslHandle)context, status); 271if (code == Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_READ || 272code == Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_WRITE) 276else if (code == Interop.Ssl.SslErrorCode.SSL_ERROR_SSL)
System\Net\Security\TlsSession.OpenSsl.cs (8)
225int ret = Interop.Ssl.SslDoHandshake(ssl, out Interop.Ssl.SslErrorCode err); 249int ret = Interop.Ssl.SslRead(ssl, ref MemoryMarshal.GetReference(buffer), buffer.Length, out Interop.Ssl.SslErrorCode err); 273int ret = Interop.Ssl.SslWrite(ssl, ref MemoryMarshal.GetReference(buffer), buffer.Length, out Interop.Ssl.SslErrorCode err); 303private static TlsOperationStatus MapSslError(Interop.Ssl.SslErrorCode error, int result, string sslErrorTemplate) 307Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_READ => TlsOperationStatus.NeedMoreData, 308Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_WRITE => TlsOperationStatus.DestinationTooSmall, 309Interop.Ssl.SslErrorCode.SSL_ERROR_ZERO_RETURN => TlsOperationStatus.Closed, 314private static Interop.OpenSsl.SslException CreateDiagnosticSslException(Interop.Ssl.SslErrorCode error, int result, string sslErrorTemplate)