make sure that the unrecognized_name alert actually gets sent
authorBodo Möller <bodo@openssl.org>
Sat, 7 Jan 2006 20:29:50 +0000 (20:29 +0000)
committerBodo Möller <bodo@openssl.org>
Sat, 7 Jan 2006 20:29:50 +0000 (20:29 +0000)
Submitted by: Peter Sylvester

ssl/s3_enc.c
ssl/t1_enc.c

index 561a984..e8caf96 100644 (file)
@@ -709,6 +709,7 @@ int ssl3_alert_code(int code)
        case SSL_AD_INTERNAL_ERROR:     return(SSL3_AD_HANDSHAKE_FAILURE);
        case SSL_AD_USER_CANCELLED:     return(SSL3_AD_HANDSHAKE_FAILURE);
        case SSL_AD_NO_RENEGOTIATION:   return(-1); /* Don't send it :-) */
+       case SSL_AD_UNRECOGNIZED_NAME:  return(SSL3_AD_HANDSHAKE_FAILURE);
        default:                        return(-1);
                }
        }
index c544c76..cf1f934 100644 (file)
@@ -823,6 +823,7 @@ int tls1_alert_code(int code)
        case SSL_AD_INTERNAL_ERROR:     return(TLS1_AD_INTERNAL_ERROR);
        case SSL_AD_USER_CANCELLED:     return(TLS1_AD_USER_CANCELLED);
        case SSL_AD_NO_RENEGOTIATION:   return(TLS1_AD_NO_RENEGOTIATION);
+       case SSL_AD_UNRECOGNIZED_NAME:  return(TLS1_AD_UNRECOGNIZED_NAME);
        case DTLS1_AD_MISSING_HANDSHAKE_MESSAGE: return 
                                          (DTLS1_AD_MISSING_HANDSHAKE_MESSAGE);
        default:                        return(-1);