Clear warnings/errors within TLS_DEBUG code sections
authorRichard Levitte <levitte@openssl.org>
Tue, 16 Dec 2014 10:04:19 +0000 (11:04 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 17 Dec 2014 13:17:54 +0000 (14:17 +0100)
Reviewed-by: Andy Polyakov <appro@openssl.org>
ssl/t1_enc.c

index 50371307218aa3bd9ac88eb26254cdd58570cd7c..8332467112932456f3b21812302041c4481a4d06 100644 (file)
@@ -1071,14 +1071,10 @@ int tls1_mac(SSL *ssl, unsigned char *md, int send)
        if (!stream_mac)
                EVP_MD_CTX_cleanup(&hmac);
 #ifdef TLS_DEBUG
-printf("sec=");
-{unsigned int z; for (z=0; z<md_size; z++) printf("%02X ",mac_sec[z]); printf("\n"); }
-printf("seq=");
-{int z; for (z=0; z<8; z++) printf("%02X ",seq[z]); printf("\n"); }
-printf("buf=");
-{int z; for (z=0; z<5; z++) printf("%02X ",buf[z]); printf("\n"); }
-printf("rec=");
-{unsigned int z; for (z=0; z<rec->length; z++) printf("%02X ",buf[z]); printf("\n"); }
+fprintf(stderr,"seq=");
+{int z; for (z=0; z<8; z++) fprintf(stderr,"%02X ",seq[z]); fprintf(stderr,"\n"); }
+fprintf(stderr,"rec=");
+{unsigned int z; for (z=0; z<rec->length; z++) fprintf(stderr,"%02X ",rec->data[z]); fprintf(stderr,"\n"); }
 #endif
 
        if (!SSL_IS_DTLS(ssl))
@@ -1091,7 +1087,7 @@ printf("rec=");
                }
 
 #ifdef TLS_DEBUG
-{unsigned int z; for (z=0; z<md_size; z++) printf("%02X ",md[z]); printf("\n"); }
+{unsigned int z; for (z=0; z<md_size; z++) fprintf(stderr,"%02X ",md[z]); fprintf(stderr,"\n"); }
 #endif
        return(md_size);
        }