OPENSSL_NO_xxx cleanup: many removals

The following compile options (#ifdef's) are removed:
    OPENSSL_NO_BIO OPENSSL_NO_BUFFER OPENSSL_NO_CHAIN_VERIFY
    OPENSSL_NO_EVP OPENSSL_NO_FIPS_ERR OPENSSL_NO_HASH_COMP
    OPENSSL_NO_LHASH OPENSSL_NO_OBJECT OPENSSL_NO_SPEED OPENSSL_NO_STACK
    OPENSSL_NO_X509 OPENSSL_NO_X509_VERIFY

This diff is big because of updating the indents on preprocessor lines.

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Rich Salz 2015-01-27 10:06:22 -05:00
parent 109f1031a8
commit a00ae6c46e
27 changed files with 615 additions and 882 deletions

View File

@ -113,9 +113,7 @@ FUNCTION functions[] = {
#if !defined(OPENSSL_NO_SOCK) #if !defined(OPENSSL_NO_SOCK)
{FUNC_TYPE_GENERAL, "s_client", s_client_main}, {FUNC_TYPE_GENERAL, "s_client", s_client_main},
#endif #endif
#ifndef OPENSSL_NO_SPEED
{FUNC_TYPE_GENERAL, "speed", speed_main}, {FUNC_TYPE_GENERAL, "speed", speed_main},
#endif
#if !defined(OPENSSL_NO_SOCK) #if !defined(OPENSSL_NO_SOCK)
{FUNC_TYPE_GENERAL, "s_time", s_time_main}, {FUNC_TYPE_GENERAL, "s_time", s_time_main},
#endif #endif

View File

@ -33,8 +33,6 @@ foreach (@ARGV)
$str="\t{FUNC_TYPE_GENERAL,\"$_\",${_}_main},\n"; $str="\t{FUNC_TYPE_GENERAL,\"$_\",${_}_main},\n";
if (($_ =~ /^s_/) || ($_ =~ /^ciphers$/)) if (($_ =~ /^s_/) || ($_ =~ /^ciphers$/))
{ print "#if !defined(OPENSSL_NO_SOCK)\n${str}#endif\n"; } { print "#if !defined(OPENSSL_NO_SOCK)\n${str}#endif\n"; }
elsif ( ($_ =~ /^speed$/))
{ print "#ifndef OPENSSL_NO_SPEED\n${str}#endif\n"; }
elsif ( ($_ =~ /^engine$/)) elsif ( ($_ =~ /^engine$/))
{ print "#ifndef OPENSSL_NO_ENGINE\n${str}#endif\n"; } { print "#ifndef OPENSSL_NO_ENGINE\n${str}#endif\n"; }
elsif ( ($_ =~ /^rsa$/) || ($_ =~ /^genrsa$/) || ($_ =~ /^rsautl$/)) elsif ( ($_ =~ /^rsa$/) || ($_ =~ /^genrsa$/) || ($_ =~ /^rsautl$/))

File diff suppressed because it is too large Load Diff

View File

@ -61,9 +61,7 @@
# include <time.h> # include <time.h>
# include <openssl/e_os2.h> # include <openssl/e_os2.h>
# ifndef OPENSSL_NO_BIO # include <openssl/bio.h>
# include <openssl/bio.h>
# endif
# include <openssl/stack.h> # include <openssl/stack.h>
# include <openssl/safestack.h> # include <openssl/safestack.h>
@ -827,10 +825,8 @@ int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n);
int ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a, int ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a,
const unsigned char *flags, int flags_len); const unsigned char *flags, int flags_len);
# ifndef OPENSSL_NO_BIO
int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs, int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
BIT_STRING_BITNAME *tbl, int indent); BIT_STRING_BITNAME *tbl, int indent);
# endif
int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl); int ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl);
int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value, int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,
BIT_STRING_BITNAME *tbl); BIT_STRING_BITNAME *tbl);
@ -915,7 +911,6 @@ STACK_OF(OPENSSL_BLOCK) *d2i_ASN1_SET(STACK_OF(OPENSSL_BLOCK) **a,
void (*free_func) (OPENSSL_BLOCK), void (*free_func) (OPENSSL_BLOCK),
int ex_tag, int ex_class); int ex_tag, int ex_class);
# ifndef OPENSSL_NO_BIO
int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a); int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a);
int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size); int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a); int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);
@ -923,7 +918,6 @@ int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a); int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a);
int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size); int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type); int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type);
# endif
int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a); int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a);
int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num); int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
@ -1015,7 +1009,6 @@ int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags);
int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in); int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in);
# ifndef OPENSSL_NO_BIO
void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x); void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
# define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \ # define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \
@ -1048,7 +1041,6 @@ int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent); int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent, int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
int dump); int dump);
# endif
const char *ASN1_tag2str(int tag); const char *ASN1_tag2str(int tag);
/* Used to load and write netscape format cert */ /* Used to load and write netscape format cert */

View File

