WvStreams
|
00001 /* -*- Mode: C++ -*- 00002 * Worldvisions Tunnel Vision Software: 00003 * Copyright (C) 1997-2002 Net Integration Technologies, Inc. 00004 * 00005 * Functions to make us compile with both newer and older versions of openssl. 00006 * 00007 * The trick here is to write C wrappers for functions where different 00008 * versions of openssl have changed the pointer types of arguments: C 00009 * files only give warnings about mismatched pointers, where C++ files 00010 * fail completely. 00011 */ 00012 #ifndef __WVSSLHACKS_H 00013 #define __WVSSLHACKS_H 00014 00015 #include <openssl/rsa.h> 00016 #include <openssl/x509.h> 00017 #include <openssl/ocsp.h> 00018 00019 #ifdef __cplusplus 00020 extern "C" { 00021 #endif 00022 00023 RSA *wv_d2i_RSAPublicKey(RSA **a, const unsigned char **pp, long length); 00024 RSA *wv_d2i_RSAPrivateKey(RSA **a, const unsigned char **pp, long length); 00025 DSA *wv_d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length); 00026 DSA *wv_d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length); 00027 X509_REQ *wv_d2i_X509_REQ(X509_REQ **a, const unsigned char **pp, long length); 00028 X509 *wv_d2i_X509(X509 **a, unsigned char **pp, long length); 00029 00030 int wv_i2d_OCSP_REQUEST_bio(BIO *bio, OCSP_REQUEST *req); 00031 00032 00033 #ifdef __cplusplus 00034 }; 00035 #endif 00036 00037 #endif // __WVSSLHACKS_H