summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/ssl/tls_srp.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-04-13 15:16:32 +0000
committermiod <miod@openbsd.org>2014-04-13 15:16:32 +0000
commit9eac5592c81620ead272fa71be9a79e0e24176fe (patch)
treebe26e8653cf5d8c7b93aa32a3203924090fc58ac /lib/libssl/src/ssl/tls_srp.c
parentFix a badly worded debug message that implied the entire machine was going (diff)
downloadwireguard-openbsd-9eac5592c81620ead272fa71be9a79e0e24176fe.tar.xz
wireguard-openbsd-9eac5592c81620ead272fa71be9a79e0e24176fe.zip
Import OpenSSL 1.0.1g
Diffstat (limited to 'lib/libssl/src/ssl/tls_srp.c')
-rw-r--r--lib/libssl/src/ssl/tls_srp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libssl/src/ssl/tls_srp.c b/lib/libssl/src/ssl/tls_srp.c
index 8512c4daf65..2315a7c0a2e 100644
--- a/lib/libssl/src/ssl/tls_srp.c
+++ b/lib/libssl/src/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));