summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_ssl.c
diff options
context:
space:
mode:
authorjsing <>2014-07-10 07:41:54 +0000
committerjsing <>2014-07-10 07:41:54 +0000
commita056a5f9321e4e7d039f49d894e59dff155713aa (patch)
tree836884d7a6942b35ff95b36ccd0591d0aa95e35c /src/lib/libcrypto/rsa/rsa_ssl.c
parentb3742339325c5255c4d028bbe38491007818891d (diff)
downloadopenbsd-a056a5f9321e4e7d039f49d894e59dff155713aa.tar.gz
openbsd-a056a5f9321e4e7d039f49d894e59dff155713aa.tar.bz2
openbsd-a056a5f9321e4e7d039f49d894e59dff155713aa.zip
Use a while loop instead of an ifdowhile loop.
ok miod@ tedu@
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_ssl.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_ssl.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_ssl.c b/src/lib/libcrypto/rsa/rsa_ssl.c
index 09deb08985..fb2e228454 100644
--- a/src/lib/libcrypto/rsa/rsa_ssl.c
+++ b/src/lib/libcrypto/rsa/rsa_ssl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_ssl.c,v 1.9 2014/07/09 19:51:38 jsing Exp $ */ 1/* $OpenBSD: rsa_ssl.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 *
@@ -86,11 +86,10 @@ RSA_padding_add_SSLv23(unsigned char *to, int tlen, const unsigned char *from,
86 if (RAND_bytes(p, j) <= 0) 86 if (RAND_bytes(p, j) <= 0)
87 return 0; 87 return 0;
88 for (i = 0; i < j; i++) { 88 for (i = 0; i < j; i++) {
89 if (*p == '\0') 89 while (*p == '\0') {
90 do { 90 if (RAND_bytes(p, 1) <= 0)
91 if (RAND_bytes(p, 1) <= 0) 91 return 0;
92 return 0; 92 }
93 } while (*p == '\0');
94 p++; 93 p++;
95 } 94 }
96 95