| 1 |
#ifndef DAVIX_OPENSSL_INTERNAL_H |
| 2 |
#define DAVIX_OPENSSL_INTERNAL_H |
| 3 |
|
| 4 |
/// internal openssl declaration |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
#include <openssl/ssl.h> |
| 9 |
#include <openssl/err.h> |
| 10 |
#include <openssl/pkcs12.h> |
| 11 |
#include <openssl/x509v3.h> |
| 12 |
#include <openssl/rand.h> |
| 13 |
#include <openssl/opensslv.h> |
| 14 |
|
| 15 |
#include <libneon/src/ne_ssl.h> |
| 16 |
#include <libneon/src/ne_privssl.h> |
| 17 |
|
| 18 |
#ifdef __cplusplus |
| 19 |
extern "C" { |
| 20 |
#endif |
| 21 |
|
| 22 |
struct ne_ssl_dname_s { |
| 23 |
X509_NAME *dn; |
| 24 |
}; |
| 25 |
|
| 26 |
|
| 27 |
struct ne_ssl_certificate_s { |
| 28 |
ne_ssl_dname subj_dn, issuer_dn; |
| 29 |
X509 *subject; |
| 30 |
STACK_OF(X509) *chain; |
| 31 |
ne_ssl_certificate *issuer; |
| 32 |
char *identity; |
| 33 |
}; |
| 34 |
|
| 35 |
struct ne_ssl_client_cert_s { |
| 36 |
PKCS12 *p12; |
| 37 |
int decrypted; /* non-zero if successfully decrypted. */ |
| 38 |
ne_ssl_certificate cert; |
| 39 |
EVP_PKEY *pkey; |
| 40 |
char *friendly_name; |
| 41 |
}; |
| 42 |
|
| 43 |
|
| 44 |
ne_ssl_certificate *populate_cert(ne_ssl_certificate *cert, X509 *x5); |
| 45 |
|
| 46 |
|
| 47 |
#ifdef __cplusplus |
| 48 |
} |
| 49 |
#endif |
| 50 |
|
| 51 |
#endif // DAVIX_OPENSSL_INTERNAL_H |