From 35d732fc2e1badce13be22a044187ebd4d769552 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Mon, 4 Feb 2013 21:13:18 +0000 Subject: [PATCH] Fix error codes. --- ssl/d1_pkt.c | 2 +- ssl/s3_pkt.c | 2 +- ssl/ssl.h | 1 + ssl/ssl_err.c | 1 + ssl/ssl_lib.c | 2 +- 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c index 0ad8b5f559..b0302a74d4 100644 --- a/ssl/d1_pkt.c +++ b/ssl/d1_pkt.c @@ -453,7 +453,7 @@ printf("\n"); orig_len < mac_size+1)) { al=SSL_AD_DECODE_ERROR; - SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_LENGTH_TOO_SHORT); + SSLerr(SSL_F_DTLS1_PROCESS_RECORD,SSL_R_LENGTH_TOO_SHORT); goto f_err; } diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index 012e9bca48..bf8da9843e 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -408,7 +408,7 @@ fprintf(stderr, "Record type=%d, Length=%d\n", rr->type, rr->length); if (enc_err == 0) { al=SSL_AD_DECRYPTION_FAILED; - SSLerr(SSL_F_TLS1_ENC,SSL_R_BLOCK_CIPHER_PAD_IS_WRONG); + SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_BLOCK_CIPHER_PAD_IS_WRONG); goto f_err; } diff --git a/ssl/ssl.h b/ssl/ssl.h index dcb8a62be8..593579ed36 100644 --- a/ssl/ssl.h +++ b/ssl/ssl.h @@ -2211,6 +2211,7 @@ void ERR_load_SSL_strings(void); #define SSL_F_SSL_GET_NEW_SESSION 181 #define SSL_F_SSL_GET_PREV_SESSION 217 #define SSL_F_SSL_GET_SERVER_SEND_CERT 182 +#define SSL_F_SSL_GET_SERVER_SEND_PKEY 317 #define SSL_F_SSL_GET_SIGN_PKEY 183 #define SSL_F_SSL_INIT_WBIO_BUFFER 184 #define SSL_F_SSL_LOAD_CLIENT_CA_FILE 185 diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c index 2577c6895a..370fb57e3b 100644 --- a/ssl/ssl_err.c +++ b/ssl/ssl_err.c @@ -228,6 +228,7 @@ static ERR_STRING_DATA SSL_str_functs[]= {ERR_FUNC(SSL_F_SSL_GET_NEW_SESSION), "SSL_GET_NEW_SESSION"}, {ERR_FUNC(SSL_F_SSL_GET_PREV_SESSION), "SSL_GET_PREV_SESSION"}, {ERR_FUNC(SSL_F_SSL_GET_SERVER_SEND_CERT), "SSL_GET_SERVER_SEND_CERT"}, +{ERR_FUNC(SSL_F_SSL_GET_SERVER_SEND_PKEY), "SSL_GET_SERVER_SEND_PKEY"}, {ERR_FUNC(SSL_F_SSL_GET_SIGN_PKEY), "SSL_GET_SIGN_PKEY"}, {ERR_FUNC(SSL_F_SSL_INIT_WBIO_BUFFER), "SSL_INIT_WBIO_BUFFER"}, {ERR_FUNC(SSL_F_SSL_LOAD_CLIENT_CA_FILE), "SSL_load_client_CA_file"}, diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 6bd31c2dea..1a14c428a5 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -2342,7 +2342,7 @@ CERT_PKEY *ssl_get_server_send_pkey(const SSL *s) i=SSL_PKEY_GOST01; else /* if (alg_a & SSL_aNULL) */ { - SSLerr(SSL_F_SSL_GET_SERVER_SEND_CERT,ERR_R_INTERNAL_ERROR); + SSLerr(SSL_F_SSL_GET_SERVER_SEND_PKEY,ERR_R_INTERNAL_ERROR); return(NULL); } -- 2.25.1