blob: 2c621d547b6ededa5d8d6178b7440bbe51b9800a [file] [log] [blame]
/**
* @file openssl/tls.h TLS backend using OpenSSL (Internal API)
*
* Copyright (C) 2010 Creytiv.com
*/
/*
* Mapping of feature macros
*/
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
#define TLS_BIO_OPAQUE 1
#endif
#if defined (LIBRESSL_VERSION_NUMBER)
#undef TLS_BIO_OPAQUE
#endif
#if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
!defined(LIBRESSL_VERSION_NUMBER)
#define SSL_state SSL_get_state
#define SSL_ST_OK TLS_ST_OK
#endif
struct tls {
SSL_CTX *ctx;
X509 *cert;
char *pass; /* password for private key */
};
void tls_flush_error(void);