@ -322,7 +322,6 @@ int BN_asc2bn(BIGNUM **bn, const char *a)
return 1; return 1;
} }
#ifndef OPENSSL_NO_BIO
# ifndef OPENSSL_NO_STDIO # ifndef OPENSSL_NO_STDIO
int BN_print_fp(FILE *fp, const BIGNUM *a) int BN_print_fp(FILE *fp, const BIGNUM *a)
{ {
@ -362,7 +361,6 @@ int BN_print(BIO *bp, const BIGNUM *a)
end: end:
return (ret); return (ret);
} }
#endif
char *BN_options(void) char *BN_options(void)
{ {

View File

@ -65,9 +65,7 @@
# error DH is disabled. # error DH is disabled.
# endif # endif
# ifndef OPENSSL_NO_BIO # include <openssl/bio.h>
# include <openssl/bio.h>
# endif
# include <openssl/ossl_typ.h> # include <openssl/ossl_typ.h>
# ifdef OPENSSL_USE_DEPRECATED # ifdef OPENSSL_USE_DEPRECATED
# include <openssl/bn.h> # include <openssl/bn.h>
@ -233,11 +231,7 @@ int i2d_DHxparams(const DH *a, unsigned char **pp);
# ifndef OPENSSL_NO_STDIO # ifndef OPENSSL_NO_STDIO
int DHparams_print_fp(FILE *fp, const DH *x); int DHparams_print_fp(FILE *fp, const DH *x);
# endif # endif
# ifndef OPENSSL_NO_BIO
int DHparams_print(BIO *bp, const DH *x); int DHparams_print(BIO *bp, const DH *x);
# else
int DHparams_print(char *bp, const DH *x);
# endif
/* RFC 5114 parameters */ /* RFC 5114 parameters */
DH *DH_get_1024_160(void); DH *DH_get_1024_160(void);

View File

@ -71,9 +71,7 @@
# error DSA is disabled. # error DSA is disabled.
# endif # endif
# ifndef OPENSSL_NO_BIO # include <openssl/bio.h>
# include <openssl/bio.h>
# endif
# include <openssl/crypto.h> # include <openssl/crypto.h>
# include <openssl/ossl_typ.h> # include <openssl/ossl_typ.h>
@ -248,10 +246,8 @@ int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp); int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
int i2d_DSAparams(const DSA *a, unsigned char **pp); int i2d_DSAparams(const DSA *a, unsigned char **pp);
# ifndef OPENSSL_NO_BIO
int DSAparams_print(BIO *bp, const DSA *x); int DSAparams_print(BIO *bp, const DSA *x);
int DSA_print(BIO *bp, const DSA *x, int off); int DSA_print(BIO *bp, const DSA *x, int off);
# endif
# ifndef OPENSSL_NO_STDIO # ifndef OPENSSL_NO_STDIO
int DSAparams_print_fp(FILE *fp, const DSA *x); int DSAparams_print_fp(FILE *fp, const DSA *x);
int DSA_print_fp(FILE *bp, const DSA *x, int off); int DSA_print_fp(FILE *bp, const DSA *x, int off);

View File

@ -729,9 +729,7 @@ int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
# define i2d_ECPKParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECPKParameters,(fp), \ # define i2d_ECPKParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECPKParameters,(fp), \
(unsigned char *)(x)) (unsigned char *)(x))
# ifndef OPENSSL_NO_BIO
int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off); int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);
# endif
# ifndef OPENSSL_NO_STDIO # ifndef OPENSSL_NO_STDIO
int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off); int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
# endif # endif
@ -951,7 +949,6 @@ EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len);
*/ */
int i2o_ECPublicKey(EC_KEY *key, unsigned char **out); int i2o_ECPublicKey(EC_KEY *key, unsigned char **out);
# ifndef OPENSSL_NO_BIO
/** Prints out the ec parameters on human readable form. /** Prints out the ec parameters on human readable form.
* \param bp BIO object to which the information is printed * \param bp BIO object to which the information is printed
* \param key EC_KEY object * \param key EC_KEY object
@ -967,7 +964,6 @@ int ECParameters_print(BIO *bp, const EC_KEY *key);
*/ */
int EC_KEY_print(BIO *bp, const EC_KEY *key, int off); int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
# endif
# ifndef OPENSSL_NO_STDIO # ifndef OPENSSL_NO_STDIO
/** Prints out the ec parameters on human readable form. /** Prints out the ec parameters on human readable form.
* \param fp file descriptor to which the information is printed * \param fp file descriptor to which the information is printed

View File

@ -109,8 +109,6 @@
* *
*/ */
#define OPENSSL_NO_FIPS_ERR
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <string.h> #include <string.h>

View File

@ -120,12 +120,8 @@
# endif # endif
# include <openssl/ossl_typ.h> # include <openssl/ossl_typ.h>
# ifndef OPENSSL_NO_BIO # include <openssl/bio.h>
# include <openssl/bio.h> # include <openssl/lhash.h>
# endif
# ifndef OPENSSL_NO_LHASH
# include <openssl/lhash.h>
# endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -341,9 +337,7 @@ void ERR_print_errors_cb(int (*cb) (const char *str, size_t len, void *u),
# ifndef OPENSSL_NO_STDIO # ifndef OPENSSL_NO_STDIO
void ERR_print_errors_fp(FILE *fp); void ERR_print_errors_fp(FILE *fp);
# endif # endif
# ifndef OPENSSL_NO_BIO
void ERR_print_errors(BIO *bp); void ERR_print_errors(BIO *bp);
# endif
void ERR_add_error_data(int num, ...); void ERR_add_error_data(int num, ...);
void ERR_add_error_vdata(int num, va_list args); void ERR_add_error_vdata(int num, va_list args);
void ERR_load_strings(int lib, ERR_STRING_DATA str[]); void ERR_load_strings(int lib, ERR_STRING_DATA str[]);
@ -359,11 +353,9 @@ DECLARE_DEPRECATED(void ERR_remove_state(unsigned long pid)); /* if zero we
# endif # endif
ERR_STATE *ERR_get_state(void); ERR_STATE *ERR_get_state(void);
# ifndef OPENSSL_NO_LHASH
LHASH_OF(ERR_STRING_DATA) *ERR_get_string_table(void); LHASH_OF(ERR_STRING_DATA) *ERR_get_string_table(void);
LHASH_OF(ERR_STATE) *ERR_get_err_state_table(void); LHASH_OF(ERR_STATE) *ERR_get_err_state_table(void);
void ERR_release_err_state_table(LHASH_OF(ERR_STATE) **hash); void ERR_release_err_state_table(LHASH_OF(ERR_STATE) **hash);
# endif
int ERR_get_next_error_library(void); int ERR_get_next_error_library(void);

View File

@ -56,8 +56,6 @@
* [including the GNU Public Licence.] * [including the GNU Public Licence.]
*/ */
#define OPENSSL_NO_FIPS_ERR
#include <stdio.h> #include <stdio.h>
#include <openssl/asn1.h> #include <openssl/asn1.h>
#include <openssl/bn.h> #include <openssl/bn.h>

View File

