diff options
Diffstat (limited to 'src/lib/libssl/d1_enc.c')
-rw-r--r-- | src/lib/libssl/d1_enc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libssl/d1_enc.c b/src/lib/libssl/d1_enc.c index c58e109ae5..8445ceb10f 100644 --- a/src/lib/libssl/d1_enc.c +++ b/src/lib/libssl/d1_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_enc.c,v 1.10 2015/07/17 07:04:40 doug Exp $ */ | 1 | /* $OpenBSD: d1_enc.c,v 1.11 2016/03/06 14:52:15 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
@@ -150,11 +150,13 @@ dtls1_enc(SSL *s, int send) | |||
150 | enc = NULL; | 150 | enc = NULL; |
151 | else { | 151 | else { |
152 | enc = EVP_CIPHER_CTX_cipher(s->enc_write_ctx); | 152 | enc = EVP_CIPHER_CTX_cipher(s->enc_write_ctx); |
153 | if (rec->data != rec->input) | 153 | if (rec->data != rec->input) { |
154 | #ifdef DEBUG | ||
154 | /* we can't write into the input stream */ | 155 | /* we can't write into the input stream */ |
155 | fprintf(stderr, "%s:%d: rec->data != rec->input\n", | 156 | fprintf(stderr, "%s:%d: rec->data != rec->input\n", |
156 | __FILE__, __LINE__); | 157 | __FILE__, __LINE__); |
157 | else if (EVP_CIPHER_block_size(ds->cipher) > 1) { | 158 | #endif |
159 | } else if (EVP_CIPHER_block_size(ds->cipher) > 1) { | ||
158 | arc4random_buf(rec->input, | 160 | arc4random_buf(rec->input, |
159 | EVP_CIPHER_block_size(ds->cipher)); | 161 | EVP_CIPHER_block_size(ds->cipher)); |
160 | } | 162 | } |