summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libssl/src')
-rw-r--r--lib/libssl/src/crypto/rsa/rsa_pk1.c11
-rw-r--r--lib/libssl/src/crypto/rsa/rsa_ssl.c11
2 files changed, 10 insertions, 12 deletions
diff --git a/lib/libssl/src/crypto/rsa/rsa_pk1.c b/lib/libssl/src/crypto/rsa/rsa_pk1.c
index d394b300c60..1d6d688d6b5 100644
--- a/lib/libssl/src/crypto/rsa/rsa_pk1.c
+++ b/lib/libssl/src/crypto/rsa/rsa_pk1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa_pk1.c,v 1.9 2014/07/09 19:51:38 jsing Exp $ */
+/* $OpenBSD: rsa_pk1.c,v 1.10 2014/07/10 07:41:54 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -168,11 +168,10 @@ RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
if (RAND_bytes(p, j) <= 0)
return 0;
for (i = 0; i < j; i++) {
- if (*p == '\0')
- do {
- if (RAND_bytes(p, 1) <= 0)
- return 0;
- } while (*p == '\0');
+ while (*p == '\0') {
+ if (RAND_bytes(p, 1) <= 0)
+ return 0;
+ }
p++;
}
diff --git a/lib/libssl/src/crypto/rsa/rsa_ssl.c b/lib/libssl/src/crypto/rsa/rsa_ssl.c
index 09deb08985b..fb2e2284545 100644
--- a/lib/libssl/src/crypto/rsa/rsa_ssl.c
+++ b/lib/libssl/src/crypto/rsa/rsa_ssl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa_ssl.c,v 1.9 2014/07/09 19:51:38 jsing Exp $ */
+/* $OpenBSD: rsa_ssl.c,v 1.10 2014/07/10 07:41:54 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -86,11 +86,10 @@ RSA_padding_add_SSLv23(unsigned char *to, int tlen, const unsigned char *from,
if (RAND_bytes(p, j) <= 0)
return 0;
for (i = 0; i < j; i++) {
- if (*p == '\0')
- do {
- if (RAND_bytes(p, 1) <= 0)
- return 0;
- } while (*p == '\0');
+ while (*p == '\0') {
+ if (RAND_bytes(p, 1) <= 0)
+ return 0;
+ }
p++;
}