{
sendBuf = null;
sendCount = 0;
-
+
if ((recvBuf != null) && (recvCount > 0))
{
if (BioWrite(context.InputBio, recvBuf, recvOffset, recvCount) <= 0)
GCHandle protocolHandle = GCHandle.FromIntPtr(arg);
if (!(protocolHandle.Target is List<SslApplicationProtocol> protocolList))
{
- return Ssl.SSL_TLSEXT_ERR_NOACK;
+ return Ssl.SSL_TLSEXT_ERR_ALERT_FATAL;
}
try
// It is ok to clear the handle value here, this results in handshake failure, so the SslStream object is disposed.
protocolHandle.Target = null;
- return Ssl.SSL_TLSEXT_ERR_NOACK;
+ return Ssl.SSL_TLSEXT_ERR_ALERT_FATAL;
}
// No common application protocol was negotiated, set the target on the alpnHandle to null.
// It is ok to clear the handle value here, this results in handshake failure, so the SslStream object is disposed.
protocolHandle.Target = null;
- return Ssl.SSL_TLSEXT_ERR_NOACK;
+ return Ssl.SSL_TLSEXT_ERR_ALERT_FATAL;
}
private static int BioRead(SafeBioHandle bio, byte[] buffer, int count)
{
internal const int SSL_TLSEXT_ERR_OK = 0;
internal const int OPENSSL_NPN_NEGOTIATED = 1;
+ internal const int SSL_TLSEXT_ERR_ALERT_FATAL = 2;
internal const int SSL_TLSEXT_ERR_NOACK = 3;
internal delegate int SslCtxSetVerifyCallback(int preverify_ok, IntPtr x509_ctx);