summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-05-31 13:55:46 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-05-31 13:55:46 +0000
commitbbd9cbe17dc32d506c33418a3ed6a65abe5809cf (patch)
treea8b69c076f5fd7bb25df652ef4bb273448753eb3 /lib
parent701de55ba9cba7093451660271e52c44572c339d (diff)
More manual OPENSSL_NO_EC and OPENSSL_NO_TLSEXT cleanup.
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/src/ssl/s3_clnt.c8
-rw-r--r--lib/libssl/src/ssl/s3_lib.c6
-rw-r--r--lib/libssl/src/ssl/s3_srvr.c8
-rw-r--r--lib/libssl/src/ssl/ssl_lib.c2
4 files changed, 10 insertions, 14 deletions
diff --git a/lib/libssl/src/ssl/s3_clnt.c b/lib/libssl/src/ssl/s3_clnt.c
index 66a7ec0d382..052d23bbf40 100644
--- a/lib/libssl/src/ssl/s3_clnt.c
+++ b/lib/libssl/src/ssl/s3_clnt.c
@@ -461,7 +461,7 @@ ssl3_connect(SSL *s)
if (ret <= 0)
goto end;
-#if defined(OPENSSL_NO_TLSEXT) || defined(OPENSSL_NO_NEXTPROTONEG)
+#ifdef OPENSSL_NO_NEXTPROTONEG
s->state = SSL3_ST_CW_FINISHED_A;
#else
if (s->s3->next_proto_neg_seen)
@@ -494,7 +494,7 @@ ssl3_connect(SSL *s)
break;
-#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
+#ifndef OPENSSL_NO_NEXTPROTONEG
case SSL3_ST_CW_NEXT_PROTO_A:
case SSL3_ST_CW_NEXT_PROTO_B:
ret = ssl3_send_next_proto(s);
@@ -2871,7 +2871,7 @@ err:
return (0);
}
-#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
+#ifndef OPENSSL_NO_NEXTPROTONEG
int
ssl3_send_next_proto(SSL *s)
{
@@ -2895,7 +2895,7 @@ ssl3_send_next_proto(SSL *s)
return (ssl3_do_write(s, SSL3_RT_HANDSHAKE));
}
-#endif /* !OPENSSL_NO_TLSEXT && !OPENSSL_NO_NEXTPROTONEG */
+#endif /* !OPENSSL_NO_NEXTPROTONEG */
/*
* Check to see if handshake is full or resumed. Usually this is just a
diff --git a/lib/libssl/src/ssl/s3_lib.c b/lib/libssl/src/ssl/s3_lib.c
index 9aa72a9c4ee..3b6eefd99b8 100644
--- a/lib/libssl/src/ssl/s3_lib.c
+++ b/lib/libssl/src/ssl/s3_lib.c
@@ -2409,7 +2409,7 @@ ssl3_clear(SSL *s)
s->s3->in_read_app_data = 0;
s->version = SSL3_VERSION;
-#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
+#ifndef OPENSSL_NO_NEXTPROTONEG
free(s->next_proto_negotiated);
s->next_proto_negotiated = NULL;
s->next_proto_negotiated_len = 0;
@@ -2972,11 +2972,9 @@ SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
SSL_CIPHER *c, *ret = NULL;
STACK_OF(SSL_CIPHER) *prio, *allow;
int i, ii, ok;
-#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_EC)
unsigned int j;
int ec_ok, ec_nid;
unsigned char ec_search1 = 0, ec_search2 = 0;
-#endif
CERT *cert;
unsigned long alg_k, alg_a, mask_k, mask_a, emask_k, emask_a;
@@ -3167,14 +3165,12 @@ SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt,
continue;
ii = sk_SSL_CIPHER_find(allow, c);
if (ii >= 0) {
-#if !defined(OPENSSL_NO_EC) && !defined(OPENSSL_NO_TLSEXT)
if ((alg_k & SSL_kEECDH) &&
(alg_a & SSL_aECDSA) && s->s3->is_probably_safari) {
if (!ret)
ret = sk_SSL_CIPHER_value(allow, ii);
continue;
}
-#endif
ret = sk_SSL_CIPHER_value(allow, ii);
break;
}
diff --git a/lib/libssl/src/ssl/s3_srvr.c b/lib/libssl/src/ssl/s3_srvr.c
index 4a6c3cb1e8b..f12b680e996 100644
--- a/lib/libssl/src/ssl/s3_srvr.c
+++ b/lib/libssl/src/ssl/s3_srvr.c
@@ -570,7 +570,7 @@ ssl3_accept(SSL *s)
* the client uses its key from the certificate
* for key exchange.
*/
-#if defined(OPENSSL_NO_TLSEXT) || defined(OPENSSL_NO_NEXTPROTONEG)
+#ifdef OPENSSL_NO_NEXTPROTONEG
s->state = SSL3_ST_SR_FINISHED_A;
#else
if (s->s3->next_proto_neg_seen)
@@ -641,7 +641,7 @@ ssl3_accept(SSL *s)
if (ret <= 0)
goto end;
-#if defined(OPENSSL_NO_TLSEXT) || defined(OPENSSL_NO_NEXTPROTONEG)
+#ifdef OPENSSL_NO_NEXTPROTONEG
s->state = SSL3_ST_SR_FINISHED_A;
#else
if (s->s3->next_proto_neg_seen)
@@ -652,7 +652,7 @@ ssl3_accept(SSL *s)
s->init_num = 0;
break;
-#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
+#ifndef OPENSSL_NO_NEXTPROTONEG
case SSL3_ST_SR_NEXT_PROTO_A:
case SSL3_ST_SR_NEXT_PROTO_B:
ret = ssl3_get_next_proto(s);
@@ -732,7 +732,7 @@ ssl3_accept(SSL *s)
goto end;
s->state = SSL3_ST_SW_FLUSH;
if (s->hit) {
-#if defined(OPENSSL_NO_TLSEXT) || defined(OPENSSL_NO_NEXTPROTONEG)
+#ifdef OPENSSL_NO_NEXTPROTONEG
s->s3->tmp.next_state = SSL3_ST_SR_FINISHED_A;
#else
if (s->s3->next_proto_neg_seen)
diff --git a/lib/libssl/src/ssl/ssl_lib.c b/lib/libssl/src/ssl/ssl_lib.c
index 55c6b4493a2..293292f1c30 100644
--- a/lib/libssl/src/ssl/ssl_lib.c
+++ b/lib/libssl/src/ssl/ssl_lib.c
@@ -553,7 +553,7 @@ SSL_free(SSL *s)
SSL_CTX_free(s->ctx);
-#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
+#ifndef OPENSSL_NO_NEXTPROTONEG
free(s->next_proto_negotiated);
#endif