summaryrefslogtreecommitdiffstats
path: root/ssl/tls_srp.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2012-06-08 09:18:47 +0000
committerBen Laurie <ben@openssl.org>2012-06-08 09:18:47 +0000
commitaf454b5bb09bf647b4854dc277f2eefc151b2608 (patch)
treedc263a92a0e3e5c73ec5ea049a92411f51e0eb57 /ssl/tls_srp.c
parent5b2bbf37fa2f90ac1b6ab381179d739ae376723b (diff)
Reduce version skew.
Diffstat (limited to 'ssl/tls_srp.c')
-rw-r--r--ssl/tls_srp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/tls_srp.c b/ssl/tls_srp.c
index 8512c4daf6..2315a7c0a2 100644
--- a/ssl/tls_srp.c
+++ b/ssl/tls_srp.c
@@ -242,7 +242,8 @@ int SSL_srp_server_param_with_username(SSL *s, int *ad)
(s->srp_ctx.v == NULL))
return SSL3_AL_FATAL;
- RAND_bytes(b, sizeof(b));
+ if (RAND_bytes(b, sizeof(b)) <= 0)
+ return SSL3_AL_FATAL;
s->srp_ctx.b = BN_bin2bn(b,sizeof(b),NULL);
OPENSSL_cleanse(b,sizeof(b));