diff options
| author | jsing <> | 2014-07-10 07:41:54 +0000 |
|---|---|---|
| committer | jsing <> | 2014-07-10 07:41:54 +0000 |
| commit | ec8c499ef7f0ca14b52a751e7d060abd044b3472 (patch) | |
| tree | 836884d7a6942b35ff95b36ccd0591d0aa95e35c /src/lib/libcrypto/rsa/rsa_ssl.c | |
| parent | cff606a33656a8e3011d25140ec13caa6318498a (diff) | |
| download | openbsd-ec8c499ef7f0ca14b52a751e7d060abd044b3472.tar.gz openbsd-ec8c499ef7f0ca14b52a751e7d060abd044b3472.tar.bz2 openbsd-ec8c499ef7f0ca14b52a751e7d060abd044b3472.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.c | 11 |
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 | ||
