summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bf_nbio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bio/bf_nbio.c')
-rw-r--r--src/lib/libcrypto/bio/bf_nbio.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/lib/libcrypto/bio/bf_nbio.c b/src/lib/libcrypto/bio/bf_nbio.c
index a86feb49c2..24e2e7e8b9 100644
--- a/src/lib/libcrypto/bio/bf_nbio.c
+++ b/src/lib/libcrypto/bio/bf_nbio.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bf_nbio.c,v 1.18 2014/10/22 13:02:03 jsing Exp $ */ 1/* $OpenBSD: bf_nbio.c,v 1.19 2015/02/07 13:19:15 doug 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 *
@@ -130,10 +130,8 @@ static int
130nbiof_read(BIO *b, char *out, int outl) 130nbiof_read(BIO *b, char *out, int outl)
131{ 131{
132 int ret = 0; 132 int ret = 0;
133#if 1
134 int num; 133 int num;
135 unsigned char n; 134 unsigned char n;
136#endif
137 135
138 if (out == NULL) 136 if (out == NULL)
139 return (0); 137 return (0);
@@ -141,7 +139,7 @@ nbiof_read(BIO *b, char *out, int outl)
141 return (0); 139 return (0);
142 140
143 BIO_clear_retry_flags(b); 141 BIO_clear_retry_flags(b);
144#if 1 142
145 arc4random_buf(&n, 1); 143 arc4random_buf(&n, 1);
146 num = (n & 0x07); 144 num = (n & 0x07);
147 145
@@ -151,9 +149,7 @@ nbiof_read(BIO *b, char *out, int outl)
151 if (num == 0) { 149 if (num == 0) {
152 ret = -1; 150 ret = -1;
153 BIO_set_retry_read(b); 151 BIO_set_retry_read(b);
154 } else 152 } else {
155#endif
156 {
157 ret = BIO_read(b->next_bio, out, outl); 153 ret = BIO_read(b->next_bio, out, outl);
158 if (ret < 0) 154 if (ret < 0)
159 BIO_copy_next_retry(b); 155 BIO_copy_next_retry(b);
@@ -177,7 +173,6 @@ nbiof_write(BIO *b, const char *in, int inl)
177 173
178 BIO_clear_retry_flags(b); 174 BIO_clear_retry_flags(b);
179 175
180#if 1
181 if (nt->lwn > 0) { 176 if (nt->lwn > 0) {
182 num = nt->lwn; 177 num = nt->lwn;
183 nt->lwn = 0; 178 nt->lwn = 0;
@@ -192,9 +187,7 @@ nbiof_write(BIO *b, const char *in, int inl)
192 if (num == 0) { 187 if (num == 0) {
193 ret = -1; 188 ret = -1;
194 BIO_set_retry_write(b); 189 BIO_set_retry_write(b);
195 } else 190 } else {
196#endif
197 {
198 ret = BIO_write(b->next_bio, in, inl); 191 ret = BIO_write(b->next_bio, in, inl);
199 if (ret < 0) { 192 if (ret < 0) {
200 BIO_copy_next_retry(b); 193 BIO_copy_next_retry(b);