summaryrefslogtreecommitdiffstats
path: root/lib/libssl/d1_clnt.c
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2017-02-07 02:08:38 +0000
committerbeck <beck@openbsd.org>2017-02-07 02:08:38 +0000
commitc9d7abb729ab657a1b8a3ce173cfa0bd7ee58fd6 (patch)
tree09c29c4af2291abaaf82756a54ccbd954a6d15c0 /lib/libssl/d1_clnt.c
parentwhitespace fixes. no functional change. (diff)
downloadwireguard-openbsd-c9d7abb729ab657a1b8a3ce173cfa0bd7ee58fd6.tar.xz
wireguard-openbsd-c9d7abb729ab657a1b8a3ce173cfa0bd7ee58fd6.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 '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;