blob: 2c621d547b6ededa5d8d6178b7440bbe51b9800a [file] [log] [blame]
James Kuszmaul82f6c042021-01-17 11:30:16 -08001/**
2 * @file openssl/tls.h TLS backend using OpenSSL (Internal API)
3 *
4 * Copyright (C) 2010 Creytiv.com
5 */
6
7
8/*
9 * Mapping of feature macros
10 */
11
12#if OPENSSL_VERSION_NUMBER >= 0x10100000L
13#define TLS_BIO_OPAQUE 1
14#endif
15
16#if defined (LIBRESSL_VERSION_NUMBER)
17#undef TLS_BIO_OPAQUE
18#endif
19
20
21#if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
22 !defined(LIBRESSL_VERSION_NUMBER)
23#define SSL_state SSL_get_state
24#define SSL_ST_OK TLS_ST_OK
25#endif
26
27
28struct tls {
29 SSL_CTX *ctx;
30 X509 *cert;
31 char *pass; /* password for private key */
32};
33
34
35void tls_flush_error(void);