WvStreams
wvsslhacks.h
1 /* -*- Mode: C++ -*-
2  * Worldvisions Tunnel Vision Software:
3  * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4  *
5  * Functions to make us compile with both newer and older versions of openssl.
6  *
7  * The trick here is to write C wrappers for functions where different
8  * versions of openssl have changed the pointer types of arguments: C
9  * files only give warnings about mismatched pointers, where C++ files
10  * fail completely.
11  */
12 #ifndef __WVSSLHACKS_H
13 #define __WVSSLHACKS_H
14 
15 #include <openssl/rsa.h>
16 #include <openssl/x509.h>
17 #include <openssl/ocsp.h>
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 RSA *wv_d2i_RSAPublicKey(RSA **a, const unsigned char **pp, long length);
24 RSA *wv_d2i_RSAPrivateKey(RSA **a, const unsigned char **pp, long length);
25 DSA *wv_d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
26 DSA *wv_d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
27 X509_REQ *wv_d2i_X509_REQ(X509_REQ **a, const unsigned char **pp, long length);
28 X509 *wv_d2i_X509(X509 **a, unsigned char **pp, long length);
29 
30 int wv_i2d_OCSP_REQUEST_bio(BIO *bio, OCSP_REQUEST *req);
31 
32 
33 #ifdef __cplusplus
34 };
35 #endif
36 
37 #endif // __WVSSLHACKS_H