make update and fix some associated mis-matched error codes
authorMatt Caswell <matt@openssl.org>
Wed, 21 Sep 2016 13:05:42 +0000 (14:05 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 21 Sep 2016 13:31:30 +0000 (14:31 +0100)
Reviewed-by: Richard Levitte <levitte@openssl.org>
include/openssl/ssl.h
ssl/ssl_err.c
ssl/statem/statem_dtls.c
ssl/statem/statem_lib.c

index 234a25e..5355c83 100644 (file)
@@ -2220,6 +2220,7 @@ int ERR_load_SSL_strings(void);
 # define SSL_F_TLS1_SET_SERVER_SIGALGS                    335
 # define SSL_F_TLS_CLIENT_KEY_EXCHANGE_POST_WORK          354
 # define SSL_F_TLS_CONSTRUCT_CERTIFICATE_REQUEST          372
+# define SSL_F_TLS_CONSTRUCT_CHANGE_CIPHER_SPEC           427
 # define SSL_F_TLS_CONSTRUCT_CKE_DHE                      404
 # define SSL_F_TLS_CONSTRUCT_CKE_ECDHE                    405
 # define SSL_F_TLS_CONSTRUCT_CKE_GOST                     406
index 7f94ca6..bba7cdb 100644 (file)
@@ -239,6 +239,8 @@ static ERR_STRING_DATA SSL_str_functs[] = {
      "tls_client_key_exchange_post_work"},
     {ERR_FUNC(SSL_F_TLS_CONSTRUCT_CERTIFICATE_REQUEST),
      "tls_construct_certificate_request"},
+    {ERR_FUNC(SSL_F_TLS_CONSTRUCT_CHANGE_CIPHER_SPEC),
+     "tls_construct_change_cipher_spec"},
     {ERR_FUNC(SSL_F_TLS_CONSTRUCT_CKE_DHE), "tls_construct_cke_dhe"},
     {ERR_FUNC(SSL_F_TLS_CONSTRUCT_CKE_ECDHE), "tls_construct_cke_ecdhe"},
     {ERR_FUNC(SSL_F_TLS_CONSTRUCT_CKE_GOST), "tls_construct_cke_gost"},
index f892f0f..7c8437a 100644 (file)
@@ -877,7 +877,7 @@ int dtls_construct_change_cipher_spec(SSL *s)
 
     if (!WPACKET_init(&pkt, s->init_buf)
             || !WPACKET_put_bytes_u8(&pkt, SSL3_MT_CCS)) {
-        SSLerr(SSL_F_TLS_CONSTRUCT_FINISHED, ERR_R_INTERNAL_ERROR);
+        SSLerr(SSL_F_DTLS_CONSTRUCT_CHANGE_CIPHER_SPEC, ERR_R_INTERNAL_ERROR);
         goto err;
     }
 
@@ -888,7 +888,7 @@ int dtls_construct_change_cipher_spec(SSL *s)
         s->d1->next_handshake_write_seq++;
 
         if (!WPACKET_put_bytes_u16(&pkt, s->d1->handshake_write_seq)) {
-            SSLerr(SSL_F_TLS_CONSTRUCT_FINISHED, ERR_R_INTERNAL_ERROR);
+            SSLerr(SSL_F_DTLS_CONSTRUCT_CHANGE_CIPHER_SPEC, ERR_R_INTERNAL_ERROR);
             goto err;
         }
 
@@ -896,7 +896,7 @@ int dtls_construct_change_cipher_spec(SSL *s)
     }
 
     if (!WPACKET_finish(&pkt)) {
-        SSLerr(SSL_F_TLS_CONSTRUCT_FINISHED, ERR_R_INTERNAL_ERROR);
+        SSLerr(SSL_F_DTLS_CONSTRUCT_CHANGE_CIPHER_SPEC, ERR_R_INTERNAL_ERROR);
         goto err;
     }
 
index 3ffe4e5..6f13ec0 100644 (file)
@@ -276,7 +276,7 @@ int tls_construct_change_cipher_spec(SSL *s)
             || !WPACKET_finish(&pkt)) {
         WPACKET_cleanup(&pkt);
         ossl_statem_set_error(s);
-        SSLerr(SSL_F_TLS_CONSTRUCT_FINISHED, ERR_R_INTERNAL_ERROR);
+        SSLerr(SSL_F_TLS_CONSTRUCT_CHANGE_CIPHER_SPEC, ERR_R_INTERNAL_ERROR);
         ssl3_send_alert(s, SSL3_AL_FATAL, SSL_AD_INTERNAL_ERROR);
         return 0;
     }