summaryrefslogtreecommitdiffstats
path: root/ssl/d1_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssl/d1_enc.c')
-rw-r--r--ssl/d1_enc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ssl/d1_enc.c b/ssl/d1_enc.c
index 42997eaee9..cbff7495c5 100644
--- a/ssl/d1_enc.c
+++ b/ssl/d1_enc.c
@@ -146,7 +146,10 @@ int dtls1_enc(SSL *s, int send)
fprintf(stderr, "%s:%d: rec->data != rec->input\n",
__FILE__, __LINE__);
else if ( EVP_CIPHER_block_size(ds->cipher) > 1)
- RAND_bytes(rec->input, EVP_CIPHER_block_size(ds->cipher));
+ {
+ if (!RAND_bytes(rec->input, EVP_CIPHER_block_size(ds->cipher)))
+ return -1;
+ }
}
}
else