#define HEADER_ASN1_H
#include <time.h>
+#ifndef NO_BIO
+#include <openssl/bio.h>
+#endif
#include <openssl/bn.h>
#include <openssl/stack.h>
#include <openssl/safestack.h>
int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n);
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
BIT_STRING_BITNAME *tbl, int indent);
#endif
char *(*func)(), void (*free_func)(),
int ex_tag, int ex_class);
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a);
int a2i_ASN1_INTEGER(BIO *bp,ASN1_INTEGER *bs,char *buf,int size);
int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);
int ASN1_i2d_fp(int (*i2d)(),FILE *out,unsigned char *x);
#endif
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
char *ASN1_d2i_bio(char *(*xnew)(),char *(*d2i)(),BIO *bp,unsigned char **x);
int ASN1_i2d_bio(int (*i2d)(),BIO *out,unsigned char *x);
int ASN1_UTCTIME_print(BIO *fp,ASN1_UTCTIME *a);
#error DH is disabled.
#endif
+#ifndef NO_BIO
+#include <openssl/bio.h>
+#endif
#include <openssl/bn.h>
#include <openssl/crypto.h>
#ifndef NO_FP_API
int DHparams_print_fp(FILE *fp, DH *x);
#endif
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
int DHparams_print(BIO *bp, DH *x);
#else
int DHparams_print(char *bp, DH *x);
#error DSA is disabled.
#endif
+#ifndef NO_BIO
+#include <openssl/bio.h>
+#endif
#include <openssl/bn.h>
#include <openssl/crypto.h>
#ifndef NO_DH
int i2d_DSAPrivateKey(DSA *a, unsigned char **pp);
int i2d_DSAparams(DSA *a,unsigned char **pp);
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
int DSAparams_print(BIO *bp, DSA *x);
int DSA_print(BIO *bp, DSA *x, int off);
#endif
#include <stdlib.h>
#endif
+#ifndef NO_BIO
+#include <openssl/bio.h>
+#endif
+#ifndef NO_LHASH
+#include <openssl/lhash.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
#ifndef NO_FP_API
void ERR_print_errors_fp(FILE *fp);
#endif
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
void ERR_print_errors(BIO *bp);
void ERR_add_error_data(int num, ...);
#endif
void ERR_remove_state(unsigned long pid); /* if zero we look it up */
ERR_STATE *ERR_get_state(void);
-#ifdef HEADER_LHASH_H
+#ifndef NO_LHASH
LHASH *ERR_get_string_table(void);
LHASH *ERR_get_err_state_table(void); /* even less thread-safe than
* ERR_get_string_table :-) */
# undef OPENSSL_ALGORITHM_DEFINES
#endif
+#ifndef NO_BIO
+#include <openssl/bio.h>
+#endif
#ifndef NO_MD2
#include <openssl/md2.h>
#endif
int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
BIO_METHOD *BIO_f_md(void);
BIO_METHOD *BIO_f_base64(void);
BIO_METHOD *BIO_f_cipher(void);
* and things should work as expected */
#include "cryptlib.h"
+#ifndef NO_BIO
+#include <openssl/bio.h>
+#endif
#include <openssl/lhash.h>
-#ifndef HEADER_BIO_H
+#ifdef NO_BIO
void lh_stats(LHASH *lh, FILE *out)
{
#include <stdio.h>
#endif
+#ifndef NO_BIO
+#include <openssl/bio.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
void lh_node_usage_stats(LHASH *lh, FILE *out);
#endif
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
void lh_stats_bio(LHASH *lh, BIO *out);
void lh_node_stats_bio(LHASH *lh, BIO *out);
void lh_node_usage_stats_bio(LHASH *lh, BIO *out);
#ifndef HEADER_PEM_H
#define HEADER_PEM_H
+#ifndef NO_BIO
+#include <openssl/bio.h>
+#endif
+#ifndef NO_STACK
+#include <openssl/stack.h>
+#endif
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/pem2.h>
int num_recipient;
PEM_USER **recipient;
-#ifdef HEADER_STACK_H
+#ifndef NO_STACK
STACK *x509_chain; /* certificate chain */
#else
char *x509_chain; /* certificate chain */
#endif
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
#define DECLARE_PEM_read_bio(name, type) \
type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u);
int PEM_do_header (EVP_CIPHER_INFO *cipher, unsigned char *data,long *len,
pem_password_cb *callback,void *u);
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
int PEM_read_bio(BIO *bp, char **name, char **header,
unsigned char **data,long *len);
int PEM_write_bio(BIO *bp,const char *name,char *hdr,unsigned char *data,
#ifndef HEADER_RSA_H
#define HEADER_RSA_H
+#ifndef NO_BIO
+#include <openssl/bio.h>
+#endif
#include <openssl/bn.h>
#include <openssl/crypto.h>
int RSA_print_fp(FILE *fp, RSA *r,int offset);
#endif
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
int RSA_print(BIO *bp, RSA *r,int offset);
#endif
#ifndef HEADER_TXT_DB_H
#define HEADER_TXT_DB_H
+#ifndef NO_BIO
+#include <openssl/bio.h>
+#endif
#include <openssl/stack.h>
#include <openssl/lhash.h>
char **arg_row;
} TXT_DB;
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
TXT_DB *TXT_DB_read(BIO *in, int num);
long TXT_DB_write(BIO *out, TXT_DB *db);
#else
#define X509_REVOKED_get_ext_by_critical X509_REVOKED_get_ext_by_critic
#endif
+#ifndef NO_BUFFER
+#include <openssl/buffer.h>
+#endif
+#ifndef NO_EVP
+#include <openssl/evp.h>
+#endif
+#ifndef NO_BIO
+#include <openssl/bio.h>
+#endif
#include <openssl/stack.h>
#include <openssl/asn1.h>
#include <openssl/safestack.h>
{
STACK_OF(X509_NAME_ENTRY) *entries;
int modified; /* true if 'bytes' needs to be built */
-#ifdef HEADER_BUFFER_H
+#ifndef NO_BUFFER
BUF_MEM *bytes;
#else
char *bytes;
int references;
} X509_PKEY;
-#ifdef HEADER_ENVELOPE_H
+#ifndef NO_EVP
typedef struct X509_info_st
{
X509 *x509;
const char *X509_verify_cert_error_string(long n);
#ifndef SSLEAY_MACROS
-#ifdef HEADER_ENVELOPE_H
+#ifndef NO_EVP
int X509_verify(X509 *a, EVP_PKEY *r);
int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);
#endif
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
X509 *d2i_X509_bio(BIO *bp,X509 **x509);
int i2d_X509_bio(BIO *bp,X509 *x509);
X509_CRL *d2i_X509_CRL_bio(BIO *bp,X509_CRL **crl);
NETSCAPE_CERT_SEQUENCE *d2i_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE **a, unsigned char **pp, long length);
void NETSCAPE_CERT_SEQUENCE_free(NETSCAPE_CERT_SEQUENCE *a);
-#ifdef HEADER_ENVELOPE_H
+#ifndef NO_EVP
X509_INFO * X509_INFO_new(void);
void X509_INFO_free(X509_INFO *a);
char * X509_NAME_oneline(X509_NAME *a,char *buf,int size);
int X509_REQ_print_fp(FILE *bp,X509_REQ *req);
#endif
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
int X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
int X509_print(BIO *bp,X509 *x);
int X509_CERT_AUX_print(BIO *bp,X509_CERT_AUX *x, int indent);
#ifndef HEADER_X509_VFY_H
#define HEADER_X509_VFY_H
+#ifndef NO_LHASH
+#include <openssl/lhash.h>
+#endif
#include <openssl/bio.h>
#include <openssl/crypto.h>
{
/* The following is a cache of trusted certs */
int cache; /* if true, stash any hits */
-#ifdef HEADER_LHASH_H
+#ifndef NO_LHASH
LHASH *certs; /* cached certs; */
#else
char *certs;
#define X509v3_add_standard_extensions oX509v3_add_standard_extensions
#endif
-#ifdef HEADER_LHASH_H
+#ifndef NO_LHASH
X509_OBJECT *X509_OBJECT_retrieve_by_subject(LHASH *h,int type,X509_NAME *name);
#endif
void X509_OBJECT_up_ref_count(X509_OBJECT *a);
#ifndef HEADER_SSL_H
#define HEADER_SSL_H
+#ifndef NO_COMP
+#include <openssl/comp.h>
+#endif
+#ifndef NO_BIO
+#include <openssl/bio.h>
+#endif
+#ifndef NO_X509
+#include <openssl/x509.h>
+#endif
#include <openssl/safestack.h>
#ifdef __cplusplus
{
int id;
char *name;
-#ifdef HEADER_COMP_H
+#ifndef NO_COMP
COMP_METHOD *method;
#else
char *method;
* same. This is so data can be read and written to different
* handlers */
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
BIO *rbio; /* used by SSL_read */
BIO *wbio; /* used by SSL_write */
BIO *bbio; /* used during session-id reuse to concatinate
EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */
const EVP_MD *read_hash; /* used for mac generation */
-#ifdef HEADER_COMP_H
+#ifndef NO_COMP
COMP_CTX *expand; /* uncompress */
#else
char *expand;
EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */
const EVP_MD *write_hash; /* used for mac generation */
-#ifdef HEADER_COMP_H
+#ifndef NO_COMP
COMP_CTX *compress; /* compression */
#else
char *compress;
#define SSL_add_dir_cert_subjects_to_stack SSL_add_dir_cert_sub_to_stack
#endif
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
BIO_METHOD *BIO_f_ssl(void);
BIO *BIO_new_ssl(SSL_CTX *ctx,int client);
BIO *BIO_new_ssl_connect(SSL_CTX *ctx);
int SSL_set_rfd(SSL *s, int fd);
int SSL_set_wfd(SSL *s, int fd);
#endif
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
void SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio);
BIO * SSL_get_rbio(SSL *s);
BIO * SSL_get_wbio(SSL *s);
#ifndef NO_FP_API
int SSL_SESSION_print_fp(FILE *fp,SSL_SESSION *ses);
#endif
-#ifdef HEADER_BIO_H
+#ifndef NO_BIO
int SSL_SESSION_print(BIO *fp,SSL_SESSION *ses);
#endif
void SSL_SESSION_free(SSL_SESSION *ses);
int keylength));
#endif
-#ifdef HEADER_COMP_H
+#ifndef NO_COMP
int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm);
#else
int SSL_COMP_add_compression_method(int id,char *cm);
#ifndef HEADER_SSL3_H
#define HEADER_SSL3_H
+#ifndef NO_COMP
+#include <openssl/comp.h>
+#endif
#include <openssl/buffer.h>
#include <openssl/evp.h>
#include <openssl/ssl.h>
const EVP_CIPHER *new_sym_enc;
const EVP_MD *new_hash;
-#ifdef HEADER_COMP_H
+#ifndef NO_COMP
const SSL_COMP *new_compression;
#else
char *new_compression;