aboutsummaryrefslogtreecommitdiff
path: root/openssl/ssl/tls_srp.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/ssl/tls_srp.c')
-rw-r--r--openssl/ssl/tls_srp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openssl/ssl/tls_srp.c b/openssl/ssl/tls_srp.c
index d36cfa0a5..bb719ba4c 100644
--- a/openssl/ssl/tls_srp.c
+++ b/openssl/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));