diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 1ad825ac..ec054d26 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -172,6 +172,13 @@ SSL3_ENC_METHOD ssl3_undef_enc_method={ int use_context)) ssl_undefined_function, }; +/* Some error codes are special. Ensure the make_errors.go script + * never regresses this. */ +OPENSSL_COMPILE_ASSERT( + SSL_R_TLSV1_ALERT_NO_RENEGOTIATION == + SSL_AD_NO_RENEGOTIATION + SSL_AD_REASON_OFFSET, + ssl_alert_reason_code_mismatch); + int SSL_clear(SSL *s) { diff --git a/ssl/ssl_test.c b/ssl/ssl_test.c index 97a1967f..cc632681 100644 --- a/ssl/ssl_test.c +++ b/ssl/ssl_test.c @@ -17,14 +17,6 @@ #include "openssl/ssl.h" int main(void) { - /* Some error codes are special, but the make_errors.go script doesn't know - * this. This test will catch the case where something regenerates the error - * codes with the script but doesn't fix up the special ones. */ - if (SSL_R_TLSV1_ALERT_NO_RENEGOTIATION != 100 + SSL_AD_REASON_OFFSET) { - fprintf(stderr, "SSL alert errors don't match up.\n"); - return 1; - } - printf("PASS\n"); return 0; }