summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_clnt.c
diff options
context:
space:
mode:
authorbeck <>2017-02-07 02:08:38 +0000
committerbeck <>2017-02-07 02:08:38 +0000
commit91c389f89015a024212e73f5ec6e24166955ab6e (patch)
treea4e6a6d2d23329b576b63c8698e62a87e7388b69 /src/lib/libssl/d1_clnt.c
parent8a1ec4c748b269fba0669ee71234ec9a0f128613 (diff)
downloadopenbsd-91c389f89015a024212e73f5ec6e24166955ab6e.tar.gz
openbsd-91c389f89015a024212e73f5ec6e24166955ab6e.tar.bz2
openbsd-91c389f89015a024212e73f5ec6e24166955ab6e.zip
Change SSLerror() back to taking two args, with the first one being an SSL *.
Make a table of "function codes" which maps the internal state of the SSL * to something like a useful name so in a typical error in the connection you know in what sort of place in the handshake things happened. (instead of by arcane function name). Add SSLerrorx() for when we don't have an SSL * ok jsing@ after us both being prodded by bluhm@ to make it not terrible
Diffstat (limited to 'src/lib/libssl/d1_clnt.c')
-rw-r--r--src/lib/libssl/d1_clnt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libssl/d1_clnt.c b/src/lib/libssl/d1_clnt.c
index 6e124c7a85..8e4c2586a3 100644
--- a/src/lib/libssl/d1_clnt.c
+++ b/src/lib/libssl/d1_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_clnt.c,v 1.73 2017/01/26 12:16:13 beck Exp $ */ 1/* $OpenBSD: d1_clnt.c,v 1.74 2017/02/07 02:08:38 beck Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -216,7 +216,7 @@ dtls1_connect(SSL *s)
216 cb(s, SSL_CB_HANDSHAKE_START, 1); 216 cb(s, SSL_CB_HANDSHAKE_START, 1);
217 217
218 if ((s->version & 0xff00 ) != (DTLS1_VERSION & 0xff00)) { 218 if ((s->version & 0xff00 ) != (DTLS1_VERSION & 0xff00)) {
219 SSLerror(ERR_R_INTERNAL_ERROR); 219 SSLerror(s, ERR_R_INTERNAL_ERROR);
220 ret = -1; 220 ret = -1;
221 goto end; 221 goto end;
222 } 222 }
@@ -570,7 +570,7 @@ dtls1_connect(SSL *s)
570 /* break; */ 570 /* break; */
571 571
572 default: 572 default:
573 SSLerror(SSL_R_UNKNOWN_STATE); 573 SSLerror(s, SSL_R_UNKNOWN_STATE);
574 ret = -1; 574 ret = -1;
575 goto end; 575 goto end;
576 /* break; */ 576 /* break; */
@@ -631,7 +631,7 @@ dtls1_get_hello_verify(SSL *s)
631 goto truncated; 631 goto truncated;
632 632
633 if (ssl_version != s->version) { 633 if (ssl_version != s->version) {
634 SSLerror(SSL_R_WRONG_SSL_VERSION); 634 SSLerror(s, SSL_R_WRONG_SSL_VERSION);
635 s->version = (s->version & 0xff00) | (ssl_version & 0xff); 635 s->version = (s->version & 0xff00) | (ssl_version & 0xff);
636 al = SSL_AD_PROTOCOL_VERSION; 636 al = SSL_AD_PROTOCOL_VERSION;
637 goto f_err; 637 goto f_err;