From 752d706aaf651ce87368bc826a3035a6a4f31190 Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Sat, 8 Jan 2000 21:06:24 +0000 Subject: [PATCH] Make NO_RSA compile with pedantic. --- apps/genrsa.c | 6 ++++++ apps/req.c | 4 ++++ apps/rsa.c | 6 ++++++ crypto/asn1/d2i_r_pr.c | 6 ++++++ crypto/asn1/d2i_r_pu.c | 6 ++++++ crypto/asn1/i2d_r_pr.c | 6 ++++++ crypto/asn1/i2d_r_pu.c | 6 ++++++ crypto/asn1/n_pkey.c | 7 +++++++ crypto/evp/p_open.c | 6 ++++++ crypto/pem/pem_seal.c | 6 ++++++ rsaref/rsaref.c | 6 ++++++ ssl/s2_clnt.c | 6 ++++++ ssl/s2_lib.c | 6 ++++++ ssl/s2_meth.c | 6 ++++++ ssl/s2_srvr.c | 6 ++++++ ssl/s3_srvr.c | 2 +- 16 files changed, 90 insertions(+), 1 deletion(-) diff --git a/apps/genrsa.c b/apps/genrsa.c index 96df5703c4..00a556599c 100644 --- a/apps/genrsa.c +++ b/apps/genrsa.c @@ -216,4 +216,10 @@ static void MS_CALLBACK genrsa_cb(int p, int n, void *arg) p=n; #endif } +#else /* !NO_RSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/apps/req.c b/apps/req.c index 00ce231033..78e3edcaea 100644 --- a/apps/req.c +++ b/apps/req.c @@ -120,7 +120,9 @@ static int add_attribute_object(STACK_OF(X509_ATTRIBUTE) *n, char *text, int max); static int add_DN_object(X509_NAME *n, char *text, char *def, char *value, int nid,int min,int max); +#ifndef NO_RSA static void MS_CALLBACK req_cb(int p,int n,void *arg); +#endif static int req_fix_data(int nid,int *type,int len,int min,int max); static int check_end(char *str, char *end); static int add_oid_section(LHASH *conf); @@ -1403,6 +1405,7 @@ err: return(0); } +#ifndef NO_RSA static void MS_CALLBACK req_cb(int p, int n, void *arg) { char c='*'; @@ -1417,6 +1420,7 @@ static void MS_CALLBACK req_cb(int p, int n, void *arg) p=n; #endif } +#endif static int req_fix_data(int nid, int *type, int len, int min, int max) { diff --git a/apps/rsa.c b/apps/rsa.c index 7d58b1715b..e5726938a9 100644 --- a/apps/rsa.c +++ b/apps/rsa.c @@ -395,4 +395,10 @@ end: if (rsa != NULL) RSA_free(rsa); EXIT(ret); } +#else /* !NO_RSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/crypto/asn1/d2i_r_pr.c b/crypto/asn1/d2i_r_pr.c index b6b2fc81a4..6c8a45f821 100644 --- a/crypto/asn1/d2i_r_pr.c +++ b/crypto/asn1/d2i_r_pr.c @@ -119,4 +119,10 @@ err: return(NULL); } +#else /* !NO_RSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/crypto/asn1/d2i_r_pu.c b/crypto/asn1/d2i_r_pu.c index e8ca782190..d1289f160e 100644 --- a/crypto/asn1/d2i_r_pu.c +++ b/crypto/asn1/d2i_r_pu.c @@ -94,4 +94,10 @@ err: if (bs != NULL) M_ASN1_INTEGER_free(bs); return(NULL); } +#else /* !NO_RSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/crypto/asn1/i2d_r_pr.c b/crypto/asn1/i2d_r_pr.c index 27e6844a7f..cf5fd9e94e 100644 --- a/crypto/asn1/i2d_r_pr.c +++ b/crypto/asn1/i2d_r_pr.c @@ -123,5 +123,11 @@ int i2d_RSAPrivateKey(RSA *a, unsigned char **pp) *pp=p; return(t); } +#else /* !NO_RSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/crypto/asn1/i2d_r_pu.c b/crypto/asn1/i2d_r_pu.c index 6d01bfa8b5..142392f1ae 100644 --- a/crypto/asn1/i2d_r_pu.c +++ b/crypto/asn1/i2d_r_pu.c @@ -109,4 +109,10 @@ int i2d_RSAPublicKey(RSA *a, unsigned char **pp) *pp=p; return(t); } +#else /* !NO_RSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/crypto/asn1/n_pkey.c b/crypto/asn1/n_pkey.c index b2fdadcc15..7e3d666f6e 100644 --- a/crypto/asn1/n_pkey.c +++ b/crypto/asn1/n_pkey.c @@ -338,4 +338,11 @@ static void NETSCAPE_PKEY_free(NETSCAPE_PKEY *a) } #endif /* NO_RC4 */ + +#else /* !NO_RSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/crypto/evp/p_open.c b/crypto/evp/p_open.c index ddb9fd6942..b9ca7892c2 100644 --- a/crypto/evp/p_open.c +++ b/crypto/evp/p_open.c @@ -110,4 +110,10 @@ int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) EVP_DecryptInit(ctx,NULL,NULL,NULL); return(i); } +#else /* !NO_RSA */ + +# ifdef PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/crypto/pem/pem_seal.c b/crypto/pem/pem_seal.c index 23f95beb1e..126e29d375 100644 --- a/crypto/pem/pem_seal.c +++ b/crypto/pem/pem_seal.c @@ -175,4 +175,10 @@ err: if (s != NULL) Free(s); return(ret); } +#else /* !NO_RSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/rsaref/rsaref.c b/rsaref/rsaref.c index 7677eb9fce..55cebc8fcb 100644 --- a/rsaref/rsaref.c +++ b/rsaref/rsaref.c @@ -298,4 +298,10 @@ err: memset(&rnd,0,sizeof(rnd)); return(outlen); } +#else /* !NO_RSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/ssl/s2_clnt.c b/ssl/s2_clnt.c index d047e89ed6..b0a656740c 100644 --- a/ssl/s2_clnt.c +++ b/ssl/s2_clnt.c @@ -974,4 +974,10 @@ end: EVP_PKEY_free(pkey); return(i); } +#else /* !NO_RSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/ssl/s2_lib.c b/ssl/s2_lib.c index ff804d8e0d..f473b459f2 100644 --- a/ssl/s2_lib.c +++ b/ssl/s2_lib.c @@ -421,4 +421,10 @@ int ssl2_shutdown(SSL *s) s->shutdown=(SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN); return(1); } +#else /* !NO_RSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/ssl/s2_meth.c b/ssl/s2_meth.c index e2add164dd..54ff252d9a 100644 --- a/ssl/s2_meth.c +++ b/ssl/s2_meth.c @@ -86,4 +86,10 @@ SSL_METHOD *SSLv2_method(void) } return(&SSLv2_data); } +#else /* !NO_RSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/ssl/s2_srvr.c b/ssl/s2_srvr.c index f8f1ba76d0..e219ae5e32 100644 --- a/ssl/s2_srvr.c +++ b/ssl/s2_srvr.c @@ -966,4 +966,10 @@ static int ssl_rsa_private_decrypt(CERT *c, int len, unsigned char *from, SSLerr(SSL_F_SSL_RSA_PRIVATE_DECRYPT,ERR_R_RSA_LIB); return(i); } +#else /* !NO_RSA */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 9e08b75ee3..85b0f5e9ef 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -900,6 +900,7 @@ static int ssl3_send_server_key_exchange(SSL *s) int j,num; RSA *rsa; unsigned char md_buf[MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH]; + unsigned int u; #endif #ifndef NO_DH DH *dh,*dhp; @@ -907,7 +908,6 @@ static int ssl3_send_server_key_exchange(SSL *s) EVP_PKEY *pkey; unsigned char *p,*d; int al,i; - unsigned int u; unsigned long type; int n; CERT *cert;