summaryrefslogtreecommitdiff
path: root/lib/libssl/d1_clnt.c
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2017-02-07 02:08:39 +0000
committerBob Beck <beck@cvs.openbsd.org>2017-02-07 02:08:39 +0000
commit8d9af885ed2035da2738bf51ed38e738a4c442de (patch)
treea20f0d6db51989dace572abe08a2a13aadb29679 /lib/libssl/d1_clnt.c
parenta3976944fcdd3b767a5c1e0126e6bccb223462ff (diff)
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 'lib/libssl/d1_clnt.c')
-rw-r--r--lib/libssl/d1_clnt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libssl/d1_clnt.c b/lib/libssl/d1_clnt.c
index 6e124c7a855..8e4c2586a30 100644
--- a/lib/libssl/d1_clnt.c
+++ b/lib/libssl/d1_clnt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: d1_clnt.c,v 1.73 2017/01/26 12:16:13 beck Exp $ */
+/* $OpenBSD: d1_clnt.c,v 1.74 2017/02/07 02:08:38 beck Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -216,7 +216,7 @@ dtls1_connect(SSL *s)
cb(s, SSL_CB_HANDSHAKE_START, 1);
if ((s->version & 0xff00 ) != (DTLS1_VERSION & 0xff00)) {
- SSLerror(ERR_R_INTERNAL_ERROR);
+ SSLerror(s, ERR_R_INTERNAL_ERROR);
ret = -1;
goto end;
}
@@ -570,7 +570,7 @@ dtls1_connect(SSL *s)
/* break; */
default:
- SSLerror(SSL_R_UNKNOWN_STATE);
+ SSLerror(s, SSL_R_UNKNOWN_STATE);
ret = -1;
goto end;
/* break; */
@@ -631,7 +631,7 @@ dtls1_get_hello_verify(SSL *s)
goto truncated;
if (ssl_version != s->version) {
- SSLerror(SSL_R_WRONG_SSL_VERSION);
+ SSLerror(s, SSL_R_WRONG_SSL_VERSION);
s->version = (s->version & 0xff00) | (ssl_version & 0xff);
al = SSL_AD_PROTOCOL_VERSION;
goto f_err;