@ -71,17 +71,8 @@
# include <openssl/symhacks.h> # include <openssl/symhacks.h>
# ifndef OPENSSL_NO_BIO # include <openssl/bio.h>
# include <openssl/bio.h>
# endif
/*-
#define EVP_RC2_KEY_SIZE 16
#define EVP_RC4_KEY_SIZE 16
#define EVP_BLOWFISH_KEY_SIZE 16
#define EVP_CAST5_KEY_SIZE 16
#define EVP_RC5_32_12_16_KEY_SIZE 16
*/
# define EVP_MAX_MD_SIZE 64/* longest known is SHA512 */ # define EVP_MAX_MD_SIZE 64/* longest known is SHA512 */
# define EVP_MAX_KEY_LENGTH 64 # define EVP_MAX_KEY_LENGTH 64
# define EVP_MAX_IV_LENGTH 16 # define EVP_MAX_IV_LENGTH 16
@ -751,14 +742,12 @@ int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);
int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key); int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
# ifndef OPENSSL_NO_BIO
BIO_METHOD *BIO_f_md(void); BIO_METHOD *BIO_f_md(void);
BIO_METHOD *BIO_f_base64(void); BIO_METHOD *BIO_f_base64(void);
BIO_METHOD *BIO_f_cipher(void); BIO_METHOD *BIO_f_cipher(void);
BIO_METHOD *BIO_f_reliable(void); BIO_METHOD *BIO_f_reliable(void);
__owur int BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k, __owur int BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,
const unsigned char *i, int enc); const unsigned char *i, int enc);
# endif
const EVP_MD *EVP_md_null(void); const EVP_MD *EVP_md_null(void);
# ifndef OPENSSL_NO_MD2 # ifndef OPENSSL_NO_MD2

View File

@ -65,78 +65,9 @@
*/ */
#include "cryptlib.h" #include "cryptlib.h"
#ifndef OPENSSL_NO_BIO #include <openssl/bio.h>
# include <openssl/bio.h>
#endif
#include <openssl/lhash.h> #include <openssl/lhash.h>
#ifdef OPENSSL_NO_BIO
void lh_stats(LHASH *lh, FILE *out)
{
fprintf(out, "num_items = %lu\n", lh->num_items);
fprintf(out, "num_nodes = %u\n", lh->num_nodes);
fprintf(out, "num_alloc_nodes = %u\n", lh->num_alloc_nodes);
fprintf(out, "num_expands = %lu\n", lh->num_expands);
fprintf(out, "num_expand_reallocs = %lu\n", lh->num_expand_reallocs);
fprintf(out, "num_contracts = %lu\n", lh->num_contracts);
fprintf(out, "num_contract_reallocs = %lu\n", lh->num_contract_reallocs);
fprintf(out, "num_hash_calls = %lu\n", lh->num_hash_calls);
fprintf(out, "num_comp_calls = %lu\n", lh->num_comp_calls);
fprintf(out, "num_insert = %lu\n", lh->num_insert);
fprintf(out, "num_replace = %lu\n", lh->num_replace);
fprintf(out, "num_delete = %lu\n", lh->num_delete);
fprintf(out, "num_no_delete = %lu\n", lh->num_no_delete);
fprintf(out, "num_retrieve = %lu\n", lh->num_retrieve);
fprintf(out, "num_retrieve_miss = %lu\n", lh->num_retrieve_miss);
fprintf(out, "num_hash_comps = %lu\n", lh->num_hash_comps);
# if 0
fprintf(out, "p = %u\n", lh->p);
fprintf(out, "pmax = %u\n", lh->pmax);
fprintf(out, "up_load = %lu\n", lh->up_load);
fprintf(out, "down_load = %lu\n", lh->down_load);
# endif
}
void lh_node_stats(LHASH *lh, FILE *out)
{
LHASH_NODE *n;
unsigned int i, num;
for (i = 0; i < lh->num_nodes; i++) {
for (n = lh->b[i], num = 0; n != NULL; n = n->next)
num++;
fprintf(out, "node %6u -> %3u\n", i, num);
}
}
void lh_node_usage_stats(LHASH *lh, FILE *out)
{
LHASH_NODE *n;
unsigned long num;
unsigned int i;
unsigned long total = 0, n_used = 0;
for (i = 0; i < lh->num_nodes; i++) {
for (n = lh->b[i], num = 0; n != NULL; n = n->next)
num++;
if (num != 0) {
n_used++;
total += num;
}
}
fprintf(out, "%lu nodes used out of %u\n", n_used, lh->num_nodes);
fprintf(out, "%lu items\n", total);
if (n_used == 0)
return;
fprintf(out, "load %d.%02d actual load %d.%02d\n",
(int)(total / lh->num_nodes),
(int)((total % lh->num_nodes) * 100 / lh->num_nodes),
(int)(total / n_used), (int)((total % n_used) * 100 / n_used));
}
#else
# ifndef OPENSSL_NO_STDIO # ifndef OPENSSL_NO_STDIO
void lh_stats(const _LHASH *lh, FILE *fp) void lh_stats(const _LHASH *lh, FILE *fp)
{ {
@ -198,12 +129,6 @@ void lh_stats_bio(const _LHASH *lh, BIO *out)
BIO_printf(out, "num_retrieve = %lu\n", lh->num_retrieve); BIO_printf(out, "num_retrieve = %lu\n", lh->num_retrieve);
BIO_printf(out, "num_retrieve_miss = %lu\n", lh->num_retrieve_miss); BIO_printf(out, "num_retrieve_miss = %lu\n", lh->num_retrieve_miss);
BIO_printf(out, "num_hash_comps = %lu\n", lh->num_hash_comps); BIO_printf(out, "num_hash_comps = %lu\n", lh->num_hash_comps);
# if 0
BIO_printf(out, "p = %u\n", lh->p);
BIO_printf(out, "pmax = %u\n", lh->pmax);
BIO_printf(out, "up_load = %lu\n", lh->up_load);
BIO_printf(out, "down_load = %lu\n", lh->down_load);
# endif
} }
void lh_node_stats_bio(const _LHASH *lh, BIO *out) void lh_node_stats_bio(const _LHASH *lh, BIO *out)
@ -242,5 +167,3 @@ void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out)
(int)((total % lh->num_nodes) * 100 / lh->num_nodes), (int)((total % lh->num_nodes) * 100 / lh->num_nodes),
(int)(total / n_used), (int)((total % n_used) * 100 / n_used)); (int)(total / n_used), (int)((total % n_used) * 100 / n_used));
} }
#endif

View File

