ssl_toolkit_compat.h revision 9abce4c6fd76d615ca3359db2999848729315da2
#ifndef SSL_TOOLKIT_COMPAT_H
#define SSL_TOOLKIT_COMPAT_H
/*
* this header file provides a compatiblity layer
* between OpenSSL and RSA sslc
*/
#ifdef OPENSSL_VERSION_NUMBER
/*
* rsa sslc uses incomplete types for most structures
* so we macroize for OpenSSL those which cannot be dereferenced
* using the same sames as the sslc functions
*/
#define SSL_CIPHER_get_name(s) (s->name)
#define SSL_CIPHER_get_valid(s) (s->valid)
#define SSL_SESSION_get_session_id(s) (s->session_id)
#define SSL_SESSION_get_session_id_length(s) (s->session_id_length)
/*
* Support for retrieving/overriding states
*/
#ifndef SSL_get_state
#endif
#define MODSSL_BIO_CB_ARG_TYPE const char
#define MODSSL_CRYPTO_CB_ARG_TYPE const char
#define HAVE_SSL_RAND_EGD /* since 9.5.1 */
#define HAVE_SSL_X509V3_EXT_d2i
#else /* RSA sslc */
/* sslc does not support this function, OpenSSL has since 9.5.1 */
#define RAND_status() 1
#ifndef STACK_OF
#endif
#define MODSSL_BIO_CB_ARG_TYPE char
#define MODSSL_CRYPTO_CB_ARG_TYPE char
PEM_read_bio_X509(b, x, cb)
PEM_read_bio_PrivateKey(b, k, cb)
/* XXX: add configure check */
#ifndef HAVE_SSL_SET_STATE
#endif
#define modssl_set_cipher_list(ssl, l) \
SSL_set_cipher_list(ssl, (char *)l)
#ifndef PEM_F_DEF_CALLBACK
#define PEM_F_DEF_CALLBACK PEM_F_DEF_CB
#endif
#if SSLC_VERSION < 0x2000
#define X509_STORE_CTX_set_depth(st, d)
#else /* SSLC 1.x */
#define NO_SSL_X509V3_H
#endif
/* BEGIN GENERATED SECTION */
#define sk_SSL_CIPHER_free sk_free
#define sk_SSL_CIPHER_dup sk_dup
#define sk_SSL_CIPHER_num sk_num
#define sk_X509_num sk_num
#define sk_X509_INFO_num sk_num
#define sk_X509_INFO_new_null sk_new_null
#define sk_X509_NAME_num sk_num
#define sk_X509_NAME_free sk_free
#define sk_X509_NAME_new sk_new
#define sk_X509_NAME_ENTRY_num sk_num
#define sk_X509_REVOKED_num sk_num
#define sk_X509_pop_free sk_pop_free
/* END GENERATED SECTION */
#endif /* OPENSSL_VERSION_NUMBER */
#ifndef modssl_set_verify
#endif
#ifndef NO_SSL_X509V3_H
#define HAVE_SSL_X509V3_H
#endif
#endif /* SSL_TOOLKIT_COMPAT_H */