diff options
author | jsing <> | 2021-03-24 18:40:03 +0000 |
---|---|---|
committer | jsing <> | 2021-03-24 18:40:03 +0000 |
commit | 3ce9712d99b47c9a9db840f6cf8cc970a5f841dd (patch) | |
tree | 11571c197cb39ad7863008ce9cfde68d93e4365c /src/lib/libssl/ssl_locl.h | |
parent | fe982f909e3eb95563da8f33820ff38d44f1179f (diff) | |
download | openbsd-3ce9712d99b47c9a9db840f6cf8cc970a5f841dd.tar.gz openbsd-3ce9712d99b47c9a9db840f6cf8cc970a5f841dd.tar.bz2 openbsd-3ce9712d99b47c9a9db840f6cf8cc970a5f841dd.zip |
Add SSL_HANDSHAKE_TLS12 for TLSv1.2 specific handshake data.
Move TLSv1.2 specific components over from SSL_HANDSHAKE.
ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 33eb3bba7d..5f953b8e64 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.328 2021/03/21 18:36:34 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.329 2021/03/24 18:40:03 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 | * |
@@ -416,6 +416,15 @@ typedef struct cert_pkey_st { | |||
416 | STACK_OF(X509) *chain; | 416 | STACK_OF(X509) *chain; |
417 | } CERT_PKEY; | 417 | } CERT_PKEY; |
418 | 418 | ||
419 | typedef struct ssl_handshake_tls12_st { | ||
420 | /* Used when SSL_ST_FLUSH_DATA is entered. */ | ||
421 | int next_state; | ||
422 | |||
423 | /* Record-layer key block for TLS 1.2 and earlier. */ | ||
424 | unsigned char *key_block; | ||
425 | size_t key_block_len; | ||
426 | } SSL_HANDSHAKE_TLS12; | ||
427 | |||
419 | typedef struct ssl_handshake_tls13_st { | 428 | typedef struct ssl_handshake_tls13_st { |
420 | int use_legacy; | 429 | int use_legacy; |
421 | int hrr; | 430 | int hrr; |
@@ -466,27 +475,25 @@ typedef struct ssl_handshake_st { | |||
466 | */ | 475 | */ |
467 | uint16_t negotiated_tls_version; | 476 | uint16_t negotiated_tls_version; |
468 | 477 | ||
469 | SSL_HANDSHAKE_TLS13 tls13; | 478 | /* |
470 | 479 | * Current handshake state - contains one of the SSL3_ST_* values and | |
471 | /* state contains one of the SSL3_ST_* values. */ | 480 | * is used by the TLSv1.2 state machine, as well as being updated by |
481 | * the TLSv1.3 stack due to it being exposed externally. | ||
482 | */ | ||
472 | int state; | 483 | int state; |
473 | 484 | ||
474 | /* used when SSL_ST_FLUSH_DATA is entered */ | 485 | /* Cipher being negotiated in this handshake. */ |
475 | int next_state; | ||
476 | |||
477 | /* new_cipher is the cipher being negotiated in this handshake. */ | ||
478 | const SSL_CIPHER *new_cipher; | 486 | const SSL_CIPHER *new_cipher; |
479 | 487 | ||
480 | /* key_block is the record-layer key block for TLS 1.2 and earlier. */ | ||
481 | size_t key_block_len; | ||
482 | unsigned char *key_block; | ||
483 | |||
484 | /* Extensions seen in this handshake. */ | 488 | /* Extensions seen in this handshake. */ |
485 | uint32_t extensions_seen; | 489 | uint32_t extensions_seen; |
486 | 490 | ||
487 | /* sigalgs offered in this handshake in wire form */ | 491 | /* sigalgs offered in this handshake in wire form */ |
488 | size_t sigalgs_len; | ||
489 | uint8_t *sigalgs; | 492 | uint8_t *sigalgs; |
493 | size_t sigalgs_len; | ||
494 | |||
495 | SSL_HANDSHAKE_TLS12 tls12; | ||
496 | SSL_HANDSHAKE_TLS13 tls13; | ||
490 | } SSL_HANDSHAKE; | 497 | } SSL_HANDSHAKE; |
491 | 498 | ||
492 | struct tls12_record_layer; | 499 | struct tls12_record_layer; |