diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libssl/s3_both.c | 2 | ||||
| -rw-r--r-- | src/lib/libssl/s3_lib.c | 6 | ||||
| -rw-r--r-- | src/lib/libssl/src/ssl/s3_both.c | 2 | ||||
| -rw-r--r-- | src/lib/libssl/src/ssl/s3_lib.c | 6 | ||||
| -rw-r--r-- | src/lib/libssl/src/ssl/ssl.h | 4 | ||||
| -rw-r--r-- | src/lib/libssl/src/ssl/ssl3.h | 2 | ||||
| -rw-r--r-- | src/lib/libssl/src/ssl/ssl_lib.c | 4 | ||||
| -rw-r--r-- | src/lib/libssl/src/ssl/ssl_locl.h | 4 | ||||
| -rw-r--r-- | src/lib/libssl/src/ssl/ssl_sess.c | 6 | ||||
| -rw-r--r-- | src/lib/libssl/src/ssl/t1_lib.c | 22 | ||||
| -rw-r--r-- | src/lib/libssl/ssl.h | 4 | ||||
| -rw-r--r-- | src/lib/libssl/ssl3.h | 2 | ||||
| -rw-r--r-- | src/lib/libssl/ssl_lib.c | 4 | ||||
| -rw-r--r-- | src/lib/libssl/ssl_locl.h | 4 | ||||
| -rw-r--r-- | src/lib/libssl/ssl_sess.c | 6 | ||||
| -rw-r--r-- | src/lib/libssl/t1_lib.c | 22 |
16 files changed, 0 insertions, 100 deletions
diff --git a/src/lib/libssl/s3_both.c b/src/lib/libssl/s3_both.c index 54b73451eb..2a96c19914 100644 --- a/src/lib/libssl/s3_both.c +++ b/src/lib/libssl/s3_both.c | |||
| @@ -550,11 +550,9 @@ ssl_cert_type(X509 *x, EVP_PKEY *pkey) | |||
| 550 | } else if (i == EVP_PKEY_DSA) { | 550 | } else if (i == EVP_PKEY_DSA) { |
| 551 | ret = SSL_PKEY_DSA_SIGN; | 551 | ret = SSL_PKEY_DSA_SIGN; |
| 552 | } | 552 | } |
| 553 | #ifndef OPENSSL_NO_EC | ||
| 554 | else if (i == EVP_PKEY_EC) { | 553 | else if (i == EVP_PKEY_EC) { |
| 555 | ret = SSL_PKEY_ECC; | 554 | ret = SSL_PKEY_ECC; |
| 556 | } | 555 | } |
| 557 | #endif | ||
| 558 | else if (i == NID_id_GostR3410_94 || i == NID_id_GostR3410_94_cc) { | 556 | else if (i == NID_id_GostR3410_94 || i == NID_id_GostR3410_94_cc) { |
| 559 | ret = SSL_PKEY_GOST94; | 557 | ret = SSL_PKEY_GOST94; |
| 560 | } else if (i == NID_id_GostR3410_2001 || i == NID_id_GostR3410_2001_cc) { | 558 | } else if (i == NID_id_GostR3410_2001 || i == NID_id_GostR3410_2001_cc) { |
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 72492a3332..9aa72a9c4e 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
| @@ -151,9 +151,7 @@ | |||
| 151 | #include <stdio.h> | 151 | #include <stdio.h> |
| 152 | #include <openssl/objects.h> | 152 | #include <openssl/objects.h> |
| 153 | #include "ssl_locl.h" | 153 | #include "ssl_locl.h" |
| 154 | #ifndef OPENSSL_NO_EC | ||
| 155 | #include "../crypto/ec/ec_lcl.h" | 154 | #include "../crypto/ec/ec_lcl.h" |
| 156 | #endif /* OPENSSL_NO_EC */ | ||
| 157 | #include <openssl/md5.h> | 155 | #include <openssl/md5.h> |
| 158 | #include <openssl/dh.h> | 156 | #include <openssl/dh.h> |
| 159 | 157 | ||
| @@ -2381,9 +2379,7 @@ ssl3_clear(SSL *s) | |||
| 2381 | EC_KEY_free(s->s3->tmp.ecdh); | 2379 | EC_KEY_free(s->s3->tmp.ecdh); |
| 2382 | s->s3->tmp.ecdh = NULL; | 2380 | s->s3->tmp.ecdh = NULL; |
| 2383 | } | 2381 | } |
| 2384 | #ifndef OPENSSL_NO_EC | ||
| 2385 | s->s3->is_probably_safari = 0; | 2382 | s->s3->is_probably_safari = 0; |
| 2386 | #endif /* !OPENSSL_NO_EC */ | ||
| 2387 | 2383 | ||
| 2388 | rp = s->s3->rbuf.buf; | 2384 | rp = s->s3->rbuf.buf; |
| 2389 | wp = s->s3->wbuf.buf; | 2385 | wp = s->s3->wbuf.buf; |
| @@ -3031,7 +3027,6 @@ SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, | |||
| 3031 | ok = (alg_k & mask_k) && (alg_a & mask_a); | 3027 | ok = (alg_k & mask_k) && (alg_a & mask_a); |
| 3032 | } | 3028 | } |
| 3033 | 3029 | ||
| 3034 | #ifndef OPENSSL_NO_EC | ||
| 3035 | if ( | 3030 | if ( |
| 3036 | /* | 3031 | /* |
| 3037 | * if we are considering an ECC cipher suite that uses our | 3032 | * if we are considering an ECC cipher suite that uses our |
| @@ -3167,7 +3162,6 @@ SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, | |||
| 3167 | } | 3162 | } |
| 3168 | ok = ok && ec_ok; | 3163 | ok = ok && ec_ok; |
| 3169 | } | 3164 | } |
| 3170 | #endif /* OPENSSL_NO_EC */ | ||
| 3171 | 3165 | ||
| 3172 | if (!ok) | 3166 | if (!ok) |
| 3173 | continue; | 3167 | continue; |
diff --git a/src/lib/libssl/src/ssl/s3_both.c b/src/lib/libssl/src/ssl/s3_both.c index 54b73451eb..2a96c19914 100644 --- a/src/lib/libssl/src/ssl/s3_both.c +++ b/src/lib/libssl/src/ssl/s3_both.c | |||
| @@ -550,11 +550,9 @@ ssl_cert_type(X509 *x, EVP_PKEY *pkey) | |||
| 550 | } else if (i == EVP_PKEY_DSA) { | 550 | } else if (i == EVP_PKEY_DSA) { |
| 551 | ret = SSL_PKEY_DSA_SIGN; | 551 | ret = SSL_PKEY_DSA_SIGN; |
| 552 | } | 552 | } |
| 553 | #ifndef OPENSSL_NO_EC | ||
| 554 | else if (i == EVP_PKEY_EC) { | 553 | else if (i == EVP_PKEY_EC) { |
| 555 | ret = SSL_PKEY_ECC; | 554 | ret = SSL_PKEY_ECC; |
| 556 | } | 555 | } |
| 557 | #endif | ||
| 558 | else if (i == NID_id_GostR3410_94 || i == NID_id_GostR3410_94_cc) { | 556 | else if (i == NID_id_GostR3410_94 || i == NID_id_GostR3410_94_cc) { |
| 559 | ret = SSL_PKEY_GOST94; | 557 | ret = SSL_PKEY_GOST94; |
| 560 | } else if (i == NID_id_GostR3410_2001 || i == NID_id_GostR3410_2001_cc) { | 558 | } else if (i == NID_id_GostR3410_2001 || i == NID_id_GostR3410_2001_cc) { |
diff --git a/src/lib/libssl/src/ssl/s3_lib.c b/src/lib/libssl/src/ssl/s3_lib.c index 72492a3332..9aa72a9c4e 100644 --- a/src/lib/libssl/src/ssl/s3_lib.c +++ b/src/lib/libssl/src/ssl/s3_lib.c | |||
| @@ -151,9 +151,7 @@ | |||
| 151 | #include <stdio.h> | 151 | #include <stdio.h> |
| 152 | #include <openssl/objects.h> | 152 | #include <openssl/objects.h> |
| 153 | #include "ssl_locl.h" | 153 | #include "ssl_locl.h" |
| 154 | #ifndef OPENSSL_NO_EC | ||
| 155 | #include "../crypto/ec/ec_lcl.h" | 154 | #include "../crypto/ec/ec_lcl.h" |
| 156 | #endif /* OPENSSL_NO_EC */ | ||
| 157 | #include <openssl/md5.h> | 155 | #include <openssl/md5.h> |
| 158 | #include <openssl/dh.h> | 156 | #include <openssl/dh.h> |
| 159 | 157 | ||
| @@ -2381,9 +2379,7 @@ ssl3_clear(SSL *s) | |||
| 2381 | EC_KEY_free(s->s3->tmp.ecdh); | 2379 | EC_KEY_free(s->s3->tmp.ecdh); |
| 2382 | s->s3->tmp.ecdh = NULL; | 2380 | s->s3->tmp.ecdh = NULL; |
| 2383 | } | 2381 | } |
| 2384 | #ifndef OPENSSL_NO_EC | ||
| 2385 | s->s3->is_probably_safari = 0; | 2382 | s->s3->is_probably_safari = 0; |
| 2386 | #endif /* !OPENSSL_NO_EC */ | ||
| 2387 | 2383 | ||
| 2388 | rp = s->s3->rbuf.buf; | 2384 | rp = s->s3->rbuf.buf; |
| 2389 | wp = s->s3->wbuf.buf; | 2385 | wp = s->s3->wbuf.buf; |
| @@ -3031,7 +3027,6 @@ SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, | |||
| 3031 | ok = (alg_k & mask_k) && (alg_a & mask_a); | 3027 | ok = (alg_k & mask_k) && (alg_a & mask_a); |
| 3032 | } | 3028 | } |
| 3033 | 3029 | ||
| 3034 | #ifndef OPENSSL_NO_EC | ||
| 3035 | if ( | 3030 | if ( |
| 3036 | /* | 3031 | /* |
| 3037 | * if we are considering an ECC cipher suite that uses our | 3032 | * if we are considering an ECC cipher suite that uses our |
| @@ -3167,7 +3162,6 @@ SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, | |||
| 3167 | } | 3162 | } |
| 3168 | ok = ok && ec_ok; | 3163 | ok = ok && ec_ok; |
| 3169 | } | 3164 | } |
| 3170 | #endif /* OPENSSL_NO_EC */ | ||
| 3171 | 3165 | ||
| 3172 | if (!ok) | 3166 | if (!ok) |
| 3173 | continue; | 3167 | continue; |
diff --git a/src/lib/libssl/src/ssl/ssl.h b/src/lib/libssl/src/ssl/ssl.h index d6f875a797..fd01ac9806 100644 --- a/src/lib/libssl/src/ssl/ssl.h +++ b/src/lib/libssl/src/ssl/ssl.h | |||
| @@ -505,12 +505,10 @@ struct ssl_session_st { | |||
| 505 | * efficient and to implement a maximum cache size. */ | 505 | * efficient and to implement a maximum cache size. */ |
| 506 | struct ssl_session_st *prev, *next; | 506 | struct ssl_session_st *prev, *next; |
| 507 | char *tlsext_hostname; | 507 | char *tlsext_hostname; |
| 508 | #ifndef OPENSSL_NO_EC | ||
| 509 | size_t tlsext_ecpointformatlist_length; | 508 | size_t tlsext_ecpointformatlist_length; |
| 510 | unsigned char *tlsext_ecpointformatlist; /* peer's list */ | 509 | unsigned char *tlsext_ecpointformatlist; /* peer's list */ |
| 511 | size_t tlsext_ellipticcurvelist_length; | 510 | size_t tlsext_ellipticcurvelist_length; |
| 512 | unsigned char *tlsext_ellipticcurvelist; /* peer's list */ | 511 | unsigned char *tlsext_ellipticcurvelist; /* peer's list */ |
| 513 | #endif /* OPENSSL_NO_EC */ | ||
| 514 | /* RFC4507 info */ | 512 | /* RFC4507 info */ |
| 515 | unsigned char *tlsext_tick; /* Session ticket */ | 513 | unsigned char *tlsext_tick; /* Session ticket */ |
| 516 | size_t tlsext_ticklen; /* Session ticket length */ | 514 | size_t tlsext_ticklen; /* Session ticket length */ |
| @@ -1204,12 +1202,10 @@ struct ssl_st { | |||
| 1204 | 1202 | ||
| 1205 | /* RFC4507 session ticket expected to be received or sent */ | 1203 | /* RFC4507 session ticket expected to be received or sent */ |
| 1206 | int tlsext_ticket_expected; | 1204 | int tlsext_ticket_expected; |
| 1207 | #ifndef OPENSSL_NO_EC | ||
| 1208 | size_t tlsext_ecpointformatlist_length; | 1205 | size_t tlsext_ecpointformatlist_length; |
| 1209 | unsigned char *tlsext_ecpointformatlist; /* our list */ | 1206 | unsigned char *tlsext_ecpointformatlist; /* our list */ |
| 1210 | size_t tlsext_ellipticcurvelist_length; | 1207 | size_t tlsext_ellipticcurvelist_length; |
| 1211 | unsigned char *tlsext_ellipticcurvelist; /* our list */ | 1208 | unsigned char *tlsext_ellipticcurvelist; /* our list */ |
| 1212 | #endif /* OPENSSL_NO_EC */ | ||
| 1213 | 1209 | ||
| 1214 | /* draft-rescorla-tls-opaque-prf-input-00.txt information to be used for handshakes */ | 1210 | /* draft-rescorla-tls-opaque-prf-input-00.txt information to be used for handshakes */ |
| 1215 | void *tlsext_opaque_prf_input; | 1211 | void *tlsext_opaque_prf_input; |
diff --git a/src/lib/libssl/src/ssl/ssl3.h b/src/lib/libssl/src/ssl/ssl3.h index c264422a36..1d2bc2f5c0 100644 --- a/src/lib/libssl/src/ssl/ssl3.h +++ b/src/lib/libssl/src/ssl/ssl3.h | |||
| @@ -519,12 +519,10 @@ typedef struct ssl3_state_st { | |||
| 519 | int next_proto_neg_seen; | 519 | int next_proto_neg_seen; |
| 520 | #endif | 520 | #endif |
| 521 | 521 | ||
| 522 | #ifndef OPENSSL_NO_EC | ||
| 523 | /* This is set to true if we believe that this is a version of Safari | 522 | /* This is set to true if we believe that this is a version of Safari |
| 524 | * running on OS X 10.6 or newer. We wish to know this because Safari | 523 | * running on OS X 10.6 or newer. We wish to know this because Safari |
| 525 | * on 10.8 .. 10.8.3 has broken ECDHE-ECDSA support. */ | 524 | * on 10.8 .. 10.8.3 has broken ECDHE-ECDSA support. */ |
| 526 | char is_probably_safari; | 525 | char is_probably_safari; |
| 527 | #endif /* !OPENSSL_NO_EC */ | ||
| 528 | } SSL3_STATE; | 526 | } SSL3_STATE; |
| 529 | 527 | ||
| 530 | #endif | 528 | #endif |
diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c index 262b5a2130..1138ac5a69 100644 --- a/src/lib/libssl/src/ssl/ssl_lib.c +++ b/src/lib/libssl/src/ssl/ssl_lib.c | |||
| @@ -536,10 +536,8 @@ SSL_free(SSL *s) | |||
| 536 | free(s->tlsext_hostname); | 536 | free(s->tlsext_hostname); |
| 537 | if (s->initial_ctx) | 537 | if (s->initial_ctx) |
| 538 | SSL_CTX_free(s->initial_ctx); | 538 | SSL_CTX_free(s->initial_ctx); |
| 539 | #ifndef OPENSSL_NO_EC | ||
| 540 | free(s->tlsext_ecpointformatlist); | 539 | free(s->tlsext_ecpointformatlist); |
| 541 | free(s->tlsext_ellipticcurvelist); | 540 | free(s->tlsext_ellipticcurvelist); |
| 542 | #endif /* OPENSSL_NO_EC */ | ||
| 543 | free(s->tlsext_opaque_prf_input); | 541 | free(s->tlsext_opaque_prf_input); |
| 544 | if (s->tlsext_ocsp_exts) | 542 | if (s->tlsext_ocsp_exts) |
| 545 | sk_X509_EXTENSION_pop_free(s->tlsext_ocsp_exts, | 543 | sk_X509_EXTENSION_pop_free(s->tlsext_ocsp_exts, |
| @@ -2120,7 +2118,6 @@ ssl_set_cert_masks(CERT *c, const SSL_CIPHER *cipher) | |||
| 2120 | #define ku_reject(x, usage) \ | 2118 | #define ku_reject(x, usage) \ |
| 2121 | (((x)->ex_flags & EXFLAG_KUSAGE) && !((x)->ex_kusage & (usage))) | 2119 | (((x)->ex_flags & EXFLAG_KUSAGE) && !((x)->ex_kusage & (usage))) |
| 2122 | 2120 | ||
| 2123 | #ifndef OPENSSL_NO_EC | ||
| 2124 | 2121 | ||
| 2125 | int | 2122 | int |
| 2126 | ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s) | 2123 | ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s) |
| @@ -2190,7 +2187,6 @@ ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s) | |||
| 2190 | /* all checks are ok */ | 2187 | /* all checks are ok */ |
| 2191 | } | 2188 | } |
| 2192 | 2189 | ||
| 2193 | #endif | ||
| 2194 | 2190 | ||
| 2195 | /* THIS NEEDS CLEANING UP */ | 2191 | /* THIS NEEDS CLEANING UP */ |
| 2196 | CERT_PKEY * | 2192 | CERT_PKEY * |
diff --git a/src/lib/libssl/src/ssl/ssl_locl.h b/src/lib/libssl/src/ssl/ssl_locl.h index ecf108d6a5..4aa2911da7 100644 --- a/src/lib/libssl/src/ssl/ssl_locl.h +++ b/src/lib/libssl/src/ssl/ssl_locl.h | |||
| @@ -448,14 +448,12 @@ | |||
| 448 | #define CERT_PRIVATE_KEY 2 | 448 | #define CERT_PRIVATE_KEY 2 |
| 449 | */ | 449 | */ |
| 450 | 450 | ||
| 451 | #ifndef OPENSSL_NO_EC | ||
| 452 | /* From ECC-TLS draft, used in encoding the curve type in | 451 | /* From ECC-TLS draft, used in encoding the curve type in |
| 453 | * ECParameters | 452 | * ECParameters |
| 454 | */ | 453 | */ |
| 455 | #define EXPLICIT_PRIME_CURVE_TYPE 1 | 454 | #define EXPLICIT_PRIME_CURVE_TYPE 1 |
| 456 | #define EXPLICIT_CHAR2_CURVE_TYPE 2 | 455 | #define EXPLICIT_CHAR2_CURVE_TYPE 2 |
| 457 | #define NAMED_CURVE_TYPE 3 | 456 | #define NAMED_CURVE_TYPE 3 |
| 458 | #endif /* OPENSSL_NO_EC */ | ||
| 459 | 457 | ||
| 460 | typedef struct cert_pkey_st { | 458 | typedef struct cert_pkey_st { |
| 461 | X509 *x509; | 459 | X509 *x509; |
| @@ -830,10 +828,8 @@ int ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s); | |||
| 830 | 828 | ||
| 831 | SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n); | 829 | SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n); |
| 832 | 830 | ||
| 833 | #ifndef OPENSSL_NO_EC | ||
| 834 | int tls1_ec_curve_id2nid(int curve_id); | 831 | int tls1_ec_curve_id2nid(int curve_id); |
| 835 | int tls1_ec_nid2curve_id(int nid); | 832 | int tls1_ec_nid2curve_id(int nid); |
| 836 | #endif /* OPENSSL_NO_EC */ | ||
| 837 | 833 | ||
| 838 | unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, | 834 | unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, |
| 839 | unsigned char *limit); | 835 | unsigned char *limit); |
diff --git a/src/lib/libssl/src/ssl/ssl_sess.c b/src/lib/libssl/src/ssl/ssl_sess.c index de133a72ca..2900490ad2 100644 --- a/src/lib/libssl/src/ssl/ssl_sess.c +++ b/src/lib/libssl/src/ssl/ssl_sess.c | |||
| @@ -210,12 +210,10 @@ SSL_SESSION_new(void) | |||
| 210 | ss->compress_meth = 0; | 210 | ss->compress_meth = 0; |
| 211 | ss->tlsext_hostname = NULL; | 211 | ss->tlsext_hostname = NULL; |
| 212 | 212 | ||
| 213 | #ifndef OPENSSL_NO_EC | ||
| 214 | ss->tlsext_ecpointformatlist_length = 0; | 213 | ss->tlsext_ecpointformatlist_length = 0; |
| 215 | ss->tlsext_ecpointformatlist = NULL; | 214 | ss->tlsext_ecpointformatlist = NULL; |
| 216 | ss->tlsext_ellipticcurvelist_length = 0; | 215 | ss->tlsext_ellipticcurvelist_length = 0; |
| 217 | ss->tlsext_ellipticcurvelist = NULL; | 216 | ss->tlsext_ellipticcurvelist = NULL; |
| 218 | #endif | ||
| 219 | CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data); | 217 | CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data); |
| 220 | #ifndef OPENSSL_NO_PSK | 218 | #ifndef OPENSSL_NO_PSK |
| 221 | ss->psk_identity_hint = NULL; | 219 | ss->psk_identity_hint = NULL; |
| @@ -359,7 +357,6 @@ ssl_get_new_session(SSL *s, int session) | |||
| 359 | return 0; | 357 | return 0; |
| 360 | } | 358 | } |
| 361 | } | 359 | } |
| 362 | #ifndef OPENSSL_NO_EC | ||
| 363 | if (s->tlsext_ecpointformatlist) { | 360 | if (s->tlsext_ecpointformatlist) { |
| 364 | free(ss->tlsext_ecpointformatlist); | 361 | free(ss->tlsext_ecpointformatlist); |
| 365 | if ((ss->tlsext_ecpointformatlist = malloc(s->tlsext_ecpointformatlist_length)) == NULL) { | 362 | if ((ss->tlsext_ecpointformatlist = malloc(s->tlsext_ecpointformatlist_length)) == NULL) { |
| @@ -380,7 +377,6 @@ ssl_get_new_session(SSL *s, int session) | |||
| 380 | ss->tlsext_ellipticcurvelist_length = s->tlsext_ellipticcurvelist_length; | 377 | ss->tlsext_ellipticcurvelist_length = s->tlsext_ellipticcurvelist_length; |
| 381 | memcpy(ss->tlsext_ellipticcurvelist, s->tlsext_ellipticcurvelist, s->tlsext_ellipticcurvelist_length); | 378 | memcpy(ss->tlsext_ellipticcurvelist, s->tlsext_ellipticcurvelist, s->tlsext_ellipticcurvelist_length); |
| 382 | } | 379 | } |
| 383 | #endif | ||
| 384 | } else { | 380 | } else { |
| 385 | ss->session_id_length = 0; | 381 | ss->session_id_length = 0; |
| 386 | } | 382 | } |
| @@ -691,12 +687,10 @@ SSL_SESSION_free(SSL_SESSION *ss) | |||
| 691 | sk_SSL_CIPHER_free(ss->ciphers); | 687 | sk_SSL_CIPHER_free(ss->ciphers); |
| 692 | free(ss->tlsext_hostname); | 688 | free(ss->tlsext_hostname); |
| 693 | free(ss->tlsext_tick); | 689 | free(ss->tlsext_tick); |
| 694 | #ifndef OPENSSL_NO_EC | ||
| 695 | ss->tlsext_ecpointformatlist_length = 0; | 690 | ss->tlsext_ecpointformatlist_length = 0; |
| 696 | free(ss->tlsext_ecpointformatlist); | 691 | free(ss->tlsext_ecpointformatlist); |
| 697 | ss->tlsext_ellipticcurvelist_length = 0; | 692 | ss->tlsext_ellipticcurvelist_length = 0; |
| 698 | free(ss->tlsext_ellipticcurvelist); | 693 | free(ss->tlsext_ellipticcurvelist); |
| 699 | #endif /* OPENSSL_NO_EC */ | ||
| 700 | #ifndef OPENSSL_NO_PSK | 694 | #ifndef OPENSSL_NO_PSK |
| 701 | free(ss->psk_identity_hint); | 695 | free(ss->psk_identity_hint); |
| 702 | free(ss->psk_identity); | 696 | free(ss->psk_identity); |
diff --git a/src/lib/libssl/src/ssl/t1_lib.c b/src/lib/libssl/src/ssl/t1_lib.c index 5d442558dd..3546a45df1 100644 --- a/src/lib/libssl/src/ssl/t1_lib.c +++ b/src/lib/libssl/src/ssl/t1_lib.c | |||
| @@ -209,7 +209,6 @@ tls1_clear(SSL *s) | |||
| 209 | s->version = s->method->version; | 209 | s->version = s->method->version; |
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | #ifndef OPENSSL_NO_EC | ||
| 213 | 212 | ||
| 214 | static int nid_list[] = { | 213 | static int nid_list[] = { |
| 215 | NID_sect163k1, /* sect163k1 (1) */ | 214 | NID_sect163k1, /* sect163k1 (1) */ |
| @@ -348,7 +347,6 @@ tls1_ec_nid2curve_id(int nid) | |||
| 348 | return 0; | 347 | return 0; |
| 349 | } | 348 | } |
| 350 | } | 349 | } |
| 351 | #endif /* OPENSSL_NO_EC */ | ||
| 352 | 350 | ||
| 353 | 351 | ||
| 354 | /* List of supported signature algorithms and hashes. Should make this | 352 | /* List of supported signature algorithms and hashes. Should make this |
| @@ -460,7 +458,6 @@ ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) | |||
| 460 | } | 458 | } |
| 461 | 459 | ||
| 462 | 460 | ||
| 463 | #ifndef OPENSSL_NO_EC | ||
| 464 | if (s->tlsext_ecpointformatlist != NULL && | 461 | if (s->tlsext_ecpointformatlist != NULL && |
| 465 | s->version != DTLS1_VERSION) { | 462 | s->version != DTLS1_VERSION) { |
| 466 | /* Add TLS extension ECPointFormats to the ClientHello message */ | 463 | /* Add TLS extension ECPointFormats to the ClientHello message */ |
| @@ -515,7 +512,6 @@ ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) | |||
| 515 | s->tlsext_ellipticcurvelist_length); | 512 | s->tlsext_ellipticcurvelist_length); |
| 516 | ret += s->tlsext_ellipticcurvelist_length; | 513 | ret += s->tlsext_ellipticcurvelist_length; |
| 517 | } | 514 | } |
| 518 | #endif /* OPENSSL_NO_EC */ | ||
| 519 | 515 | ||
| 520 | if (!(SSL_get_options(s) & SSL_OP_NO_TICKET)) { | 516 | if (!(SSL_get_options(s) & SSL_OP_NO_TICKET)) { |
| 521 | int ticklen; | 517 | int ticklen; |
| @@ -743,7 +739,6 @@ ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) | |||
| 743 | ret += el; | 739 | ret += el; |
| 744 | } | 740 | } |
| 745 | 741 | ||
| 746 | #ifndef OPENSSL_NO_EC | ||
| 747 | if (s->tlsext_ecpointformatlist != NULL && | 742 | if (s->tlsext_ecpointformatlist != NULL && |
| 748 | s->version != DTLS1_VERSION) { | 743 | s->version != DTLS1_VERSION) { |
| 749 | /* Add TLS extension ECPointFormats to the ServerHello message */ | 744 | /* Add TLS extension ECPointFormats to the ServerHello message */ |
| @@ -770,7 +765,6 @@ ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) | |||
| 770 | 765 | ||
| 771 | } | 766 | } |
| 772 | /* Currently the server should not respond with a SupportedCurves extension */ | 767 | /* Currently the server should not respond with a SupportedCurves extension */ |
| 773 | #endif /* OPENSSL_NO_EC */ | ||
| 774 | 768 | ||
| 775 | if (s->tlsext_ticket_expected && | 769 | if (s->tlsext_ticket_expected && |
| 776 | !(SSL_get_options(s) & SSL_OP_NO_TICKET)) { | 770 | !(SSL_get_options(s) & SSL_OP_NO_TICKET)) { |
| @@ -875,7 +869,6 @@ ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) | |||
| 875 | return ret; | 869 | return ret; |
| 876 | } | 870 | } |
| 877 | 871 | ||
| 878 | #ifndef OPENSSL_NO_EC | ||
| 879 | /* ssl_check_for_safari attempts to fingerprint Safari using OS X | 872 | /* ssl_check_for_safari attempts to fingerprint Safari using OS X |
| 880 | * SecureTransport using the TLS extension block in |d|, of length |n|. | 873 | * SecureTransport using the TLS extension block in |d|, of length |n|. |
| 881 | * Safari, since 10.6, sends exactly these extensions, in this order: | 874 | * Safari, since 10.6, sends exactly these extensions, in this order: |
| @@ -956,7 +949,6 @@ ssl_check_for_safari(SSL *s, const unsigned char *data, const unsigned char *d, | |||
| 956 | 949 | ||
| 957 | s->s3->is_probably_safari = 1; | 950 | s->s3->is_probably_safari = 1; |
| 958 | } | 951 | } |
| 959 | #endif /* !OPENSSL_NO_EC */ | ||
| 960 | 952 | ||
| 961 | int | 953 | int |
| 962 | ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | 954 | ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, |
| @@ -975,10 +967,8 @@ ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 975 | s->s3->next_proto_neg_seen = 0; | 967 | s->s3->next_proto_neg_seen = 0; |
| 976 | #endif | 968 | #endif |
| 977 | 969 | ||
| 978 | #ifndef OPENSSL_NO_EC | ||
| 979 | if (s->options & SSL_OP_SAFARI_ECDHE_ECDSA_BUG) | 970 | if (s->options & SSL_OP_SAFARI_ECDHE_ECDSA_BUG) |
| 980 | ssl_check_for_safari(s, data, d, n); | 971 | ssl_check_for_safari(s, data, d, n); |
| 981 | #endif /* !OPENSSL_NO_EC */ | ||
| 982 | 972 | ||
| 983 | if (data >= (d + n - 2)) | 973 | if (data >= (d + n - 2)) |
| 984 | goto ri_check; | 974 | goto ri_check; |
| @@ -1095,7 +1085,6 @@ ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 1095 | 1085 | ||
| 1096 | } | 1086 | } |
| 1097 | 1087 | ||
| 1098 | #ifndef OPENSSL_NO_EC | ||
| 1099 | else if (type == TLSEXT_TYPE_ec_point_formats && | 1088 | else if (type == TLSEXT_TYPE_ec_point_formats && |
| 1100 | s->version != DTLS1_VERSION) { | 1089 | s->version != DTLS1_VERSION) { |
| 1101 | unsigned char *sdata = data; | 1090 | unsigned char *sdata = data; |
| @@ -1142,7 +1131,6 @@ ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 1142 | memcpy(s->session->tlsext_ellipticcurvelist, sdata, ellipticcurvelist_length); | 1131 | memcpy(s->session->tlsext_ellipticcurvelist, sdata, ellipticcurvelist_length); |
| 1143 | } | 1132 | } |
| 1144 | } | 1133 | } |
| 1145 | #endif /* OPENSSL_NO_EC */ | ||
| 1146 | #ifdef TLSEXT_TYPE_opaque_prf_input | 1134 | #ifdef TLSEXT_TYPE_opaque_prf_input |
| 1147 | else if (type == TLSEXT_TYPE_opaque_prf_input && | 1135 | else if (type == TLSEXT_TYPE_opaque_prf_input && |
| 1148 | s->version != DTLS1_VERSION) { | 1136 | s->version != DTLS1_VERSION) { |
| @@ -1408,7 +1396,6 @@ ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 1408 | tlsext_servername = 1; | 1396 | tlsext_servername = 1; |
| 1409 | 1397 | ||
| 1410 | } | 1398 | } |
| 1411 | #ifndef OPENSSL_NO_EC | ||
| 1412 | else if (type == TLSEXT_TYPE_ec_point_formats && | 1399 | else if (type == TLSEXT_TYPE_ec_point_formats && |
| 1413 | s->version != DTLS1_VERSION) { | 1400 | s->version != DTLS1_VERSION) { |
| 1414 | unsigned char *sdata = data; | 1401 | unsigned char *sdata = data; |
| @@ -1430,7 +1417,6 @@ ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 1430 | s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; | 1417 | s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; |
| 1431 | memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); | 1418 | memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); |
| 1432 | } | 1419 | } |
| 1433 | #endif /* OPENSSL_NO_EC */ | ||
| 1434 | else if (type == TLSEXT_TYPE_session_ticket) { | 1420 | else if (type == TLSEXT_TYPE_session_ticket) { |
| 1435 | if (s->tls_session_ticket_ext_cb && | 1421 | if (s->tls_session_ticket_ext_cb && |
| 1436 | !s->tls_session_ticket_ext_cb(s, data, size, s->tls_session_ticket_ext_cb_arg)) { | 1422 | !s->tls_session_ticket_ext_cb(s, data, size, s->tls_session_ticket_ext_cb_arg)) { |
| @@ -1576,7 +1562,6 @@ ri_check: | |||
| 1576 | int | 1562 | int |
| 1577 | ssl_prepare_clienthello_tlsext(SSL *s) | 1563 | ssl_prepare_clienthello_tlsext(SSL *s) |
| 1578 | { | 1564 | { |
| 1579 | #ifndef OPENSSL_NO_EC | ||
| 1580 | /* If we are client and using an elliptic curve cryptography cipher suite, send the point formats | 1565 | /* If we are client and using an elliptic curve cryptography cipher suite, send the point formats |
| 1581 | * and elliptic curves we support. | 1566 | * and elliptic curves we support. |
| 1582 | */ | 1567 | */ |
| @@ -1624,7 +1609,6 @@ ssl_prepare_clienthello_tlsext(SSL *s) | |||
| 1624 | s2n(id, j); | 1609 | s2n(id, j); |
| 1625 | } | 1610 | } |
| 1626 | } | 1611 | } |
| 1627 | #endif /* OPENSSL_NO_EC */ | ||
| 1628 | 1612 | ||
| 1629 | #ifdef TLSEXT_TYPE_opaque_prf_input | 1613 | #ifdef TLSEXT_TYPE_opaque_prf_input |
| 1630 | { | 1614 | { |
| @@ -1667,7 +1651,6 @@ ssl_prepare_clienthello_tlsext(SSL *s) | |||
| 1667 | int | 1651 | int |
| 1668 | ssl_prepare_serverhello_tlsext(SSL *s) | 1652 | ssl_prepare_serverhello_tlsext(SSL *s) |
| 1669 | { | 1653 | { |
| 1670 | #ifndef OPENSSL_NO_EC | ||
| 1671 | /* If we are server and using an ECC cipher suite, send the point formats we support | 1654 | /* If we are server and using an ECC cipher suite, send the point formats we support |
| 1672 | * if the client sent us an ECPointsFormat extension. Note that the server is not | 1655 | * if the client sent us an ECPointsFormat extension. Note that the server is not |
| 1673 | * supposed to send an EllipticCurves extension. | 1656 | * supposed to send an EllipticCurves extension. |
| @@ -1689,7 +1672,6 @@ ssl_prepare_serverhello_tlsext(SSL *s) | |||
| 1689 | s->tlsext_ecpointformatlist[1] = TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime; | 1672 | s->tlsext_ecpointformatlist[1] = TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime; |
| 1690 | s->tlsext_ecpointformatlist[2] = TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2; | 1673 | s->tlsext_ecpointformatlist[2] = TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2; |
| 1691 | } | 1674 | } |
| 1692 | #endif /* OPENSSL_NO_EC */ | ||
| 1693 | 1675 | ||
| 1694 | return 1; | 1676 | return 1; |
| 1695 | } | 1677 | } |
| @@ -1700,14 +1682,12 @@ ssl_check_clienthello_tlsext_early(SSL *s) | |||
| 1700 | int ret = SSL_TLSEXT_ERR_NOACK; | 1682 | int ret = SSL_TLSEXT_ERR_NOACK; |
| 1701 | int al = SSL_AD_UNRECOGNIZED_NAME; | 1683 | int al = SSL_AD_UNRECOGNIZED_NAME; |
| 1702 | 1684 | ||
| 1703 | #ifndef OPENSSL_NO_EC | ||
| 1704 | /* The handling of the ECPointFormats extension is done elsewhere, namely in | 1685 | /* The handling of the ECPointFormats extension is done elsewhere, namely in |
| 1705 | * ssl3_choose_cipher in s3_lib.c. | 1686 | * ssl3_choose_cipher in s3_lib.c. |
| 1706 | */ | 1687 | */ |
| 1707 | /* The handling of the EllipticCurves extension is done elsewhere, namely in | 1688 | /* The handling of the EllipticCurves extension is done elsewhere, namely in |
| 1708 | * ssl3_choose_cipher in s3_lib.c. | 1689 | * ssl3_choose_cipher in s3_lib.c. |
| 1709 | */ | 1690 | */ |
| 1710 | #endif | ||
| 1711 | 1691 | ||
| 1712 | if (s->ctx != NULL && s->ctx->tlsext_servername_callback != 0) | 1692 | if (s->ctx != NULL && s->ctx->tlsext_servername_callback != 0) |
| 1713 | ret = s->ctx->tlsext_servername_callback(s, &al, s->ctx->tlsext_servername_arg); | 1693 | ret = s->ctx->tlsext_servername_callback(s, &al, s->ctx->tlsext_servername_arg); |
| @@ -1850,7 +1830,6 @@ ssl_check_serverhello_tlsext(SSL *s) | |||
| 1850 | int ret = SSL_TLSEXT_ERR_NOACK; | 1830 | int ret = SSL_TLSEXT_ERR_NOACK; |
| 1851 | int al = SSL_AD_UNRECOGNIZED_NAME; | 1831 | int al = SSL_AD_UNRECOGNIZED_NAME; |
| 1852 | 1832 | ||
| 1853 | #ifndef OPENSSL_NO_EC | ||
| 1854 | /* If we are client and using an elliptic curve cryptography cipher | 1833 | /* If we are client and using an elliptic curve cryptography cipher |
| 1855 | * suite, then if server returns an EC point formats lists extension | 1834 | * suite, then if server returns an EC point formats lists extension |
| 1856 | * it must contain uncompressed. | 1835 | * it must contain uncompressed. |
| @@ -1879,7 +1858,6 @@ ssl_check_serverhello_tlsext(SSL *s) | |||
| 1879 | } | 1858 | } |
| 1880 | } | 1859 | } |
| 1881 | ret = SSL_TLSEXT_ERR_OK; | 1860 | ret = SSL_TLSEXT_ERR_OK; |
| 1882 | #endif /* OPENSSL_NO_EC */ | ||
| 1883 | 1861 | ||
| 1884 | if (s->ctx != NULL && s->ctx->tlsext_servername_callback != 0) | 1862 | if (s->ctx != NULL && s->ctx->tlsext_servername_callback != 0) |
| 1885 | ret = s->ctx->tlsext_servername_callback(s, &al, s->ctx->tlsext_servername_arg); | 1863 | ret = s->ctx->tlsext_servername_callback(s, &al, s->ctx->tlsext_servername_arg); |
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index d6f875a797..fd01ac9806 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
| @@ -505,12 +505,10 @@ struct ssl_session_st { | |||
| 505 | * efficient and to implement a maximum cache size. */ | 505 | * efficient and to implement a maximum cache size. */ |
| 506 | struct ssl_session_st *prev, *next; | 506 | struct ssl_session_st *prev, *next; |
| 507 | char *tlsext_hostname; | 507 | char *tlsext_hostname; |
| 508 | #ifndef OPENSSL_NO_EC | ||
| 509 | size_t tlsext_ecpointformatlist_length; | 508 | size_t tlsext_ecpointformatlist_length; |
| 510 | unsigned char *tlsext_ecpointformatlist; /* peer's list */ | 509 | unsigned char *tlsext_ecpointformatlist; /* peer's list */ |
| 511 | size_t tlsext_ellipticcurvelist_length; | 510 | size_t tlsext_ellipticcurvelist_length; |
| 512 | unsigned char *tlsext_ellipticcurvelist; /* peer's list */ | 511 | unsigned char *tlsext_ellipticcurvelist; /* peer's list */ |
| 513 | #endif /* OPENSSL_NO_EC */ | ||
| 514 | /* RFC4507 info */ | 512 | /* RFC4507 info */ |
| 515 | unsigned char *tlsext_tick; /* Session ticket */ | 513 | unsigned char *tlsext_tick; /* Session ticket */ |
| 516 | size_t tlsext_ticklen; /* Session ticket length */ | 514 | size_t tlsext_ticklen; /* Session ticket length */ |
| @@ -1204,12 +1202,10 @@ struct ssl_st { | |||
| 1204 | 1202 | ||
| 1205 | /* RFC4507 session ticket expected to be received or sent */ | 1203 | /* RFC4507 session ticket expected to be received or sent */ |
| 1206 | int tlsext_ticket_expected; | 1204 | int tlsext_ticket_expected; |
| 1207 | #ifndef OPENSSL_NO_EC | ||
| 1208 | size_t tlsext_ecpointformatlist_length; | 1205 | size_t tlsext_ecpointformatlist_length; |
| 1209 | unsigned char *tlsext_ecpointformatlist; /* our list */ | 1206 | unsigned char *tlsext_ecpointformatlist; /* our list */ |
| 1210 | size_t tlsext_ellipticcurvelist_length; | 1207 | size_t tlsext_ellipticcurvelist_length; |
| 1211 | unsigned char *tlsext_ellipticcurvelist; /* our list */ | 1208 | unsigned char *tlsext_ellipticcurvelist; /* our list */ |
| 1212 | #endif /* OPENSSL_NO_EC */ | ||
| 1213 | 1209 | ||
| 1214 | /* draft-rescorla-tls-opaque-prf-input-00.txt information to be used for handshakes */ | 1210 | /* draft-rescorla-tls-opaque-prf-input-00.txt information to be used for handshakes */ |
| 1215 | void *tlsext_opaque_prf_input; | 1211 | void *tlsext_opaque_prf_input; |
diff --git a/src/lib/libssl/ssl3.h b/src/lib/libssl/ssl3.h index c264422a36..1d2bc2f5c0 100644 --- a/src/lib/libssl/ssl3.h +++ b/src/lib/libssl/ssl3.h | |||
| @@ -519,12 +519,10 @@ typedef struct ssl3_state_st { | |||
| 519 | int next_proto_neg_seen; | 519 | int next_proto_neg_seen; |
| 520 | #endif | 520 | #endif |
| 521 | 521 | ||
| 522 | #ifndef OPENSSL_NO_EC | ||
| 523 | /* This is set to true if we believe that this is a version of Safari | 522 | /* This is set to true if we believe that this is a version of Safari |
| 524 | * running on OS X 10.6 or newer. We wish to know this because Safari | 523 | * running on OS X 10.6 or newer. We wish to know this because Safari |
| 525 | * on 10.8 .. 10.8.3 has broken ECDHE-ECDSA support. */ | 524 | * on 10.8 .. 10.8.3 has broken ECDHE-ECDSA support. */ |
| 526 | char is_probably_safari; | 525 | char is_probably_safari; |
| 527 | #endif /* !OPENSSL_NO_EC */ | ||
| 528 | } SSL3_STATE; | 526 | } SSL3_STATE; |
| 529 | 527 | ||
| 530 | #endif | 528 | #endif |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 262b5a2130..1138ac5a69 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
| @@ -536,10 +536,8 @@ SSL_free(SSL *s) | |||
| 536 | free(s->tlsext_hostname); | 536 | free(s->tlsext_hostname); |
| 537 | if (s->initial_ctx) | 537 | if (s->initial_ctx) |
| 538 | SSL_CTX_free(s->initial_ctx); | 538 | SSL_CTX_free(s->initial_ctx); |
| 539 | #ifndef OPENSSL_NO_EC | ||
| 540 | free(s->tlsext_ecpointformatlist); | 539 | free(s->tlsext_ecpointformatlist); |
| 541 | free(s->tlsext_ellipticcurvelist); | 540 | free(s->tlsext_ellipticcurvelist); |
| 542 | #endif /* OPENSSL_NO_EC */ | ||
| 543 | free(s->tlsext_opaque_prf_input); | 541 | free(s->tlsext_opaque_prf_input); |
| 544 | if (s->tlsext_ocsp_exts) | 542 | if (s->tlsext_ocsp_exts) |
| 545 | sk_X509_EXTENSION_pop_free(s->tlsext_ocsp_exts, | 543 | sk_X509_EXTENSION_pop_free(s->tlsext_ocsp_exts, |
| @@ -2120,7 +2118,6 @@ ssl_set_cert_masks(CERT *c, const SSL_CIPHER *cipher) | |||
| 2120 | #define ku_reject(x, usage) \ | 2118 | #define ku_reject(x, usage) \ |
| 2121 | (((x)->ex_flags & EXFLAG_KUSAGE) && !((x)->ex_kusage & (usage))) | 2119 | (((x)->ex_flags & EXFLAG_KUSAGE) && !((x)->ex_kusage & (usage))) |
| 2122 | 2120 | ||
| 2123 | #ifndef OPENSSL_NO_EC | ||
| 2124 | 2121 | ||
| 2125 | int | 2122 | int |
| 2126 | ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s) | 2123 | ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s) |
| @@ -2190,7 +2187,6 @@ ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s) | |||
| 2190 | /* all checks are ok */ | 2187 | /* all checks are ok */ |
| 2191 | } | 2188 | } |
| 2192 | 2189 | ||
| 2193 | #endif | ||
| 2194 | 2190 | ||
| 2195 | /* THIS NEEDS CLEANING UP */ | 2191 | /* THIS NEEDS CLEANING UP */ |
| 2196 | CERT_PKEY * | 2192 | CERT_PKEY * |
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index ecf108d6a5..4aa2911da7 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
| @@ -448,14 +448,12 @@ | |||
| 448 | #define CERT_PRIVATE_KEY 2 | 448 | #define CERT_PRIVATE_KEY 2 |
| 449 | */ | 449 | */ |
| 450 | 450 | ||
| 451 | #ifndef OPENSSL_NO_EC | ||
| 452 | /* From ECC-TLS draft, used in encoding the curve type in | 451 | /* From ECC-TLS draft, used in encoding the curve type in |
| 453 | * ECParameters | 452 | * ECParameters |
| 454 | */ | 453 | */ |
| 455 | #define EXPLICIT_PRIME_CURVE_TYPE 1 | 454 | #define EXPLICIT_PRIME_CURVE_TYPE 1 |
| 456 | #define EXPLICIT_CHAR2_CURVE_TYPE 2 | 455 | #define EXPLICIT_CHAR2_CURVE_TYPE 2 |
| 457 | #define NAMED_CURVE_TYPE 3 | 456 | #define NAMED_CURVE_TYPE 3 |
| 458 | #endif /* OPENSSL_NO_EC */ | ||
| 459 | 457 | ||
| 460 | typedef struct cert_pkey_st { | 458 | typedef struct cert_pkey_st { |
| 461 | X509 *x509; | 459 | X509 *x509; |
| @@ -830,10 +828,8 @@ int ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s); | |||
| 830 | 828 | ||
| 831 | SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n); | 829 | SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n); |
| 832 | 830 | ||
| 833 | #ifndef OPENSSL_NO_EC | ||
| 834 | int tls1_ec_curve_id2nid(int curve_id); | 831 | int tls1_ec_curve_id2nid(int curve_id); |
| 835 | int tls1_ec_nid2curve_id(int nid); | 832 | int tls1_ec_nid2curve_id(int nid); |
| 836 | #endif /* OPENSSL_NO_EC */ | ||
| 837 | 833 | ||
| 838 | unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, | 834 | unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, |
| 839 | unsigned char *limit); | 835 | unsigned char *limit); |
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c index de133a72ca..2900490ad2 100644 --- a/src/lib/libssl/ssl_sess.c +++ b/src/lib/libssl/ssl_sess.c | |||
| @@ -210,12 +210,10 @@ SSL_SESSION_new(void) | |||
| 210 | ss->compress_meth = 0; | 210 | ss->compress_meth = 0; |
| 211 | ss->tlsext_hostname = NULL; | 211 | ss->tlsext_hostname = NULL; |
| 212 | 212 | ||
| 213 | #ifndef OPENSSL_NO_EC | ||
| 214 | ss->tlsext_ecpointformatlist_length = 0; | 213 | ss->tlsext_ecpointformatlist_length = 0; |
| 215 | ss->tlsext_ecpointformatlist = NULL; | 214 | ss->tlsext_ecpointformatlist = NULL; |
| 216 | ss->tlsext_ellipticcurvelist_length = 0; | 215 | ss->tlsext_ellipticcurvelist_length = 0; |
| 217 | ss->tlsext_ellipticcurvelist = NULL; | 216 | ss->tlsext_ellipticcurvelist = NULL; |
| 218 | #endif | ||
| 219 | CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data); | 217 | CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data); |
| 220 | #ifndef OPENSSL_NO_PSK | 218 | #ifndef OPENSSL_NO_PSK |
| 221 | ss->psk_identity_hint = NULL; | 219 | ss->psk_identity_hint = NULL; |
| @@ -359,7 +357,6 @@ ssl_get_new_session(SSL *s, int session) | |||
| 359 | return 0; | 357 | return 0; |
| 360 | } | 358 | } |
| 361 | } | 359 | } |
| 362 | #ifndef OPENSSL_NO_EC | ||
| 363 | if (s->tlsext_ecpointformatlist) { | 360 | if (s->tlsext_ecpointformatlist) { |
| 364 | free(ss->tlsext_ecpointformatlist); | 361 | free(ss->tlsext_ecpointformatlist); |
| 365 | if ((ss->tlsext_ecpointformatlist = malloc(s->tlsext_ecpointformatlist_length)) == NULL) { | 362 | if ((ss->tlsext_ecpointformatlist = malloc(s->tlsext_ecpointformatlist_length)) == NULL) { |
| @@ -380,7 +377,6 @@ ssl_get_new_session(SSL *s, int session) | |||
| 380 | ss->tlsext_ellipticcurvelist_length = s->tlsext_ellipticcurvelist_length; | 377 | ss->tlsext_ellipticcurvelist_length = s->tlsext_ellipticcurvelist_length; |
| 381 | memcpy(ss->tlsext_ellipticcurvelist, s->tlsext_ellipticcurvelist, s->tlsext_ellipticcurvelist_length); | 378 | memcpy(ss->tlsext_ellipticcurvelist, s->tlsext_ellipticcurvelist, s->tlsext_ellipticcurvelist_length); |
| 382 | } | 379 | } |
| 383 | #endif | ||
| 384 | } else { | 380 | } else { |
| 385 | ss->session_id_length = 0; | 381 | ss->session_id_length = 0; |
| 386 | } | 382 | } |
| @@ -691,12 +687,10 @@ SSL_SESSION_free(SSL_SESSION *ss) | |||
| 691 | sk_SSL_CIPHER_free(ss->ciphers); | 687 | sk_SSL_CIPHER_free(ss->ciphers); |
| 692 | free(ss->tlsext_hostname); | 688 | free(ss->tlsext_hostname); |
| 693 | free(ss->tlsext_tick); | 689 | free(ss->tlsext_tick); |
| 694 | #ifndef OPENSSL_NO_EC | ||
| 695 | ss->tlsext_ecpointformatlist_length = 0; | 690 | ss->tlsext_ecpointformatlist_length = 0; |
| 696 | free(ss->tlsext_ecpointformatlist); | 691 | free(ss->tlsext_ecpointformatlist); |
| 697 | ss->tlsext_ellipticcurvelist_length = 0; | 692 | ss->tlsext_ellipticcurvelist_length = 0; |
| 698 | free(ss->tlsext_ellipticcurvelist); | 693 | free(ss->tlsext_ellipticcurvelist); |
| 699 | #endif /* OPENSSL_NO_EC */ | ||
| 700 | #ifndef OPENSSL_NO_PSK | 694 | #ifndef OPENSSL_NO_PSK |
| 701 | free(ss->psk_identity_hint); | 695 | free(ss->psk_identity_hint); |
| 702 | free(ss->psk_identity); | 696 | free(ss->psk_identity); |
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c index 5d442558dd..3546a45df1 100644 --- a/src/lib/libssl/t1_lib.c +++ b/src/lib/libssl/t1_lib.c | |||
| @@ -209,7 +209,6 @@ tls1_clear(SSL *s) | |||
| 209 | s->version = s->method->version; | 209 | s->version = s->method->version; |
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | #ifndef OPENSSL_NO_EC | ||
| 213 | 212 | ||
| 214 | static int nid_list[] = { | 213 | static int nid_list[] = { |
| 215 | NID_sect163k1, /* sect163k1 (1) */ | 214 | NID_sect163k1, /* sect163k1 (1) */ |
| @@ -348,7 +347,6 @@ tls1_ec_nid2curve_id(int nid) | |||
| 348 | return 0; | 347 | return 0; |
| 349 | } | 348 | } |
| 350 | } | 349 | } |
| 351 | #endif /* OPENSSL_NO_EC */ | ||
| 352 | 350 | ||
| 353 | 351 | ||
| 354 | /* List of supported signature algorithms and hashes. Should make this | 352 | /* List of supported signature algorithms and hashes. Should make this |
| @@ -460,7 +458,6 @@ ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) | |||
| 460 | } | 458 | } |
| 461 | 459 | ||
| 462 | 460 | ||
| 463 | #ifndef OPENSSL_NO_EC | ||
| 464 | if (s->tlsext_ecpointformatlist != NULL && | 461 | if (s->tlsext_ecpointformatlist != NULL && |
| 465 | s->version != DTLS1_VERSION) { | 462 | s->version != DTLS1_VERSION) { |
| 466 | /* Add TLS extension ECPointFormats to the ClientHello message */ | 463 | /* Add TLS extension ECPointFormats to the ClientHello message */ |
| @@ -515,7 +512,6 @@ ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) | |||
| 515 | s->tlsext_ellipticcurvelist_length); | 512 | s->tlsext_ellipticcurvelist_length); |
| 516 | ret += s->tlsext_ellipticcurvelist_length; | 513 | ret += s->tlsext_ellipticcurvelist_length; |
| 517 | } | 514 | } |
| 518 | #endif /* OPENSSL_NO_EC */ | ||
| 519 | 515 | ||
| 520 | if (!(SSL_get_options(s) & SSL_OP_NO_TICKET)) { | 516 | if (!(SSL_get_options(s) & SSL_OP_NO_TICKET)) { |
| 521 | int ticklen; | 517 | int ticklen; |
| @@ -743,7 +739,6 @@ ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) | |||
| 743 | ret += el; | 739 | ret += el; |
| 744 | } | 740 | } |
| 745 | 741 | ||
| 746 | #ifndef OPENSSL_NO_EC | ||
| 747 | if (s->tlsext_ecpointformatlist != NULL && | 742 | if (s->tlsext_ecpointformatlist != NULL && |
| 748 | s->version != DTLS1_VERSION) { | 743 | s->version != DTLS1_VERSION) { |
| 749 | /* Add TLS extension ECPointFormats to the ServerHello message */ | 744 | /* Add TLS extension ECPointFormats to the ServerHello message */ |
| @@ -770,7 +765,6 @@ ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) | |||
| 770 | 765 | ||
| 771 | } | 766 | } |
| 772 | /* Currently the server should not respond with a SupportedCurves extension */ | 767 | /* Currently the server should not respond with a SupportedCurves extension */ |
| 773 | #endif /* OPENSSL_NO_EC */ | ||
| 774 | 768 | ||
| 775 | if (s->tlsext_ticket_expected && | 769 | if (s->tlsext_ticket_expected && |
| 776 | !(SSL_get_options(s) & SSL_OP_NO_TICKET)) { | 770 | !(SSL_get_options(s) & SSL_OP_NO_TICKET)) { |
| @@ -875,7 +869,6 @@ ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit) | |||
| 875 | return ret; | 869 | return ret; |
| 876 | } | 870 | } |
| 877 | 871 | ||
| 878 | #ifndef OPENSSL_NO_EC | ||
| 879 | /* ssl_check_for_safari attempts to fingerprint Safari using OS X | 872 | /* ssl_check_for_safari attempts to fingerprint Safari using OS X |
| 880 | * SecureTransport using the TLS extension block in |d|, of length |n|. | 873 | * SecureTransport using the TLS extension block in |d|, of length |n|. |
| 881 | * Safari, since 10.6, sends exactly these extensions, in this order: | 874 | * Safari, since 10.6, sends exactly these extensions, in this order: |
| @@ -956,7 +949,6 @@ ssl_check_for_safari(SSL *s, const unsigned char *data, const unsigned char *d, | |||
| 956 | 949 | ||
| 957 | s->s3->is_probably_safari = 1; | 950 | s->s3->is_probably_safari = 1; |
| 958 | } | 951 | } |
| 959 | #endif /* !OPENSSL_NO_EC */ | ||
| 960 | 952 | ||
| 961 | int | 953 | int |
| 962 | ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | 954 | ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, |
| @@ -975,10 +967,8 @@ ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 975 | s->s3->next_proto_neg_seen = 0; | 967 | s->s3->next_proto_neg_seen = 0; |
| 976 | #endif | 968 | #endif |
| 977 | 969 | ||
| 978 | #ifndef OPENSSL_NO_EC | ||
| 979 | if (s->options & SSL_OP_SAFARI_ECDHE_ECDSA_BUG) | 970 | if (s->options & SSL_OP_SAFARI_ECDHE_ECDSA_BUG) |
| 980 | ssl_check_for_safari(s, data, d, n); | 971 | ssl_check_for_safari(s, data, d, n); |
| 981 | #endif /* !OPENSSL_NO_EC */ | ||
| 982 | 972 | ||
| 983 | if (data >= (d + n - 2)) | 973 | if (data >= (d + n - 2)) |
| 984 | goto ri_check; | 974 | goto ri_check; |
| @@ -1095,7 +1085,6 @@ ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 1095 | 1085 | ||
| 1096 | } | 1086 | } |
| 1097 | 1087 | ||
| 1098 | #ifndef OPENSSL_NO_EC | ||
| 1099 | else if (type == TLSEXT_TYPE_ec_point_formats && | 1088 | else if (type == TLSEXT_TYPE_ec_point_formats && |
| 1100 | s->version != DTLS1_VERSION) { | 1089 | s->version != DTLS1_VERSION) { |
| 1101 | unsigned char *sdata = data; | 1090 | unsigned char *sdata = data; |
| @@ -1142,7 +1131,6 @@ ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 1142 | memcpy(s->session->tlsext_ellipticcurvelist, sdata, ellipticcurvelist_length); | 1131 | memcpy(s->session->tlsext_ellipticcurvelist, sdata, ellipticcurvelist_length); |
| 1143 | } | 1132 | } |
| 1144 | } | 1133 | } |
| 1145 | #endif /* OPENSSL_NO_EC */ | ||
| 1146 | #ifdef TLSEXT_TYPE_opaque_prf_input | 1134 | #ifdef TLSEXT_TYPE_opaque_prf_input |
| 1147 | else if (type == TLSEXT_TYPE_opaque_prf_input && | 1135 | else if (type == TLSEXT_TYPE_opaque_prf_input && |
| 1148 | s->version != DTLS1_VERSION) { | 1136 | s->version != DTLS1_VERSION) { |
| @@ -1408,7 +1396,6 @@ ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 1408 | tlsext_servername = 1; | 1396 | tlsext_servername = 1; |
| 1409 | 1397 | ||
| 1410 | } | 1398 | } |
| 1411 | #ifndef OPENSSL_NO_EC | ||
| 1412 | else if (type == TLSEXT_TYPE_ec_point_formats && | 1399 | else if (type == TLSEXT_TYPE_ec_point_formats && |
| 1413 | s->version != DTLS1_VERSION) { | 1400 | s->version != DTLS1_VERSION) { |
| 1414 | unsigned char *sdata = data; | 1401 | unsigned char *sdata = data; |
| @@ -1430,7 +1417,6 @@ ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, | |||
| 1430 | s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; | 1417 | s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; |
| 1431 | memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); | 1418 | memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); |
| 1432 | } | 1419 | } |
| 1433 | #endif /* OPENSSL_NO_EC */ | ||
| 1434 | else if (type == TLSEXT_TYPE_session_ticket) { | 1420 | else if (type == TLSEXT_TYPE_session_ticket) { |
| 1435 | if (s->tls_session_ticket_ext_cb && | 1421 | if (s->tls_session_ticket_ext_cb && |
| 1436 | !s->tls_session_ticket_ext_cb(s, data, size, s->tls_session_ticket_ext_cb_arg)) { | 1422 | !s->tls_session_ticket_ext_cb(s, data, size, s->tls_session_ticket_ext_cb_arg)) { |
| @@ -1576,7 +1562,6 @@ ri_check: | |||
| 1576 | int | 1562 | int |
| 1577 | ssl_prepare_clienthello_tlsext(SSL *s) | 1563 | ssl_prepare_clienthello_tlsext(SSL *s) |
| 1578 | { | 1564 | { |
| 1579 | #ifndef OPENSSL_NO_EC | ||
| 1580 | /* If we are client and using an elliptic curve cryptography cipher suite, send the point formats | 1565 | /* If we are client and using an elliptic curve cryptography cipher suite, send the point formats |
| 1581 | * and elliptic curves we support. | 1566 | * and elliptic curves we support. |
| 1582 | */ | 1567 | */ |
| @@ -1624,7 +1609,6 @@ ssl_prepare_clienthello_tlsext(SSL *s) | |||
| 1624 | s2n(id, j); | 1609 | s2n(id, j); |
| 1625 | } | 1610 | } |
| 1626 | } | 1611 | } |
| 1627 | #endif /* OPENSSL_NO_EC */ | ||
| 1628 | 1612 | ||
| 1629 | #ifdef TLSEXT_TYPE_opaque_prf_input | 1613 | #ifdef TLSEXT_TYPE_opaque_prf_input |
| 1630 | { | 1614 | { |
| @@ -1667,7 +1651,6 @@ ssl_prepare_clienthello_tlsext(SSL *s) | |||
| 1667 | int | 1651 | int |
| 1668 | ssl_prepare_serverhello_tlsext(SSL *s) | 1652 | ssl_prepare_serverhello_tlsext(SSL *s) |
| 1669 | { | 1653 | { |
| 1670 | #ifndef OPENSSL_NO_EC | ||
| 1671 | /* If we are server and using an ECC cipher suite, send the point formats we support | 1654 | /* If we are server and using an ECC cipher suite, send the point formats we support |
| 1672 | * if the client sent us an ECPointsFormat extension. Note that the server is not | 1655 | * if the client sent us an ECPointsFormat extension. Note that the server is not |
| 1673 | * supposed to send an EllipticCurves extension. | 1656 | * supposed to send an EllipticCurves extension. |
| @@ -1689,7 +1672,6 @@ ssl_prepare_serverhello_tlsext(SSL *s) | |||
| 1689 | s->tlsext_ecpointformatlist[1] = TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime; | 1672 | s->tlsext_ecpointformatlist[1] = TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime; |
| 1690 | s->tlsext_ecpointformatlist[2] = TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2; | 1673 | s->tlsext_ecpointformatlist[2] = TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2; |
| 1691 | } | 1674 | } |
| 1692 | #endif /* OPENSSL_NO_EC */ | ||
| 1693 | 1675 | ||
| 1694 | return 1; | 1676 | return 1; |
| 1695 | } | 1677 | } |
| @@ -1700,14 +1682,12 @@ ssl_check_clienthello_tlsext_early(SSL *s) | |||
| 1700 | int ret = SSL_TLSEXT_ERR_NOACK; | 1682 | int ret = SSL_TLSEXT_ERR_NOACK; |
| 1701 | int al = SSL_AD_UNRECOGNIZED_NAME; | 1683 | int al = SSL_AD_UNRECOGNIZED_NAME; |
| 1702 | 1684 | ||
| 1703 | #ifndef OPENSSL_NO_EC | ||
| 1704 | /* The handling of the ECPointFormats extension is done elsewhere, namely in | 1685 | /* The handling of the ECPointFormats extension is done elsewhere, namely in |
| 1705 | * ssl3_choose_cipher in s3_lib.c. | 1686 | * ssl3_choose_cipher in s3_lib.c. |
| 1706 | */ | 1687 | */ |
| 1707 | /* The handling of the EllipticCurves extension is done elsewhere, namely in | 1688 | /* The handling of the EllipticCurves extension is done elsewhere, namely in |
| 1708 | * ssl3_choose_cipher in s3_lib.c. | 1689 | * ssl3_choose_cipher in s3_lib.c. |
| 1709 | */ | 1690 | */ |
| 1710 | #endif | ||
| 1711 | 1691 | ||
| 1712 | if (s->ctx != NULL && s->ctx->tlsext_servername_callback != 0) | 1692 | if (s->ctx != NULL && s->ctx->tlsext_servername_callback != 0) |
| 1713 | ret = s->ctx->tlsext_servername_callback(s, &al, s->ctx->tlsext_servername_arg); | 1693 | ret = s->ctx->tlsext_servername_callback(s, &al, s->ctx->tlsext_servername_arg); |
| @@ -1850,7 +1830,6 @@ ssl_check_serverhello_tlsext(SSL *s) | |||
| 1850 | int ret = SSL_TLSEXT_ERR_NOACK; | 1830 | int ret = SSL_TLSEXT_ERR_NOACK; |
| 1851 | int al = SSL_AD_UNRECOGNIZED_NAME; | 1831 | int al = SSL_AD_UNRECOGNIZED_NAME; |
| 1852 | 1832 | ||
| 1853 | #ifndef OPENSSL_NO_EC | ||
| 1854 | /* If we are client and using an elliptic curve cryptography cipher | 1833 | /* If we are client and using an elliptic curve cryptography cipher |
| 1855 | * suite, then if server returns an EC point formats lists extension | 1834 | * suite, then if server returns an EC point formats lists extension |
| 1856 | * it must contain uncompressed. | 1835 | * it must contain uncompressed. |
| @@ -1879,7 +1858,6 @@ ssl_check_serverhello_tlsext(SSL *s) | |||
| 1879 | } | 1858 | } |
| 1880 | } | 1859 | } |
| 1881 | ret = SSL_TLSEXT_ERR_OK; | 1860 | ret = SSL_TLSEXT_ERR_OK; |
| 1882 | #endif /* OPENSSL_NO_EC */ | ||
| 1883 | 1861 | ||
| 1884 | if (s->ctx != NULL && s->ctx->tlsext_servername_callback != 0) | 1862 | if (s->ctx != NULL && s->ctx->tlsext_servername_callback != 0) |
| 1885 | ret = s->ctx->tlsext_servername_callback(s, &al, s->ctx->tlsext_servername_arg); | 1863 | ret = s->ctx->tlsext_servername_callback(s, &al, s->ctx->tlsext_servername_arg); |
