[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Sat Jun 4 11:09:20 UTC 2016


The branch master has been updated
       via  255cf605d67e72b73e6130d4c7bbe68c0eb22d8e (commit)
      from  843666ffdc0745e1aed5d665ec18d57263e32079 (commit)


- Log -----------------------------------------------------------------
commit 255cf605d67e72b73e6130d4c7bbe68c0eb22d8e
Author: Rich Salz <rsalz at openssl.org>
Date:   Fri Jun 3 22:45:47 2016 -0400

    RT3895: Remove fprintf's from SSL library.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 include/openssl/ssl.h    | 2 ++
 ssl/ssl_err.c            | 2 ++
 ssl/statem/statem_dtls.c | 8 +++-----
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 2779fff..a156061 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -2029,6 +2029,8 @@ void ERR_load_SSL_strings(void);
 # define SSL_F_DTLS1_PREPROCESS_FRAGMENT                  288
 # define SSL_F_DTLS1_PROCESS_RECORD                       257
 # define SSL_F_DTLS1_READ_BYTES                           258
+# define SSL_F_DTLS1_READ_FAILED                          339
+# define SSL_F_DTLS1_RETRANSMIT_MESSAGE                   390
 # define SSL_F_DTLS1_WRITE_APP_DATA_BYTES                 268
 # define SSL_F_DTLSV1_LISTEN                              350
 # define SSL_F_DTLS_CONSTRUCT_CHANGE_CIPHER_SPEC          371
diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c
index 0c46768..5741bb8 100644
--- a/ssl/ssl_err.c
+++ b/ssl/ssl_err.c
@@ -34,6 +34,8 @@ static ERR_STRING_DATA SSL_str_functs[] = {
     {ERR_FUNC(SSL_F_DTLS1_PREPROCESS_FRAGMENT), "dtls1_preprocess_fragment"},
     {ERR_FUNC(SSL_F_DTLS1_PROCESS_RECORD), "dtls1_process_record"},
     {ERR_FUNC(SSL_F_DTLS1_READ_BYTES), "dtls1_read_bytes"},
+    {ERR_FUNC(SSL_F_DTLS1_READ_FAILED), "dtls1_read_failed"},
+    {ERR_FUNC(SSL_F_DTLS1_RETRANSMIT_MESSAGE), "dtls1_retransmit_message"},
     {ERR_FUNC(SSL_F_DTLS1_WRITE_APP_DATA_BYTES),
      "dtls1_write_app_data_bytes"},
     {ERR_FUNC(SSL_F_DTLSV1_LISTEN), "DTLSv1_listen"},
diff --git a/ssl/statem/statem_dtls.c b/ssl/statem/statem_dtls.c
index 2a69326..d75483a 100644
--- a/ssl/statem/statem_dtls.c
+++ b/ssl/statem/statem_dtls.c
@@ -918,7 +918,7 @@ WORK_STATE dtls_wait_for_dry(SSL *s)
 int dtls1_read_failed(SSL *s, int code)
 {
     if (code > 0) {
-        fprintf(stderr, "dtls1_read_failed(); invalid state reached\n");
+        SSLerr(SSL_F_DTLS1_READ_FAILED, ERR_R_INTERNAL_ERROR);
         return 1;
     }
 
@@ -975,10 +975,8 @@ int dtls1_retransmit_buffered_messages(SSL *s)
                                      dtls1_get_queue_priority
                                      (frag->msg_header.seq,
                                       frag->msg_header.is_ccs),
-                                     &found) <= 0 && found) {
-            fprintf(stderr, "dtls1_retransmit_message() failed\n");
+                                     &found) <= 0)
             return -1;
-        }
     }
 
     return 1;
@@ -1070,7 +1068,7 @@ dtls1_retransmit_message(SSL *s, unsigned short seq, int *found)
 
     item = pqueue_find(s->d1->sent_messages, seq64be);
     if (item == NULL) {
-        fprintf(stderr, "retransmit:  message %d non-existant\n", seq);
+        SSLerr(SSL_F_DTLS1_RETRANSMIT_MESSAGE, ERR_R_INTERNAL_ERROR);
         *found = 0;
         return 0;
     }


More information about the openssl-commits mailing list