@ -194,9 +194,7 @@ void *lh_insert(_LHASH *lh, void *data)
} }
nn->data = data; nn->data = data;
nn->next = NULL; nn->next = NULL;
#ifndef OPENSSL_NO_HASH_COMP
nn->hash = hash; nn->hash = hash;
#endif
*rn = nn; *rn = nn;
ret = NULL; ret = NULL;
lh->num_insert++; lh->num_insert++;
@ -315,12 +313,7 @@ static void expand(_LHASH *lh)
nni = lh->num_alloc_nodes; nni = lh->num_alloc_nodes;
for (np = *n1; np != NULL;) { for (np = *n1; np != NULL;) {
#ifndef OPENSSL_NO_HASH_COMP
hash = np->hash; hash = np->hash;
#else
hash = lh->hash(np->data);
lh->num_hash_calls++;
#endif
if ((hash % nni) != p) { /* move it */ if ((hash % nni) != p) { /* move it */
*n1 = (*n1)->next; *n1 = (*n1)->next;
np->next = *n2; np->next = *n2;
@ -404,13 +397,11 @@ static LHASH_NODE **getrn(_LHASH *lh, const void *data, unsigned long *rhash)
cf = lh->comp; cf = lh->comp;
ret = &(lh->b[(int)nn]); ret = &(lh->b[(int)nn]);
for (n1 = *ret; n1 != NULL; n1 = n1->next) { for (n1 = *ret; n1 != NULL; n1 = n1->next) {
#ifndef OPENSSL_NO_HASH_COMP
lh->num_hash_comps++; lh->num_hash_comps++;
if (n1->hash != hash) { if (n1->hash != hash) {
ret = &(n1->next); ret = &(n1->next);
continue; continue;
} }
#endif
lh->num_comp_calls++; lh->num_comp_calls++;
if (cf(n1->data, data) == 0) if (cf(n1->data, data) == 0)
break; break;

View File

@ -68,9 +68,7 @@
# include <stdio.h> # include <stdio.h>
# endif # endif
# ifndef OPENSSL_NO_BIO # include <openssl/bio.h>
# include <openssl/bio.h>
# endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -79,9 +77,7 @@ extern "C" {
typedef struct lhash_node_st { typedef struct lhash_node_st {
void *data; void *data;
struct lhash_node_st *next; struct lhash_node_st *next;
# ifndef OPENSSL_NO_HASH_COMP
unsigned long hash; unsigned long hash;
# endif
} LHASH_NODE; } LHASH_NODE;
typedef int (*LHASH_COMP_FN_TYPE) (const void *, const void *); typedef int (*LHASH_COMP_FN_TYPE) (const void *, const void *);
@ -182,17 +178,9 @@ void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg);
unsigned long lh_strhash(const char *c); unsigned long lh_strhash(const char *c);
unsigned long lh_num_items(const _LHASH *lh); unsigned long lh_num_items(const _LHASH *lh);
# ifndef OPENSSL_NO_STDIO
void lh_stats(const _LHASH *lh, FILE *out);
void lh_node_stats(const _LHASH *lh, FILE *out);
void lh_node_usage_stats(const _LHASH *lh, FILE *out);
# endif
# ifndef OPENSSL_NO_BIO
void lh_stats_bio(const _LHASH *lh, BIO *out); void lh_stats_bio(const _LHASH *lh, BIO *out);
void lh_node_stats_bio(const _LHASH *lh, BIO *out); void lh_node_stats_bio(const _LHASH *lh, BIO *out);
void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out); void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
# endif
/* Type checking... */ /* Type checking... */

View File

@ -66,20 +66,7 @@
#include <openssl/bn.h> #include <openssl/bn.h>
/* obj_dat.h is generated from objects.h by obj_dat.pl */ /* obj_dat.h is generated from objects.h by obj_dat.pl */
#ifndef OPENSSL_NO_OBJECT #include "obj_dat.h"
# include "obj_dat.h"
#else
/* You will have to load all the objects needed manually in the application */
# define NUM_NID 0
# define NUM_SN 0
# define NUM_LN 0
# define NUM_OBJ 0
static const unsigned char lvalues[1];
static const ASN1_OBJECT nid_objs[1];
static const unsigned int sn_objs[1];
static const unsigned int ln_objs[1];
static const unsigned int obj_objs[1];
#endif
DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, sn); DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, sn);
DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, ln); DECLARE_OBJ_BSEARCH_CMP_FN(const ASN1_OBJECT *, unsigned int, ln);

View File

@ -60,12 +60,8 @@
# define HEADER_PEM_H # define HEADER_PEM_H
# include <openssl/e_os2.h> # include <openssl/e_os2.h>
# ifndef OPENSSL_NO_BIO # include <openssl/bio.h>
# include <openssl/bio.h> # include <openssl/stack.h>
# endif
# ifndef OPENSSL_NO_STACK
# include <openssl/stack.h>
# endif
# include <openssl/evp.h> # include <openssl/evp.h>
# include <openssl/x509.h> # include <openssl/x509.h>
# include <openssl/pem2.h> # include <openssl/pem2.h>
@ -343,7 +339,6 @@ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
# endif # endif
# ifndef OPENSSL_NO_BIO
# define DECLARE_PEM_read_bio(name, type) \ # define DECLARE_PEM_read_bio(name, type) \
type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u); type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u);
@ -357,13 +352,6 @@ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
unsigned char *kstr, int klen, pem_password_cb *cb, void *u); unsigned char *kstr, int klen, pem_password_cb *cb, void *u);
# else
# define DECLARE_PEM_read_bio(name, type) /**/
# define DECLARE_PEM_write_bio(name, type) /**/
# define DECLARE_PEM_write_bio_const(name, type) /**/
# define DECLARE_PEM_write_cb_bio(name, type) /**/
# endif
# define DECLARE_PEM_write(name, type) \ # define DECLARE_PEM_write(name, type) \
DECLARE_PEM_write_bio(name, type) \ DECLARE_PEM_write_bio(name, type) \
DECLARE_PEM_write_fp(name, type) DECLARE_PEM_write_fp(name, type)
@ -385,19 +373,12 @@ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
# define DECLARE_PEM_rw_cb(name, type) \ # define DECLARE_PEM_rw_cb(name, type) \
DECLARE_PEM_read(name, type) \ DECLARE_PEM_read(name, type) \
DECLARE_PEM_write_cb(name, type) DECLARE_PEM_write_cb(name, type)
# if 1
/* "userdata": new with OpenSSL 0.9.4 */
typedef int pem_password_cb (char *buf, int size, int rwflag, void *userdata); typedef int pem_password_cb (char *buf, int size, int rwflag, void *userdata);
# else
/* OpenSSL 0.9.3, 0.9.3a */
typedef int pem_password_cb (char *buf, int size, int rwflag);
# endif
int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher); int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher);
int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *len, int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *len,
pem_password_cb *callback, void *u); pem_password_cb *callback, void *u);
# ifndef OPENSSL_NO_BIO
int PEM_read_bio(BIO *bp, char **name, char **header, int PEM_read_bio(BIO *bp, char **name, char **header,
unsigned char **data, long *len); unsigned char **data, long *len);
int PEM_write_bio(BIO *bp, const char *name, const char *hdr, int PEM_write_bio(BIO *bp, const char *name, const char *hdr,
@ -416,7 +397,6 @@ STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk,
int PEM_X509_INFO_write_bio(BIO *bp, X509_INFO *xi, EVP_CIPHER *enc, int PEM_X509_INFO_write_bio(BIO *bp, X509_INFO *xi, EVP_CIPHER *enc,
unsigned char *kstr, int klen, unsigned char *kstr, int klen,
pem_password_cb *cd, void *u); pem_password_cb *cd, void *u);
# endif
int PEM_read(FILE *fp, char **name, char **header, int PEM_read(FILE *fp, char **name, char **header,
unsigned char **data, long *len); unsigned char **data, long *len);

View File

@ -61,9 +61,7 @@
# include <openssl/asn1.h> # include <openssl/asn1.h>
# ifndef OPENSSL_NO_BIO # include <openssl/bio.h>
# include <openssl/bio.h>
# endif
# include <openssl/crypto.h> # include <openssl/crypto.h>
# include <openssl/ossl_typ.h> # include <openssl/ossl_typ.h>
# ifdef OPENSSL_USE_DEPRECATED # ifdef OPENSSL_USE_DEPRECATED
@ -395,9 +393,7 @@ DECLARE_ASN1_FUNCTIONS(RSA_OAEP_PARAMS)
int RSA_print_fp(FILE *fp, const RSA *r, int offset); int RSA_print_fp(FILE *fp, const RSA *r, int offset);
# endif # endif
# ifndef OPENSSL_NO_BIO
int RSA_print(BIO *bp, const RSA *r, int offset); int RSA_print(BIO *bp, const RSA *r, int offset);
# endif
# ifndef OPENSSL_NO_RC4 # ifndef OPENSSL_NO_RC4
int i2d_RSA_NET(const RSA *a, unsigned char **pp, int i2d_RSA_NET(const RSA *a, unsigned char **pp,

View File

@ -62,15 +62,9 @@
# include <openssl/opensslconf.h> # include <openssl/opensslconf.h>
# include <openssl/symhacks.h> # include <openssl/symhacks.h>
# ifndef OPENSSL_NO_BUFFER # include <openssl/buffer.h>
# include <openssl/buffer.h> # include <openssl/evp.h>
# endif # include <openssl/bio.h>
# ifndef OPENSSL_NO_EVP
# include <openssl/evp.h>
# endif
# ifndef OPENSSL_NO_BIO
# include <openssl/bio.h>
# endif
# include <openssl/stack.h> # include <openssl/stack.h>
# include <openssl/asn1.h> # include <openssl/asn1.h>
# include <openssl/safestack.h> # include <openssl/safestack.h>

View File

@ -67,7 +67,6 @@ ASN1_SEQUENCE(TS_MSG_IMPRINT) = {
IMPLEMENT_ASN1_FUNCTIONS_const(TS_MSG_IMPRINT) IMPLEMENT_ASN1_FUNCTIONS_const(TS_MSG_IMPRINT)
IMPLEMENT_ASN1_DUP_FUNCTION(TS_MSG_IMPRINT) IMPLEMENT_ASN1_DUP_FUNCTION(TS_MSG_IMPRINT)
#ifndef OPENSSL_NO_BIO
TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_bio(BIO *bp, TS_MSG_IMPRINT **a) TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_bio(BIO *bp, TS_MSG_IMPRINT **a)
{ {
return ASN1_d2i_bio_of(TS_MSG_IMPRINT, TS_MSG_IMPRINT_new, return ASN1_d2i_bio_of(TS_MSG_IMPRINT, TS_MSG_IMPRINT_new,
@ -78,7 +77,6 @@ int i2d_TS_MSG_IMPRINT_bio(BIO *bp, TS_MSG_IMPRINT *a)
{ {
return ASN1_i2d_bio_of_const(TS_MSG_IMPRINT, i2d_TS_MSG_IMPRINT, bp, a); return ASN1_i2d_bio_of_const(TS_MSG_IMPRINT, i2d_TS_MSG_IMPRINT, bp, a);
} }
#endif
#ifndef OPENSSL_NO_STDIO #ifndef OPENSSL_NO_STDIO
TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT **a) TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT **a)
{ {
@ -103,7 +101,6 @@ ASN1_SEQUENCE(TS_REQ) = {
IMPLEMENT_ASN1_FUNCTIONS_const(TS_REQ) IMPLEMENT_ASN1_FUNCTIONS_const(TS_REQ)
IMPLEMENT_ASN1_DUP_FUNCTION(TS_REQ) IMPLEMENT_ASN1_DUP_FUNCTION(TS_REQ)
#ifndef OPENSSL_NO_BIO
TS_REQ *d2i_TS_REQ_bio(BIO *bp, TS_REQ **a) TS_REQ *d2i_TS_REQ_bio(BIO *bp, TS_REQ **a)
{ {
return ASN1_d2i_bio_of(TS_REQ, TS_REQ_new, d2i_TS_REQ, bp, a); return ASN1_d2i_bio_of(TS_REQ, TS_REQ_new, d2i_TS_REQ, bp, a);
@ -113,7 +110,6 @@ int i2d_TS_REQ_bio(BIO *bp, TS_REQ *a)
{ {
return ASN1_i2d_bio_of_const(TS_REQ, i2d_TS_REQ, bp, a); return ASN1_i2d_bio_of_const(TS_REQ, i2d_TS_REQ, bp, a);
} }
#endif
#ifndef OPENSSL_NO_STDIO #ifndef OPENSSL_NO_STDIO
TS_REQ *d2i_TS_REQ_fp(FILE *fp, TS_REQ **a) TS_REQ *d2i_TS_REQ_fp(FILE *fp, TS_REQ **a)
{ {
@ -150,7 +146,6 @@ ASN1_SEQUENCE(TS_TST_INFO) = {
IMPLEMENT_ASN1_FUNCTIONS_const(TS_TST_INFO) IMPLEMENT_ASN1_FUNCTIONS_const(TS_TST_INFO)
IMPLEMENT_ASN1_DUP_FUNCTION(TS_TST_INFO) IMPLEMENT_ASN1_DUP_FUNCTION(TS_TST_INFO)
#ifndef OPENSSL_NO_BIO
TS_TST_INFO *d2i_TS_TST_INFO_bio(BIO *bp, TS_TST_INFO **a) TS_TST_INFO *d2i_TS_TST_INFO_bio(BIO *bp, TS_TST_INFO **a)
{ {
return ASN1_d2i_bio_of(TS_TST_INFO, TS_TST_INFO_new, d2i_TS_TST_INFO, bp, return ASN1_d2i_bio_of(TS_TST_INFO, TS_TST_INFO_new, d2i_TS_TST_INFO, bp,
@ -161,7 +156,6 @@ int i2d_TS_TST_INFO_bio(BIO *bp, TS_TST_INFO *a)
{ {
return ASN1_i2d_bio_of_const(TS_TST_INFO, i2d_TS_TST_INFO, bp, a); return ASN1_i2d_bio_of_const(TS_TST_INFO, i2d_TS_TST_INFO, bp, a);
} }
#endif
#ifndef OPENSSL_NO_STDIO #ifndef OPENSSL_NO_STDIO
TS_TST_INFO *d2i_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO **a) TS_TST_INFO *d2i_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO **a)
{ {
@ -236,7 +230,6 @@ IMPLEMENT_ASN1_FUNCTIONS_const(TS_RESP)
IMPLEMENT_ASN1_DUP_FUNCTION(TS_RESP) IMPLEMENT_ASN1_DUP_FUNCTION(TS_RESP)
#ifndef OPENSSL_NO_BIO
TS_RESP *d2i_TS_RESP_bio(BIO *bp, TS_RESP **a) TS_RESP *d2i_TS_RESP_bio(BIO *bp, TS_RESP **a)
{ {
return ASN1_d2i_bio_of(TS_RESP, TS_RESP_new, d2i_TS_RESP, bp, a); return ASN1_d2i_bio_of(TS_RESP, TS_RESP_new, d2i_TS_RESP, bp, a);
@ -246,7 +239,6 @@ int i2d_TS_RESP_bio(BIO *bp, TS_RESP *a)
{ {
return ASN1_i2d_bio_of_const(TS_RESP, i2d_TS_RESP, bp, a); return ASN1_i2d_bio_of_const(TS_RESP, i2d_TS_RESP, bp, a);
} }
#endif
#ifndef OPENSSL_NO_STDIO #ifndef OPENSSL_NO_STDIO
TS_RESP *d2i_TS_RESP_fp(FILE *fp, TS_RESP **a) TS_RESP *d2i_TS_RESP_fp(FILE *fp, TS_RESP **a)
{ {

View File

@ -60,9 +60,7 @@
# define HEADER_TXT_DB_H # define HEADER_TXT_DB_H
# include <openssl/opensslconf.h> # include <openssl/opensslconf.h>
# ifndef OPENSSL_NO_BIO # include <openssl/bio.h>
# include <openssl/bio.h>
# endif
# include <openssl/stack.h> # include <openssl/stack.h>
# include <openssl/lhash.h> # include <openssl/lhash.h>
@ -91,13 +89,8 @@ typedef struct txt_db_st {
OPENSSL_STRING *arg_row; OPENSSL_STRING *arg_row;
} TXT_DB; } TXT_DB;
# ifndef OPENSSL_NO_BIO
TXT_DB *TXT_DB_read(BIO *in, int num); TXT_DB *TXT_DB_read(BIO *in, int num);
long TXT_DB_write(BIO *out, TXT_DB *db); long TXT_DB_write(BIO *out, TXT_DB *db);
# else
TXT_DB *TXT_DB_read(char *in, int num);
long TXT_DB_write(char *out, TXT_DB *db);
# endif
int TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *), int TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *),
LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp); LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp);
void TXT_DB_free(TXT_DB *db); void TXT_DB_free(TXT_DB *db);

View File

@ -66,15 +66,9 @@
# include <openssl/e_os2.h> # include <openssl/e_os2.h>
# include <openssl/symhacks.h> # include <openssl/symhacks.h>
# ifndef OPENSSL_NO_BUFFER # include <openssl/buffer.h>
# include <openssl/buffer.h> # include <openssl/evp.h>
# endif # include <openssl/bio.h>
# ifndef OPENSSL_NO_EVP
# include <openssl/evp.h>
# endif
# ifndef OPENSSL_NO_BIO
# include <openssl/bio.h>
# endif
# include <openssl/stack.h> # include <openssl/stack.h>
# include <openssl/asn1.h> # include <openssl/asn1.h>
# include <openssl/safestack.h> # include <openssl/safestack.h>
@ -179,11 +173,7 @@ DECLARE_ASN1_SET_OF(X509_NAME_ENTRY)
struct X509_name_st { struct X509_name_st {
STACK_OF(X509_NAME_ENTRY) *entries; STACK_OF(X509_NAME_ENTRY) *entries;
int modified; /* true if 'bytes' needs to be built */ int modified; /* true if 'bytes' needs to be built */
# ifndef OPENSSL_NO_BUFFER
BUF_MEM *bytes; BUF_MEM *bytes;
# else
char *bytes;
# endif
/* unsigned long hash; Keep the hash around for lookups */ /* unsigned long hash; Keep the hash around for lookups */
unsigned char *canon_enc; unsigned char *canon_enc;
int canon_enclen; int canon_enclen;
@ -492,7 +482,6 @@ typedef struct private_key_st {
int references; int references;
} X509_PKEY; } X509_PKEY;
# ifndef OPENSSL_NO_EVP
typedef struct X509_info_st { typedef struct X509_info_st {
X509 *x509; X509 *x509;
X509_CRL *crl; X509_CRL *crl;
@ -504,7 +493,6 @@ typedef struct X509_info_st {
} X509_INFO; } X509_INFO;
DECLARE_STACK_OF(X509_INFO) DECLARE_STACK_OF(X509_INFO)
# endif
/* /*
* The next 2 structures and their 8 routines were sent to me by Pat Richard * The next 2 structures and their 8 routines were sent to me by Pat Richard
@ -627,7 +615,6 @@ void *X509_CRL_get_meth_data(X509_CRL *crl);
const char *X509_verify_cert_error_string(long n); const char *X509_verify_cert_error_string(long n);
# ifndef OPENSSL_NO_EVP
int X509_verify(X509 *a, EVP_PKEY *r); int X509_verify(X509 *a, EVP_PKEY *r);
int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r); int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);
@ -664,7 +651,6 @@ int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
unsigned char *md, unsigned int *len); unsigned char *md, unsigned int *len);
int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type, int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
unsigned char *md, unsigned int *len); unsigned char *md, unsigned int *len);
# endif
# ifndef OPENSSL_NO_STDIO # ifndef OPENSSL_NO_STDIO
X509 *d2i_X509_fp(FILE *fp, X509 **x509); X509 *d2i_X509_fp(FILE *fp, X509 **x509);
@ -705,7 +691,6 @@ int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey);
EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a); EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);
# endif # endif
# ifndef OPENSSL_NO_BIO
X509 *d2i_X509_bio(BIO *bp, X509 **x509); X509 *d2i_X509_bio(BIO *bp, X509 **x509);
int i2d_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); X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);
@ -742,7 +727,6 @@ int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey);
EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a); EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);
int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey); int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey);
EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a); EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);
# endif
X509 *X509_dup(X509 *x509); X509 *X509_dup(X509 *x509);
X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa); X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);
@ -869,7 +853,6 @@ DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI)
DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC)
DECLARE_ASN1_FUNCTIONS(NETSCAPE_CERT_SEQUENCE) DECLARE_ASN1_FUNCTIONS(NETSCAPE_CERT_SEQUENCE)
# ifndef OPENSSL_NO_EVP
X509_INFO *X509_INFO_new(void); X509_INFO *X509_INFO_new(void);
void X509_INFO_free(X509_INFO *a); void X509_INFO_free(X509_INFO *a);
char *X509_NAME_oneline(X509_NAME *a, char *buf, int size); char *X509_NAME_oneline(X509_NAME *a, char *buf, int size);
@ -896,7 +879,6 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1,
int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1, int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,
X509_ALGOR *algor2, ASN1_BIT_STRING *signature, X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
void *asn, EVP_MD_CTX *ctx); void *asn, EVP_MD_CTX *ctx);
# endif
int X509_set_version(X509 *x, long version); int X509_set_version(X509 *x, long version);
int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial); int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
@ -992,7 +974,6 @@ int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent,
unsigned long flags); unsigned long flags);
# endif # endif
# ifndef OPENSSL_NO_BIO
int X509_NAME_print(BIO *bp, X509_NAME *name, int obase); int X509_NAME_print(BIO *bp, X509_NAME *name, int obase);
int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent,
unsigned long flags); unsigned long flags);
@ -1005,7 +986,6 @@ int X509_CRL_print(BIO *bp, X509_CRL *x);
int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag, int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
unsigned long cflag); unsigned long cflag);
int X509_REQ_print(BIO *bp, X509_REQ *req); int X509_REQ_print(BIO *bp, X509_REQ *req);
# endif
int X509_NAME_entry_count(X509_NAME *name); int X509_NAME_entry_count(X509_NAME *name);
int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len); int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);

View File

@ -538,9 +538,6 @@ static int get_issuer_sk(X509 **issuer, X509_STORE_CTX *ctx, X509 *x)
static int check_chain_extensions(X509_STORE_CTX *ctx) static int check_chain_extensions(X509_STORE_CTX *ctx)
{ {
#ifdef OPENSSL_NO_CHAIN_VERIFY
return 1;
#else
int i, ok = 0, must_be_ca, plen = 0; int i, ok = 0, must_be_ca, plen = 0;
X509 *x; X509 *x;
int (*cb) (int xok, X509_STORE_CTX *xctx); int (*cb) (int xok, X509_STORE_CTX *xctx);
@ -680,7 +677,6 @@ static int check_chain_extensions(X509_STORE_CTX *ctx)
ok = 1; ok = 1;
end: end:
return ok; return ok;
#endif
} }
static int check_name_constraints(X509_STORE_CTX *ctx) static int check_name_constraints(X509_STORE_CTX *ctx)

View File

@ -68,9 +68,7 @@
# define HEADER_X509_VFY_H # define HEADER_X509_VFY_H
# include <openssl/opensslconf.h> # include <openssl/opensslconf.h>
# ifndef OPENSSL_NO_LHASH # include <openssl/lhash.h>
# include <openssl/lhash.h>
# endif
# include <openssl/bio.h> # include <openssl/bio.h>
# include <openssl/crypto.h> # include <openssl/crypto.h>
# include <openssl/symhacks.h> # include <openssl/symhacks.h>

View File

@ -148,13 +148,9 @@
# ifndef OPENSSL_NO_COMP # ifndef OPENSSL_NO_COMP
# include <openssl/comp.h> # include <openssl/comp.h>
# endif # endif
# ifndef OPENSSL_NO_BIO # include <openssl/bio.h>
# include <openssl/bio.h>
# endif
# ifdef OPENSSL_USE_DEPRECATED # ifdef OPENSSL_USE_DEPRECATED
# ifndef OPENSSL_NO_X509 # include <openssl/x509.h>
# include <openssl/x509.h>
# endif
# include <openssl/crypto.h> # include <openssl/crypto.h>
# include <openssl/lhash.h> # include <openssl/lhash.h>
# include <openssl/buffer.h> # include <openssl/buffer.h>
@ -1417,20 +1413,12 @@ struct ssl_st {
* There are 2 BIO's even though they are normally both the same. This * There are 2 BIO's even though they are normally both the same. This
* is so data can be read and written to different handlers * is so data can be read and written to different handlers
*/ */
# ifndef OPENSSL_NO_BIO
/* used by SSL_read */ /* used by SSL_read */
BIO *rbio; BIO *rbio;
/* used by SSL_write */ /* used by SSL_write */
BIO *wbio; BIO *wbio;
/* used during session-id reuse to concatenate messages */ /* used during session-id reuse to concatenate messages */
BIO *bbio; BIO *bbio;
# else
/* used by SSL_read */
char *rbio;
/* used by SSL_write */
char *wbio;
char *bbio;
# endif
/* /*
* This holds a variable that indicates what we were doing when a 0 or -1 * This holds a variable that indicates what we were doing when a 0 or -1
* is returned. This is needed for non-blocking IO so we know what * is returned. This is needed for non-blocking IO so we know what
@ -2108,7 +2096,7 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
SSL_ctrl(s,SSL_CTRL_GET_RAW_CIPHERLIST,0,plst) SSL_ctrl(s,SSL_CTRL_GET_RAW_CIPHERLIST,0,plst)
# define SSL_get0_ec_point_formats(s, plst) \ # define SSL_get0_ec_point_formats(s, plst) \
SSL_ctrl(s,SSL_CTRL_GET_EC_POINT_FORMATS,0,plst) SSL_ctrl(s,SSL_CTRL_GET_EC_POINT_FORMATS,0,plst)
# ifndef OPENSSL_NO_BIO
BIO_METHOD *BIO_f_ssl(void); BIO_METHOD *BIO_f_ssl(void);
BIO *BIO_new_ssl(SSL_CTX *ctx, int client); BIO *BIO_new_ssl(SSL_CTX *ctx, int client);
BIO *BIO_new_ssl_connect(SSL_CTX *ctx); BIO *BIO_new_ssl_connect(SSL_CTX *ctx);
@ -2116,8 +2104,6 @@ BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx);
int BIO_ssl_copy_session_id(BIO *to, BIO *from); int BIO_ssl_copy_session_id(BIO *to, BIO *from);
void BIO_ssl_shutdown(BIO *ssl_bio); void BIO_ssl_shutdown(BIO *ssl_bio);
# endif
int SSL_CTX_set_cipher_list(SSL_CTX *, const char *str); int SSL_CTX_set_cipher_list(SSL_CTX *, const char *str);
SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth); SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);
void SSL_CTX_free(SSL_CTX *); void SSL_CTX_free(SSL_CTX *);
@ -2148,11 +2134,9 @@ int SSL_set_fd(SSL *s, int fd);
int SSL_set_rfd(SSL *s, int fd); int SSL_set_rfd(SSL *s, int fd);
int SSL_set_wfd(SSL *s, int fd); int SSL_set_wfd(SSL *s, int fd);
# endif # endif
# ifndef OPENSSL_NO_BIO
void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio); void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio);
BIO *SSL_get_rbio(const SSL *s); BIO *SSL_get_rbio(const SSL *s);
BIO *SSL_get_wbio(const SSL *s); BIO *SSL_get_wbio(const SSL *s);
# endif
int SSL_set_cipher_list(SSL *s, const char *str); int SSL_set_cipher_list(SSL *s, const char *str);
void SSL_set_read_ahead(SSL *s, int yes); void SSL_set_read_ahead(SSL *s, int yes);
int SSL_get_verify_mode(const SSL *s); int SSL_get_verify_mode(const SSL *s);
@ -2222,10 +2206,8 @@ unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s);
# ifndef OPENSSL_NO_STDIO # ifndef OPENSSL_NO_STDIO
int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses); int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses);
# endif # endif
# ifndef OPENSSL_NO_BIO
int SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses); int SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses);
int SSL_SESSION_print_keylog(BIO *bp, const SSL_SESSION *x); int SSL_SESSION_print_keylog(BIO *bp, const SSL_SESSION *x);
# endif
void SSL_SESSION_free(SSL_SESSION *ses); void SSL_SESSION_free(SSL_SESSION *ses);
int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp); int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp);
int SSL_set_session(SSL *to, SSL_SESSION *session); int SSL_set_session(SSL *to, SSL_SESSION *session);

View File

@ -740,7 +740,6 @@ int ssl_verify_cert_chain(SSL *s, STACK_OF(X509) *sk)
i = s->ctx->app_verify_callback(&ctx); /* should pass app_verify_arg */ i = s->ctx->app_verify_callback(&ctx); /* should pass app_verify_arg */
#endif #endif
else { else {
#ifndef OPENSSL_NO_X509_VERIFY
i = X509_verify_cert(&ctx); i = X509_verify_cert(&ctx);
# if 0 # if 0
/* Dummy error calls so mkerr generates them */ /* Dummy error calls so mkerr generates them */
@ -750,11 +749,6 @@ int ssl_verify_cert_chain(SSL *s, STACK_OF(X509) *sk)
# endif # endif
if (i > 0) if (i > 0)
i = ssl_security_cert_chain(s, ctx.chain, NULL, 1); i = ssl_security_cert_chain(s, ctx.chain, NULL, 1);
#else
i = 0;
ctx.error = X509_V_ERR_APPLICATION_VERIFICATION;
SSLerr(SSL_F_SSL_VERIFY_CERT_CHAIN, SSL_R_NO_VERIFY_CALLBACK);
#endif
} }
s->verify_result = ctx.error; s->verify_result = ctx.error;

View File

@ -2909,9 +2909,7 @@ static int app_verify_callback(X509_STORE_CTX *ctx, void *arg)
if (cb_arg->allow_proxy_certs) { if (cb_arg->allow_proxy_certs) {
X509_STORE_CTX_set_flags(ctx, X509_V_FLAG_ALLOW_PROXY_CERTS); X509_STORE_CTX_set_flags(ctx, X509_V_FLAG_ALLOW_PROXY_CERTS);
} }
#ifndef OPENSSL_NO_X509_VERIFY
ok = X509_verify_cert(ctx); ok = X509_verify_cert(ctx);
#endif
if (cb_arg->proxy_auth) { if (cb_arg->proxy_auth) {
if (ok > 0) { if (ok > 0) {