summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio
diff options
context:
space:
mode:
authordoug <>2015-02-07 13:19:15 +0000
committerdoug <>2015-02-07 13:19:15 +0000
commitbd790e322a40e6362231f517d5795d4079eeb2a2 (patch)
tree1f11c8eab9ee5f3f265f1010c299c7fd574d9cdf /src/lib/libcrypto/bio
parentff826d3cb94a579275eb6e97b3cf80ca69016d4b (diff)
downloadopenbsd-bd790e322a40e6362231f517d5795d4079eeb2a2.tar.gz
openbsd-bd790e322a40e6362231f517d5795d4079eeb2a2.tar.bz2
openbsd-bd790e322a40e6362231f517d5795d4079eeb2a2.zip
Delete a lot of #if 0 code in libressl.
There are a few instances where #if 1 is removed but the code remains. Based on the following OpenSSL commits. Some of the commits weren't strictly deletions so they are going to be split up into separate commits. 6f91b017bbb7140f816721141ac156d1b828a6b3 3d47c1d331fdc7574d2275cda1a630ccdb624b08 dfb56425b68314b2b57e17c82c1df42e7a015132 c8fa2356a00cbaada8963f739e5570298311a060 f16a64d11f55c01f56baa62ebf1dec7f8fe718cb 9ccc00ef6ea65567622e40c49aca43f2c6d79cdb 02a938c953b3e1ced71d9a832de1618f907eb96d 75d0ebef2aef7a2c77b27575b8da898e22f3ccd5 d6fbb194095312f4722c81c9362dbd0de66cb656 6f1a93ad111c7dfe36a09a976c4c009079b19ea1 1a5adcfb5edfe23908b350f8757df405b0f5f71f 8de24b792743d11e1d5a0dcd336a49368750c577 a2b18e657ea1a932d125154f4e13ab2258796d90 8e964419603d2478dfb391c66e7ccb2dcc9776b4 32dfde107636ac9bc62a5b3233fe2a54dbc27008 input + ok jsing@, miod@, tedu@
Diffstat (limited to 'src/lib/libcrypto/bio')
-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);