aboutsummaryrefslogtreecommitdiff
path: root/src/openvpn/ssl_openssl.h
diff options
context:
space:
mode:
authorArne Schwabe2022-04-22 15:40:35 +0200
committerGert Doering2022-04-25 17:44:21 +0200
commit788ce35cf09aff09b79f428cdd6cfc0ff8627934 (patch)
treefdadfa0d4ba7009b237a287d6b60990e6357a4da /src/openvpn/ssl_openssl.h
parentb67d670b2dedd9a4d39d927956b385903107f82b (diff)
downloadopenvpn-788ce35cf09aff09b79f428cdd6cfc0ff8627934.zip
openvpn-788ce35cf09aff09b79f428cdd6cfc0ff8627934.tar.gz
Move ssl function related to control channel wrap/unwrap to ssl_pkt.c/h
This allows these functions to be relatively easily included into the unit test without pulling ssl.c and all the dependencies of ssl.c into a unit test. Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20220422134038.3801239-7-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24149.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/ssl_openssl.h')
-rw-r--r--src/openvpn/ssl_openssl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/openvpn/ssl_openssl.h b/src/openvpn/ssl_openssl.h
index 5f4d499..752b69c 100644
--- a/src/openvpn/ssl_openssl.h
+++ b/src/openvpn/ssl_openssl.h
@@ -30,6 +30,7 @@
#define SSL_OPENSSL_H_
#include <openssl/ssl.h>
+#include <openssl/err.h>
/**
* Structure that wraps the TLS context. Contents differ depending on the
@@ -54,4 +55,10 @@ struct key_state_ssl {
*/
extern int mydata_index; /* GLOBAL */
+static inline void
+tls_clear_error(void)
+{
+ ERR_clear_error();
+}
+
#endif /* SSL_OPENSSL_H_ */