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