diff options
Diffstat (limited to 'ssl/tls_srp.c')
-rw-r--r-- | ssl/tls_srp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/tls_srp.c b/ssl/tls_srp.c index d36cfa0a5c..6bdf7f32f8 100644 --- a/ssl/tls_srp.c +++ b/ssl/tls_srp.c @@ -454,7 +454,8 @@ int SRP_Calc_A_param(SSL *s) { unsigned char rnd[SSL_MAX_MASTER_KEY_LENGTH]; - RAND_bytes(rnd, sizeof(rnd)); + if(RAND_bytes(rnd, sizeof(rnd)) <= 0) + return -1; s->srp_ctx.a = BN_bin2bn(rnd, sizeof(rnd), s->srp_ctx.a); OPENSSL_cleanse(rnd, sizeof(rnd)); |