summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/crypto/rsa/rsa_pk1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/crypto/rsa/rsa_pk1.c')
-rw-r--r--src/lib/libssl/src/crypto/rsa/rsa_pk1.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_pk1.c b/src/lib/libssl/src/crypto/rsa/rsa_pk1.c
index d394b300c6..1d6d688d6b 100644
--- a/src/lib/libssl/src/crypto/rsa/rsa_pk1.c
+++ b/src/lib/libssl/src/crypto/rsa/rsa_pk1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_pk1.c,v 1.9 2014/07/09 19:51:38 jsing Exp $ */ 1/* $OpenBSD: rsa_pk1.c,v 1.10 2014/07/10 07:41:54 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -168,11 +168,10 @@ RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
168 if (RAND_bytes(p, j) <= 0) 168 if (RAND_bytes(p, j) <= 0)
169 return 0; 169 return 0;
170 for (i = 0; i < j; i++) { 170 for (i = 0; i < j; i++) {
171 if (*p == '\0') 171 while (*p == '\0') {
172 do { 172 if (RAND_bytes(p, 1) <= 0)
173 if (RAND_bytes(p, 1) <= 0) 173 return 0;
174 return 0; 174 }
175 } while (*p == '\0');
176 p++; 175 p++;
177 } 176 }
178 177