diff options
| author | beck <> | 2016-03-06 14:52:15 +0000 |
|---|---|---|
| committer | beck <> | 2016-03-06 14:52:15 +0000 |
| commit | f456014e63e02a559c728916fc627f5ae9139fdc (patch) | |
| tree | 03a7bc812f759bdf7b191b911ca241601f2a19dd /src/lib/libssl/d1_enc.c | |
| parent | 5a8200b9524c9bceedeb01dec021bdfe4b411500 (diff) | |
| download | openbsd-f456014e63e02a559c728916fc627f5ae9139fdc.tar.gz openbsd-f456014e63e02a559c728916fc627f5ae9139fdc.tar.bz2 openbsd-f456014e63e02a559c728916fc627f5ae9139fdc.zip | |
Make sure stdio functions don't end up in the library, from miod@
ok doug@ bcook@
Diffstat (limited to '')
| -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 | } |
