diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs index cb68d9ad875eb..6980c28aff6c9 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs @@ -477,10 +477,6 @@ internal static SecurityStatusPalErrorCode DoSslHandshake(SafeSslHandle context, internal static int Encrypt(SafeSslHandle context, ReadOnlySpan input, ref byte[] output, out Ssl.SslErrorCode errorCode) { -#if DEBUG - ulong assertNoError = Crypto.ErrPeekError(); - Debug.Assert(assertNoError == 0, $"OpenSsl error queue is not empty, run: 'openssl errstr {assertNoError:X}' for original error."); -#endif int retVal = Ssl.SslWrite(context, ref MemoryMarshal.GetReference(input), input.Length, out errorCode); if (retVal != input.Length) @@ -521,10 +517,6 @@ internal static int Encrypt(SafeSslHandle context, ReadOnlySpan input, ref internal static int Decrypt(SafeSslHandle context, Span buffer, out Ssl.SslErrorCode errorCode) { -#if DEBUG - ulong assertNoError = Crypto.ErrPeekError(); - Debug.Assert(assertNoError == 0, $"OpenSsl error queue is not empty, run: 'openssl errstr {assertNoError:X}' for original error."); -#endif BioWrite(context.InputBio!, buffer); int retVal = Ssl.SslRead(context, ref MemoryMarshal.GetReference(buffer), buffer.Length, out errorCode);