diff options
author | Richard Levitte <levitte@openssl.org> | 2001-02-20 08:13:47 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2001-02-20 08:13:47 +0000 |
commit | bc36ee6227517edae802bcb0da68d4f04fe1fb5e (patch) | |
tree | 19782c56cd5f5930807df5c8bfb4963a05121c48 /ssl | |
parent | f2bc668429fa2abdc77db0db861a9bb2be0c3a85 (diff) |
Use new-style system-id macros everywhere possible. I hope I haven't
missed any.
This compiles and runs on Linux, and external applications have no
problems with it. The definite test will be to build this on VMS.
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/kssl.c | 10 | ||||
-rw-r--r-- | ssl/s23_clnt.c | 4 | ||||
-rw-r--r-- | ssl/s23_lib.c | 6 | ||||
-rw-r--r-- | ssl/s23_srvr.c | 6 | ||||
-rw-r--r-- | ssl/s2_clnt.c | 4 | ||||
-rw-r--r-- | ssl/s2_enc.c | 4 | ||||
-rw-r--r-- | ssl/s2_lib.c | 4 | ||||
-rw-r--r-- | ssl/s2_meth.c | 4 | ||||
-rw-r--r-- | ssl/s2_pkt.c | 4 | ||||
-rw-r--r-- | ssl/s2_srvr.c | 4 | ||||
-rw-r--r-- | ssl/s3_both.c | 2 | ||||
-rw-r--r-- | ssl/s3_clnt.c | 76 | ||||
-rw-r--r-- | ssl/s3_lib.c | 52 | ||||
-rw-r--r-- | ssl/s3_pkt.c | 2 | ||||
-rw-r--r-- | ssl/s3_srvr.c | 46 | ||||
-rw-r--r-- | ssl/ssl_algs.c | 18 | ||||
-rw-r--r-- | ssl/ssl_cert.c | 29 | ||||
-rw-r--r-- | ssl/ssl_ciph.c | 8 | ||||
-rw-r--r-- | ssl/ssl_err.c | 4 | ||||
-rw-r--r-- | ssl/ssl_err2.c | 2 | ||||
-rw-r--r-- | ssl/ssl_lib.c | 20 | ||||
-rw-r--r-- | ssl/ssl_locl.h | 13 | ||||
-rw-r--r-- | ssl/ssl_rsa.c | 30 | ||||
-rw-r--r-- | ssl/ssl_stat.c | 12 | ||||
-rw-r--r-- | ssl/ssl_txt.c | 2 | ||||
-rw-r--r-- | ssl/ssltest.c | 42 |
26 files changed, 204 insertions, 204 deletions
diff --git a/ssl/kssl.c b/ssl/kssl.c index 38ba725373..b3791b32aa 100644 --- a/ssl/kssl.c +++ b/ssl/kssl.c @@ -62,7 +62,7 @@ */ #include <openssl/opensslconf.h> -#ifndef NO_KRB5 +#ifndef OPENSSL_NO_KRB5 #include <string.h> #include <openssl/ssl.h> @@ -73,7 +73,7 @@ * and we do not link to a .LIB file. */ -#if defined(WINDOWS) || defined(WIN32) +#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) /* * The purpose of the following pre-processor statements is to provide * compatibility with different releases of MIT Kerberos for Windows. @@ -470,7 +470,7 @@ kssl_krb5_cc_get_principal else return(krb5_x ((cache)->ops->get_princ,(context, cache, principal))); } -#endif /* WINDOWS || WIN32 */ +#endif /* OPENSSL_SYS_WINDOWS || OPENSSL_SYS_WIN32 */ char *kstring(char *string) @@ -1031,11 +1031,11 @@ void kssl_krb5_free_data_contents(krb5_context context, krb5_data *data) #endif } -#else /* !NO_KRB5 */ +#else /* !OPENSSL_NO_KRB5 */ #ifdef PEDANTIC static int dummy=(int)&dummy; #endif -#endif /* !NO_KRB5 */ +#endif /* !OPENSSL_NO_KRB5 */ diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c index 5050a13ef2..1eafb4b446 100644 --- a/ssl/s23_clnt.c +++ b/ssl/s23_clnt.c @@ -68,7 +68,7 @@ static int ssl23_client_hello(SSL *s); static int ssl23_get_server_hello(SSL *s); static SSL_METHOD *ssl23_get_client_method(int ver) { -#ifndef NO_SSL2 +#ifndef OPENSSL_NO_SSL2 if (ver == SSL2_VERSION) return(SSLv2_client_method()); #endif @@ -322,7 +322,7 @@ static int ssl23_get_server_hello(SSL *s) if ((p[0] & 0x80) && (p[2] == SSL2_MT_SERVER_HELLO) && (p[5] == 0x00) && (p[6] == 0x02)) { -#ifdef NO_SSL2 +#ifdef OPENSSL_NO_SSL2 SSLerr(SSL_F_SSL23_GET_SERVER_HELLO,SSL_R_UNSUPPORTED_PROTOCOL); goto err; #else diff --git a/ssl/s23_lib.c b/ssl/s23_lib.c index dded7a19c5..ec739deff1 100644 --- a/ssl/s23_lib.c +++ b/ssl/s23_lib.c @@ -110,7 +110,7 @@ SSL_METHOD *sslv23_base_method(void) static int ssl23_num_ciphers(void) { return(ssl3_num_ciphers() -#ifndef NO_SSL2 +#ifndef OPENSSL_NO_SSL2 + ssl2_num_ciphers() #endif ); @@ -123,7 +123,7 @@ static SSL_CIPHER *ssl23_get_cipher(unsigned int u) if (u < uu) return(ssl3_get_cipher(u)); else -#ifndef NO_SSL2 +#ifndef OPENSSL_NO_SSL2 return(ssl2_get_cipher(u-uu)); #else return(NULL); @@ -143,7 +143,7 @@ static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p) ((unsigned long)p[1]<<8L)|(unsigned long)p[2]; c.id=id; cp=ssl3_get_cipher_by_char(p); -#ifndef NO_SSL2 +#ifndef OPENSSL_NO_SSL2 if (cp == NULL) cp=ssl2_get_cipher_by_char(p); #endif diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c index 050618235f..131054b411 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -67,7 +67,7 @@ static SSL_METHOD *ssl23_get_server_method(int ver); int ssl23_get_client_hello(SSL *s); static SSL_METHOD *ssl23_get_server_method(int ver) { -#ifndef NO_SSL2 +#ifndef OPENSSL_NO_SSL2 if (ver == SSL2_VERSION) return(SSLv2_server_method()); #endif @@ -208,7 +208,7 @@ int ssl23_get_client_hello(SSL *s) int n=0,j; int type=0; int v[2]; -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA int use_sslv2_strong=0; #endif @@ -474,7 +474,7 @@ int ssl23_get_client_hello(SSL *s) if (type == 1) { -#ifdef NO_SSL2 +#ifdef OPENSSL_NO_SSL2 SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_UNSUPPORTED_PROTOCOL); goto err; #else diff --git a/ssl/s2_clnt.c b/ssl/s2_clnt.c index 3e06286375..b549628dbd 100644 --- a/ssl/s2_clnt.c +++ b/ssl/s2_clnt.c @@ -57,7 +57,7 @@ */ #include "ssl_locl.h" -#ifndef NO_SSL2 +#ifndef OPENSSL_NO_SSL2 #include <stdio.h> #include <openssl/rand.h> #include <openssl/buffer.h> @@ -1001,7 +1001,7 @@ end: EVP_PKEY_free(pkey); return(i); } -#else /* !NO_SSL2 */ +#else /* !OPENSSL_NO_SSL2 */ # if PEDANTIC static void *dummy=&dummy; diff --git a/ssl/s2_enc.c b/ssl/s2_enc.c index 35acdf8276..c05ce5ddc0 100644 --- a/ssl/s2_enc.c +++ b/ssl/s2_enc.c @@ -57,7 +57,7 @@ */ #include "ssl_locl.h" -#ifndef NO_SSL2 +#ifndef OPENSSL_NO_SSL2 #include <stdio.h> int ssl2_enc_init(SSL *s, int client) @@ -178,7 +178,7 @@ void ssl2_mac(SSL *s, unsigned char *md, int send) EVP_DigestFinal(&c,md,NULL); /* some would say I should zero the md context */ } -#else /* !NO_SSL2 */ +#else /* !OPENSSL_NO_SSL2 */ # if PEDANTIC static void *dummy=&dummy; diff --git a/ssl/s2_lib.c b/ssl/s2_lib.c index a590dbfa5c..09fde61b5b 100644 --- a/ssl/s2_lib.c +++ b/ssl/s2_lib.c @@ -57,7 +57,7 @@ */ #include "ssl_locl.h" -#ifndef NO_SSL2 +#ifndef OPENSSL_NO_SSL2 #include <stdio.h> #include <openssl/rsa.h> #include <openssl/objects.h> @@ -479,7 +479,7 @@ int ssl2_shutdown(SSL *s) s->shutdown=(SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN); return(1); } -#else /* !NO_SSL2 */ +#else /* !OPENSSL_NO_SSL2 */ # if PEDANTIC static void *dummy=&dummy; diff --git a/ssl/s2_meth.c b/ssl/s2_meth.c index deb9e1d6f3..d30b7179f7 100644 --- a/ssl/s2_meth.c +++ b/ssl/s2_meth.c @@ -57,7 +57,7 @@ */ #include "ssl_locl.h" -#ifndef NO_SSL2 +#ifndef OPENSSL_NO_SSL2 #include <stdio.h> #include <openssl/objects.h> @@ -86,7 +86,7 @@ SSL_METHOD *SSLv2_method(void) } return(&SSLv2_data); } -#else /* !NO_SSL2 */ +#else /* !OPENSSL_NO_SSL2 */ # if PEDANTIC static void *dummy=&dummy; diff --git a/ssl/s2_pkt.c b/ssl/s2_pkt.c index 1f119442b4..d2dbf348ca 100644 --- a/ssl/s2_pkt.c +++ b/ssl/s2_pkt.c @@ -110,7 +110,7 @@ */ #include "ssl_locl.h" -#ifndef NO_SSL2 +#ifndef OPENSSL_NO_SSL2 #include <stdio.h> #include <errno.h> #define USE_SOCKETS @@ -708,7 +708,7 @@ static int ssl_mt_error(int n) } return(ret); } -#else /* !NO_SSL2 */ +#else /* !OPENSSL_NO_SSL2 */ # if PEDANTIC static void *dummy=&dummy; diff --git a/ssl/s2_srvr.c b/ssl/s2_srvr.c index 974d6e6de7..10de5ec3db 100644 --- a/ssl/s2_srvr.c +++ b/ssl/s2_srvr.c @@ -57,7 +57,7 @@ */ #include "ssl_locl.h" -#ifndef NO_SSL2 +#ifndef OPENSSL_NO_SSL2 #include <stdio.h> #include <openssl/bio.h> #include <openssl/rand.h> @@ -983,7 +983,7 @@ 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_SSL2 */ +#else /* !OPENSSL_NO_SSL2 */ # if PEDANTIC static void *dummy=&dummy; diff --git a/ssl/s3_both.c b/ssl/s3_both.c index 10d8d3b15a..3e98cb00cf 100644 --- a/ssl/s3_both.c +++ b/ssl/s3_both.c @@ -158,7 +158,7 @@ int ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen) p+=i; l=i; -#ifdef WIN16 +#ifdef OPENSSL_SYS_WIN16 /* MSVC 1.5 does not clear the top bytes of the word unless * I do this. */ diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 3b3c35b9d3..6212adfee6 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -65,7 +65,7 @@ #include <openssl/evp.h> #include "ssl_locl.h" -#ifndef NO_KRB5 +#ifndef OPENSSL_NO_KRB5 #include "kssl.h" #endif @@ -697,7 +697,7 @@ static int ssl3_get_server_certificate(SSL *s) SSL3_ST_CR_CERT_A, SSL3_ST_CR_CERT_B, -1, -#if defined(MSDOS) && !defined(WIN32) +#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32) 1024*30, /* 30k max cert list :-) */ #else 1024*100, /* 100k max cert list :-) */ @@ -864,7 +864,7 @@ err: static int ssl3_get_key_exchange(SSL *s) { -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA unsigned char *q,md_buf[EVP_MAX_MD_SIZE*2]; #endif EVP_MD_CTX md_ctx; @@ -872,10 +872,10 @@ static int ssl3_get_key_exchange(SSL *s) int al,i,j,param_len,ok; long n,alg; EVP_PKEY *pkey=NULL; -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA RSA *rsa=NULL; #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH DH *dh=NULL; #endif @@ -898,14 +898,14 @@ static int ssl3_get_key_exchange(SSL *s) if (s->session->sess_cert != NULL) { -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA if (s->session->sess_cert->peer_rsa_tmp != NULL) { RSA_free(s->session->sess_cert->peer_rsa_tmp); s->session->sess_cert->peer_rsa_tmp=NULL; } #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH if (s->session->sess_cert->peer_dh_tmp) { DH_free(s->session->sess_cert->peer_dh_tmp); @@ -921,7 +921,7 @@ static int ssl3_get_key_exchange(SSL *s) param_len=0; alg=s->s3->tmp.new_cipher->algorithms; -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA if (alg & SSL_kRSA) { if ((rsa=RSA_new()) == NULL) @@ -971,11 +971,11 @@ static int ssl3_get_key_exchange(SSL *s) s->session->sess_cert->peer_rsa_tmp=rsa; rsa=NULL; } -#else /* NO_RSA */ +#else /* OPENSSL_NO_RSA */ if (0) ; #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH else if (alg & SSL_kEDH) { if ((dh=DH_new()) == NULL) @@ -1029,14 +1029,14 @@ static int ssl3_get_key_exchange(SSL *s) p+=i; n-=param_len; -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA if (alg & SSL_aRSA) pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_RSA_ENC].x509); #else if (0) ; #endif -#ifndef NO_DSA +#ifndef OPENSSL_NO_DSA else if (alg & SSL_aDSS) pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_DSA_SIGN].x509); #endif @@ -1051,7 +1051,7 @@ static int ssl3_get_key_exchange(SSL *s) SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER); goto f_err; } -#endif /* !NO_DH */ +#endif /* !OPENSSL_NO_DH */ if (alg & SSL_aFZA) { al=SSL_AD_HANDSHAKE_FAILURE; @@ -1078,7 +1078,7 @@ static int ssl3_get_key_exchange(SSL *s) goto f_err; } -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA if (pkey->type == EVP_PKEY_RSA) { int num; @@ -1114,7 +1114,7 @@ static int ssl3_get_key_exchange(SSL *s) } else #endif -#ifndef NO_DSA +#ifndef OPENSSL_NO_DSA if (pkey->type == EVP_PKEY_DSA) { /* lets do DSS */ @@ -1158,11 +1158,11 @@ f_err: ssl3_send_alert(s,SSL3_AL_FATAL,al); err: EVP_PKEY_free(pkey); -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA if (rsa != NULL) RSA_free(rsa); #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH if (dh != NULL) DH_free(dh); #endif @@ -1182,7 +1182,7 @@ static int ssl3_get_certificate_request(SSL *s) SSL3_ST_CR_CERT_REQ_A, SSL3_ST_CR_CERT_REQ_B, -1, -#if defined(MSDOS) && !defined(WIN32) +#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32) 1024*30, /* 30k max cert list :-) */ #else 1024*100, /* 100k max cert list :-) */ @@ -1348,13 +1348,13 @@ static int ssl3_send_client_key_exchange(SSL *s) unsigned char *p,*d; int n; unsigned long l; -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA unsigned char *q; EVP_PKEY *pkey=NULL; #endif -#ifndef NO_KRB5 +#ifndef OPENSSL_NO_KRB5 KSSL_ERR kssl_err; -#endif /* NO_KRB5 */ +#endif /* OPENSSL_NO_KRB5 */ if (s->state == SSL3_ST_CW_KEY_EXCH_A) { @@ -1365,7 +1365,7 @@ static int ssl3_send_client_key_exchange(SSL *s) /* Fool emacs indentation */ if (0) {} -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA else if (l & SSL_kRSA) { RSA *rsa; @@ -1424,7 +1424,7 @@ static int ssl3_send_client_key_exchange(SSL *s) memset(tmp_buf,0,SSL_MAX_MASTER_KEY_LENGTH); } #endif -#ifndef NO_KRB5 +#ifndef OPENSSL_NO_KRB5 else if (l & SSL_kKRB5) { krb5_error_code krb5rc; @@ -1490,7 +1490,7 @@ static int ssl3_send_client_key_exchange(SSL *s) s->session->master_key, kssl_ctx->key,kssl_ctx->length); } #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH else if (l & (SSL_kEDH|SSL_kDHr|SSL_kDHd)) { DH *dh_srvr,*dh_clnt; @@ -1573,11 +1573,11 @@ static int ssl3_send_client_verify(SSL *s) unsigned char *p,*d; unsigned char data[MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH]; EVP_PKEY *pkey; -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA unsigned u=0; #endif unsigned long n; -#ifndef NO_DSA +#ifndef OPENSSL_NO_DSA int j; #endif @@ -1590,7 +1590,7 @@ static int ssl3_send_client_verify(SSL *s) s->method->ssl3_enc->cert_verify_mac(s,&(s->s3->finish_dgst2), &(data[MD5_DIGEST_LENGTH])); -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA if (pkey->type == EVP_PKEY_RSA) { s->method->ssl3_enc->cert_verify_mac(s, @@ -1607,7 +1607,7 @@ static int ssl3_send_client_verify(SSL *s) } else #endif -#ifndef NO_DSA +#ifndef OPENSSL_NO_DSA if (pkey->type == EVP_PKEY_DSA) { if (!DSA_sign(pkey->save_type, @@ -1723,10 +1723,10 @@ static int ssl3_check_cert_and_algorithm(SSL *s) long algs; EVP_PKEY *pkey=NULL; SESS_CERT *sc; -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA RSA *rsa; #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH DH *dh; #endif @@ -1744,10 +1744,10 @@ static int ssl3_check_cert_and_algorithm(SSL *s) if (algs & (SSL_aDH|SSL_aNULL|SSL_aKRB5)) return(1); -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA rsa=s->session->sess_cert->peer_rsa_tmp; #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH dh=s->session->sess_cert->peer_dh_tmp; #endif @@ -1765,14 +1765,14 @@ static int ssl3_check_cert_and_algorithm(SSL *s) SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_RSA_SIGNING_CERT); goto f_err; } -#ifndef NO_DSA +#ifndef OPENSSL_NO_DSA else if ((algs & SSL_aDSS) && !has_bits(i,EVP_PK_DSA|EVP_PKT_SIGN)) { SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_DSA_SIGNING_CERT); goto f_err; } #endif -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA if ((algs & SSL_kRSA) && !(has_bits(i,EVP_PK_RSA|EVP_PKT_ENC) || (rsa != NULL))) { @@ -1780,7 +1780,7 @@ static int ssl3_check_cert_and_algorithm(SSL *s) goto f_err; } #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH if ((algs & SSL_kEDH) && !(has_bits(i,EVP_PK_DH|EVP_PKT_EXCH) || (dh != NULL))) { @@ -1792,7 +1792,7 @@ static int ssl3_check_cert_and_algorithm(SSL *s) SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_DH_RSA_CERT); goto f_err; } -#ifndef NO_DSA +#ifndef OPENSSL_NO_DSA else if ((algs & SSL_kDHd) && !has_bits(i,EVP_PK_DH|EVP_PKS_DSA)) { SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_DH_DSA_CERT); @@ -1803,7 +1803,7 @@ static int ssl3_check_cert_and_algorithm(SSL *s) if (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) && !has_bits(i,EVP_PKT_EXP)) { -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA if (algs & SSL_kRSA) { if (rsa == NULL @@ -1815,7 +1815,7 @@ static int ssl3_check_cert_and_algorithm(SSL *s) } else #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH if (algs & (SSL_kEDH|SSL_kDHr|SSL_kDHd)) { if (dh == NULL diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 76c499e67a..e9aae569df 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -526,7 +526,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL_ALL_STRENGTHS, }, -#ifndef NO_KRB5 +#ifndef OPENSSL_NO_KRB5 /* The Kerberos ciphers ** 20000107 VRS: And the first shall be last, ** in hopes of avoiding the lynx ssl renegotiation problem. @@ -614,7 +614,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={ SSL_ALL_CIPHERS, SSL_ALL_STRENGTHS, }, -#endif /* NO_KRB5 */ +#endif /* OPENSSL_NO_KRB5 */ #if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES @@ -973,7 +973,7 @@ void ssl3_free(SSL *s) OPENSSL_free(s->s3->wbuf.buf); if (s->s3->rrec.comp != NULL) OPENSSL_free(s->s3->rrec.comp); -#ifndef NO_DH +#ifndef OPENSSL_NO_DH if (s->s3->tmp.dh != NULL) DH_free(s->s3->tmp.dh); #endif @@ -997,7 +997,7 @@ void ssl3_clear(SSL *s) OPENSSL_free(s->s3->rrec.comp); s->s3->rrec.comp=NULL; } -#ifndef NO_DH +#ifndef OPENSSL_NO_DH if (s->s3->tmp.dh != NULL) DH_free(s->s3->tmp.dh); #endif @@ -1023,13 +1023,13 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, char *parg) { int ret=0; -#if !defined(NO_DSA) || !defined(NO_RSA) +#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_RSA) if ( -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA cmd == SSL_CTRL_SET_TMP_RSA || cmd == SSL_CTRL_SET_TMP_RSA_CB || #endif -#ifndef NO_DSA +#ifndef OPENSSL_NO_DSA cmd == SSL_CTRL_SET_TMP_DH || cmd == SSL_CTRL_SET_TMP_DH_CB || #endif @@ -1063,7 +1063,7 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, char *parg) case SSL_CTRL_GET_FLAGS: ret=(int)(s->s3->flags); break; -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA case SSL_CTRL_NEED_TMP_RSA: if ((s->cert != NULL) && (s->cert->rsa_tmp == NULL) && ((s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL) || @@ -1096,7 +1096,7 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, char *parg) } break; #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH case SSL_CTRL_SET_TMP_DH: { DH *dh = (DH *)parg; @@ -1142,12 +1142,12 @@ long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)()) { int ret=0; -#if !defined(NO_DSA) || !defined(NO_RSA) +#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_RSA) if ( -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA cmd == SSL_CTRL_SET_TMP_RSA_CB || #endif -#ifndef NO_DSA +#ifndef OPENSSL_NO_DSA cmd == SSL_CTRL_SET_TMP_DH_CB || #endif 0) @@ -1162,14 +1162,14 @@ long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)()) switch (cmd) { -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA case SSL_CTRL_SET_TMP_RSA_CB: { s->cert->rsa_tmp_cb = (RSA *(*)(SSL *, int, int))fp; } break; #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH case SSL_CTRL_SET_TMP_DH_CB: { s->cert->dh_tmp_cb = (DH *(*)(SSL *, int, int))fp; @@ -1190,7 +1190,7 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, char *parg) switch (cmd) { -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA case SSL_CTRL_NEED_TMP_RSA: if ( (cert->rsa_tmp == NULL) && ((cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL) || @@ -1235,7 +1235,7 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, char *parg) } break; #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH case SSL_CTRL_SET_TMP_DH: { DH *new=NULL,*dh; @@ -1292,14 +1292,14 @@ long ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)()) switch (cmd) { -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA case SSL_CTRL_SET_TMP_RSA_CB: { cert->rsa_tmp_cb = (RSA *(*)(SSL *, int, int))fp; } break; #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH case SSL_CTRL_SET_TMP_DH_CB: { cert->dh_tmp_cb = (DH *(*)(SSL *, int, int))fp; @@ -1461,31 +1461,31 @@ int ssl3_get_req_cert_type(SSL *s, unsigned char *p) alg=s->s3->tmp.new_cipher->algorithms; -#ifndef NO_DH +#ifndef OPENSSL_NO_DH if (alg & (SSL_kDHr|SSL_kEDH)) { -# ifndef NO_RSA +# ifndef OPENSSL_NO_RSA p[ret++]=SSL3_CT_RSA_FIXED_DH; # endif -# ifndef NO_DSA +# ifndef OPENSSL_NO_DSA p[ret++]=SSL3_CT_DSS_FIXED_DH; # endif } if ((s->version == SSL3_VERSION) && (alg & (SSL_kEDH|SSL_kDHd|SSL_kDHr))) { -# ifndef NO_RSA +# ifndef OPENSSL_NO_RSA p[ret++]=SSL3_CT_RSA_EPHEMERAL_DH; # endif -# ifndef NO_DSA +# ifndef OPENSSL_NO_DSA p[ret++]=SSL3_CT_DSS_EPHEMERAL_DH; # endif } -#endif /* !NO_DH */ -#ifndef NO_RSA +#endif /* !OPENSSL_NO_DH */ +#ifndef OPENSSL_NO_RSA p[ret++]=SSL3_CT_RSA_SIGN; #endif -#ifndef NO_DSA +#ifndef OPENSSL_NO_DSA p[ret++]=SSL3_CT_DSS_SIGN; #endif return(ret); diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index 9ab76604a6..a128d616b5 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -1052,7 +1052,7 @@ start: switch (rr->type) { default: -#ifndef NO_TLS +#ifndef OPENSSL_NO_TLS /* TLS just ignores unknown message types */ if (s->version == TLS1_VERSION) { diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 4841109c4b..0a46e4ab74 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -70,9 +70,9 @@ #include <openssl/x509.h> #include "ssl_locl.h" -#ifndef NO_KRB5 +#ifndef OPENSSL_NO_KRB5 #include "kssl.h" -#endif /* NO_KRB5 */ +#endif /* OPENSSL_NO_KRB5 */ static SSL_METHOD *ssl3_get_server_method(int ver); static int ssl3_get_client_hello(SSL *s); @@ -267,9 +267,9 @@ int ssl3_accept(SSL *s) /* clear this, it may get reset by * send_server_key_exchange */ if ((s->options & SSL_OP_EPHEMERAL_RSA) -#ifndef NO_KRB5 +#ifndef OPENSSL_NO_KRB5 && !(l & SSL_KRB5) -#endif /* NO_KRB5 */ +#endif /* OPENSSL_NO_KRB5 */ ) s->s3->tmp.use_rsa_tmp=1; else @@ -555,7 +555,7 @@ static int ssl3_check_client_hello(SSL *s) * which will now be aborted. (A full SSL_clear would be too much.) * I hope that tmp.dh is the only thing that may need to be cleared * when a handshake is not completed ... */ -#ifndef NO_DH +#ifndef OPENSSL_NO_DH if (s->s3->tmp.dh != NULL) { DH_free(s->s3->tmp.dh); @@ -927,14 +927,14 @@ static int ssl3_send_server_done(SSL *s) static int ssl3_send_server_key_exchange(SSL *s) { -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA unsigned char *q; int j,num; RSA *rsa; unsigned char md_buf[MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH]; unsigned int u; #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH DH *dh=NULL,*dhp; #endif EVP_PKEY *pkey; @@ -957,7 +957,7 @@ static int ssl3_send_server_key_exchange(SSL *s) r[0]=r[1]=r[2]=r[3]=NULL; n=0; -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA if (type & SSL_kRSA) { rsa=cert->rsa_tmp; @@ -987,7 +987,7 @@ static int ssl3_send_server_key_exchange(SSL *s) } else #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH if (type & SSL_kEDH) { dhp=cert->dh_tmp; @@ -1091,7 +1091,7 @@ static int ssl3_send_server_key_exchange(SSL *s) { /* n is the length of the params, they start at &(d[4]) * and p points to the space at the end. */ -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA if (pkey->type == EVP_PKEY_RSA) { q=md_buf; @@ -1119,7 +1119,7 @@ static int ssl3_send_server_key_exchange(SSL *s) } else #endif -#if !defined(NO_DSA) +#if !defined(OPENSSL_NO_DSA) if (pkey->type == EVP_PKEY_DSA) { /* lets do DSS */ @@ -1257,17 +1257,17 @@ static int ssl3_get_client_key_exchange(SSL *s) long n; unsigned long l; unsigned char *p; -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA RSA *rsa=NULL; EVP_PKEY *pkey=NULL; #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH BIGNUM *pub=NULL; DH *dh_srvr; #endif -#ifndef NO_KRB5 +#ifndef OPENSSL_NO_KRB5 KSSL_ERR kssl_err; -#endif /* NO_KRB5 */ +#endif /* OPENSSL_NO_KRB5 */ n=ssl3_get_message(s, SSL3_ST_SR_KEY_EXCH_A, @@ -1281,7 +1281,7 @@ static int ssl3_get_client_key_exchange(SSL *s) l=s->s3->tmp.new_cipher->algorithms; -#ifndef NO_RSA +#ifndef OPENSSL_NO_RSA if (l & SSL_kRSA) { /* FIX THIS UP EAY EAY EAY EAY */ @@ -1366,7 +1366,7 @@ static int ssl3_get_client_key_exchange(SSL *s) } else #endif -#ifndef NO_DH +#ifndef OPENSSL_NO_DH if (l & (SSL_kEDH|SSL_kDHr|SSL_kDHd)) { n2s(p,i); @@ -1429,7 +1429,7 @@ static int ssl3_get_client_key_exchange(SSL *s) } |