summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/s_cb.c
diff options
context:
space:
mode:
authorbcook <>2015-09-10 06:36:45 +0000
committerbcook <>2015-09-10 06:36:45 +0000
commit042de14de6bff7126905d195e21ff1dc271dd087 (patch)
treed2c2a560bc3dd50c82a09168e7588faf83e87fdc /src/usr.bin/openssl/s_cb.c
parentc143c9d71e4795a5b3f6992198aabc7c22335b59 (diff)
downloadopenbsd-042de14de6bff7126905d195e21ff1dc271dd087.tar.gz
openbsd-042de14de6bff7126905d195e21ff1dc271dd087.tar.bz2
openbsd-042de14de6bff7126905d195e21ff1dc271dd087.zip
Fix shadowed verify_error in s_server by removing the unused global.
's_time -verify 1' will now actually verify the peer certificate. ok beck@
Diffstat (limited to 'src/usr.bin/openssl/s_cb.c')
-rw-r--r--src/usr.bin/openssl/s_cb.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/usr.bin/openssl/s_cb.c b/src/usr.bin/openssl/s_cb.c
index 3bead8236a..596884ff16 100644
--- a/src/usr.bin/openssl/s_cb.c
+++ b/src/usr.bin/openssl/s_cb.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s_cb.c,v 1.4 2015/07/20 21:52:07 doug Exp $ */ 1/* $OpenBSD: s_cb.c,v 1.5 2015/09/10 06:36:45 bcook 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 *
@@ -129,7 +129,6 @@
129#define COOKIE_SECRET_LENGTH 16 129#define COOKIE_SECRET_LENGTH 16
130 130
131int verify_depth = 0; 131int verify_depth = 0;
132int verify_error = X509_V_OK;
133int verify_return_error = 0; 132int verify_return_error = 0;
134unsigned char cookie_secret[COOKIE_SECRET_LENGTH]; 133unsigned char cookie_secret[COOKIE_SECRET_LENGTH];
135int cookie_initialized = 0; 134int cookie_initialized = 0;
@@ -157,10 +156,8 @@ verify_callback(int ok, X509_STORE_CTX * ctx)
157 if (verify_depth >= depth) { 156 if (verify_depth >= depth) {
158 if (!verify_return_error) 157 if (!verify_return_error)
159 ok = 1; 158 ok = 1;
160 verify_error = X509_V_OK;
161 } else { 159 } else {
162 ok = 0; 160 ok = 0;
163 verify_error = X509_V_ERR_CERT_CHAIN_TOO_LONG;
164 } 161 }
165 } 162 }
166 switch (err) { 163 switch (err) {