diff options
| author | jsing <> | 2014-10-03 13:58:18 +0000 |
|---|---|---|
| committer | jsing <> | 2014-10-03 13:58:18 +0000 |
| commit | 00aab6e9fe0cafba69f2b8ba7716f378e303cf92 (patch) | |
| tree | cffe0badf760bb2604b226bec541734923e423b7 /src/lib/libssl/ssl_locl.h | |
| parent | 3e3e62d53cc575a61b99b211f05e78229c836866 (diff) | |
| download | openbsd-00aab6e9fe0cafba69f2b8ba7716f378e303cf92.tar.gz openbsd-00aab6e9fe0cafba69f2b8ba7716f378e303cf92.tar.bz2 openbsd-00aab6e9fe0cafba69f2b8ba7716f378e303cf92.zip | |
Add support for automatic ephemeral EC keys.
This allows an SSL server to enable ECDHE ciphers with a single setting,
which results in an EC key being generated using the first preference
shared curve.
Based on OpenSSL with inspiration from boringssl.
ok miod@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_locl.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 8ec4c69d5b..976f835c92 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_locl.h,v 1.70 2014/09/30 15:40:09 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.71 2014/10/03 13:58:18 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -439,13 +439,16 @@ typedef struct cert_st { | |||
| 439 | int valid; | 439 | int valid; |
| 440 | unsigned long mask_k; | 440 | unsigned long mask_k; |
| 441 | unsigned long mask_a; | 441 | unsigned long mask_a; |
| 442 | |||
| 442 | RSA *rsa_tmp; | 443 | RSA *rsa_tmp; |
| 443 | RSA *(*rsa_tmp_cb)(SSL *ssl, int is_export, int keysize); | 444 | RSA *(*rsa_tmp_cb)(SSL *ssl, int is_export, int keysize); |
| 445 | |||
| 444 | DH *dh_tmp; | 446 | DH *dh_tmp; |
| 445 | DH *(*dh_tmp_cb)(SSL *ssl, int is_export, int keysize); | 447 | DH *(*dh_tmp_cb)(SSL *ssl, int is_export, int keysize); |
| 448 | |||
| 446 | EC_KEY *ecdh_tmp; | 449 | EC_KEY *ecdh_tmp; |
| 447 | /* Callback for generating ephemeral ECDH keys */ | ||
| 448 | EC_KEY *(*ecdh_tmp_cb)(SSL *ssl, int is_export, int keysize); | 450 | EC_KEY *(*ecdh_tmp_cb)(SSL *ssl, int is_export, int keysize); |
| 451 | int ecdh_tmp_auto; | ||
| 449 | 452 | ||
| 450 | CERT_PKEY pkeys[SSL_PKEY_NUM]; | 453 | CERT_PKEY pkeys[SSL_PKEY_NUM]; |
| 451 | 454 | ||
| @@ -799,6 +802,7 @@ SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n); | |||
| 799 | int tls1_ec_curve_id2nid(int curve_id); | 802 | int tls1_ec_curve_id2nid(int curve_id); |
| 800 | int tls1_ec_nid2curve_id(int nid); | 803 | int tls1_ec_nid2curve_id(int nid); |
| 801 | int tls1_check_curve(SSL *s, const unsigned char *p, size_t len); | 804 | int tls1_check_curve(SSL *s, const unsigned char *p, size_t len); |
| 805 | int tls1_get_shared_curve(SSL *s); | ||
| 802 | 806 | ||
| 803 | unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, | 807 | unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, |
| 804 | unsigned char *limit); | 808 | unsigned char *limit); |
