diff options
author | jsing <> | 2020-05-29 18:00:10 +0000 |
---|---|---|
committer | jsing <> | 2020-05-29 18:00:10 +0000 |
commit | 0ef5f8585d34b9d2de88692d29e28b65e20c9562 (patch) | |
tree | e48fe26edb46ce97cad12ada94c4e75d004a357d /src/lib/libssl/ssl_locl.h | |
parent | ed3918023e9cb56cd8b5aee0647135d4088a65b0 (diff) | |
download | openbsd-0ef5f8585d34b9d2de88692d29e28b65e20c9562.tar.gz openbsd-0ef5f8585d34b9d2de88692d29e28b65e20c9562.tar.bz2 openbsd-0ef5f8585d34b9d2de88692d29e28b65e20c9562.zip |
Improve server certificate selection for TLSv1.3.
This allows an EC certificate to be selected and used, if the client
sigalgs would allow it.
With feedback from tb@
ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 046c4bba52..e7e3e56154 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.276 2020/05/29 17:39:42 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.277 2020/05/29 18:00:10 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 | * |
@@ -435,6 +435,12 @@ typedef struct ssl_handshake_st { | |||
435 | uint8_t *sigalgs; | 435 | uint8_t *sigalgs; |
436 | } SSL_HANDSHAKE; | 436 | } SSL_HANDSHAKE; |
437 | 437 | ||
438 | typedef struct cert_pkey_st { | ||
439 | X509 *x509; | ||
440 | EVP_PKEY *privatekey; | ||
441 | STACK_OF(X509) *chain; | ||
442 | } CERT_PKEY; | ||
443 | |||
438 | typedef struct ssl_handshake_tls13_st { | 444 | typedef struct ssl_handshake_tls13_st { |
439 | uint16_t min_version; | 445 | uint16_t min_version; |
440 | uint16_t max_version; | 446 | uint16_t max_version; |
@@ -443,6 +449,10 @@ typedef struct ssl_handshake_tls13_st { | |||
443 | int use_legacy; | 449 | int use_legacy; |
444 | int hrr; | 450 | int hrr; |
445 | 451 | ||
452 | /* Certificate and sigalg selected for use (static pointers). */ | ||
453 | const CERT_PKEY *cpk; | ||
454 | const struct ssl_sigalg *sigalg; | ||
455 | |||
446 | /* Version proposed by peer server. */ | 456 | /* Version proposed by peer server. */ |
447 | uint16_t server_version; | 457 | uint16_t server_version; |
448 | 458 | ||
@@ -985,12 +995,6 @@ typedef struct dtls1_state_internal_st { | |||
985 | } DTLS1_STATE_INTERNAL; | 995 | } DTLS1_STATE_INTERNAL; |
986 | #define D1I(s) (s->d1->internal) | 996 | #define D1I(s) (s->d1->internal) |
987 | 997 | ||
988 | typedef struct cert_pkey_st { | ||
989 | X509 *x509; | ||
990 | EVP_PKEY *privatekey; | ||
991 | STACK_OF(X509) *chain; | ||
992 | } CERT_PKEY; | ||
993 | |||
994 | typedef struct cert_st { | 998 | typedef struct cert_st { |
995 | /* Current active set */ | 999 | /* Current active set */ |
996 | CERT_PKEY *key; /* ALWAYS points to an element of the pkeys array | 1000 | CERT_PKEY *key; /* ALWAYS points to an element of the pkeys array |