summaryrefslogtreecommitdiffstats
path: root/lib/libssl/ssl_err.c
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2017-05-07 04:22:24 +0000
committerbeck <beck@openbsd.org>2017-05-07 04:22:24 +0000
commit440bed4fbf67c71055029b3e3067c272d9453bf5 (patch)
tree52b4b4cebc1418ac46724df5173a011a50033f2a /lib/libssl/ssl_err.c
parentLimit -Werror to gcc4 as was done in libcrypto/libssl/libtls to avoid (diff)
downloadwireguard-openbsd-440bed4fbf67c71055029b3e3067c272d9453bf5.tar.xz
wireguard-openbsd-440bed4fbf67c71055029b3e3067c272d9453bf5.zip
Move state from ssl->internal to the handshake structure.
while we are at it, convert SSLerror to use a function internally, so that we may later allocate the handshake structure and check for it ok jsing@
Diffstat (limited to 'lib/libssl/ssl_err.c')
-rw-r--r--lib/libssl/ssl_err.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libssl/ssl_err.c b/lib/libssl/ssl_err.c
index f9e450125b4..d61660c934d 100644
--- a/lib/libssl/ssl_err.c
+++ b/lib/libssl/ssl_err.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_err.c,v 1.33 2017/02/07 02:08:38 beck Exp $ */
+/* $OpenBSD: ssl_err.c,v 1.34 2017/05/07 04:22:24 beck Exp $ */
/* ====================================================================
* Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
*
@@ -63,6 +63,8 @@
#include <openssl/err.h>
#include <openssl/ssl.h>
+#include "ssl_locl.h"
+
/* BEGIN ERROR CODES */
#ifndef OPENSSL_NO_ERR
@@ -667,3 +669,10 @@ SSL_state_func_code(int state) {
}
return 0xfff;
}
+
+void
+SSL_error_internal(const SSL *s, int r, char *f, int l)
+{
+ ERR_PUT_error(ERR_LIB_SSL,
+ (SSL_state_func_code(S3I(s)->hs.state)), r, f, l);
+}