diff options
author | Doug MacEachern <dougm@apache.org> | 2002-03-27 03:28:15 +0100 |
---|---|---|
committer | Doug MacEachern <dougm@apache.org> | 2002-03-27 03:28:15 +0100 |
commit | 1d2a39531c3d974e5e8aa7c637e29331c2aa2d85 (patch) | |
tree | c5354fd741b184ff47754be0e0504442fca4bc75 /modules/ssl/ssl_toolkit_compat.h | |
parent | 3rd arg of BIO callbacks in 'const char' in OpenSSL and 'char' in sslc, (diff) | |
download | apache2-1d2a39531c3d974e5e8aa7c637e29331c2aa2d85.tar.xz apache2-1d2a39531c3d974e5e8aa7c637e29331c2aa2d85.zip |
moving OpenSSL+sslc compat foo to ssl_toolkit_compat.h
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94199 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/ssl/ssl_toolkit_compat.h')
-rw-r--r-- | modules/ssl/ssl_toolkit_compat.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/modules/ssl/ssl_toolkit_compat.h b/modules/ssl/ssl_toolkit_compat.h new file mode 100644 index 0000000000..db67a33e65 --- /dev/null +++ b/modules/ssl/ssl_toolkit_compat.h @@ -0,0 +1,58 @@ +#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 EVP_PKEY_key_type(k) (EVP_PKEY_type(k->type)) + +#define X509_NAME_get_entries(xs) (xs->entries) +#define X509_REVOKED_get_serialNumber(xs) (xs->serialNumber) + +#define X509_get_signature_algorithm(xs) (xs->cert_info->signature->algorithm) +#define X509_get_key_algorithm(xs) (xs->cert_info->key->algor->algorithm) + +#define X509_NAME_ENTRY_get_data_ptr(xs) (xs->value->data) +#define X509_NAME_ENTRY_get_data_len(xs) (xs->value->length) + +#define SSL_CTX_get_extra_certs(ctx) (ctx->extra_certs) +#define SSL_CTX_set_extra_certs(ctx,value) {ctx->extra_certs = value;} + +#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 +#define SSL_get_state(ssl) SSL_state(ssl) +#endif + +#define SSL_set_state(ssl,val) (ssl)->state = val + +#define MODSSL_BIO_CB_ARG_TYPE const char + +#else /* RSA sslc */ + +#ifndef STACK_OF +#define STACK_OF(type) STACK +#endif + +#define MODSSL_BIO_CB_ARG_TYPE char + +#endif /* OPENSSL_VERSION_NUMBER */ + +#endif /* SSL_TOOLKIT_COMPAT_H */ |