summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_tlsext.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_tlsext.c')
-rw-r--r--src/lib/libssl/ssl_tlsext.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/libssl/ssl_tlsext.c b/src/lib/libssl/ssl_tlsext.c
index 74b54154e3..4cc406526d 100644
--- a/src/lib/libssl/ssl_tlsext.c
+++ b/src/lib/libssl/ssl_tlsext.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_tlsext.c,v 1.103 2022/01/04 11:01:58 jsing Exp $ */ 1/* $OpenBSD: ssl_tlsext.c,v 1.104 2022/01/05 17:10:02 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> 4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org>
@@ -1461,11 +1461,11 @@ tlsext_keyshare_client_build(SSL *s, uint16_t msg_type, CBB *cbb)
1461 return 0; 1461 return 0;
1462 1462
1463 if (!CBB_add_u16(&client_shares, 1463 if (!CBB_add_u16(&client_shares,
1464 tls13_key_share_group(S3I(s)->hs.tls13.key_share))) 1464 tls_key_share_group(S3I(s)->hs.key_share)))
1465 return 0; 1465 return 0;
1466 if (!CBB_add_u16_length_prefixed(&client_shares, &key_exchange)) 1466 if (!CBB_add_u16_length_prefixed(&client_shares, &key_exchange))
1467 return 0; 1467 return 0;
1468 if (!tls13_key_share_public(S3I(s)->hs.tls13.key_share, &key_exchange)) 1468 if (!tls_key_share_public(S3I(s)->hs.key_share, &key_exchange))
1469 return 0; 1469 return 0;
1470 1470
1471 if (!CBB_flush(cbb)) 1471 if (!CBB_flush(cbb))
@@ -1502,7 +1502,7 @@ tlsext_keyshare_server_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert)
1502 */ 1502 */
1503 if (S3I(s)->hs.our_max_tls_version < TLS1_3_VERSION) 1503 if (S3I(s)->hs.our_max_tls_version < TLS1_3_VERSION)
1504 continue; 1504 continue;
1505 if (S3I(s)->hs.tls13.key_share != NULL) 1505 if (S3I(s)->hs.key_share != NULL)
1506 continue; 1506 continue;
1507 1507
1508 /* XXX - consider implementing server preference. */ 1508 /* XXX - consider implementing server preference. */
@@ -1510,10 +1510,10 @@ tlsext_keyshare_server_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert)
1510 continue; 1510 continue;
1511 1511
1512 /* Decode and store the selected key share. */ 1512 /* Decode and store the selected key share. */
1513 S3I(s)->hs.tls13.key_share = tls13_key_share_new(group); 1513 S3I(s)->hs.key_share = tls_key_share_new(group);
1514 if (S3I(s)->hs.tls13.key_share == NULL) 1514 if (S3I(s)->hs.key_share == NULL)
1515 goto err; 1515 goto err;
1516 if (!tls13_key_share_peer_public(S3I(s)->hs.tls13.key_share, 1516 if (!tls_key_share_peer_public(S3I(s)->hs.key_share,
1517 group, &key_exchange)) 1517 group, &key_exchange))
1518 goto err; 1518 goto err;
1519 } 1519 }
@@ -1544,14 +1544,14 @@ tlsext_keyshare_server_build(SSL *s, uint16_t msg_type, CBB *cbb)
1544 return CBB_add_u16(cbb, S3I(s)->hs.tls13.server_group); 1544 return CBB_add_u16(cbb, S3I(s)->hs.tls13.server_group);
1545 } 1545 }
1546 1546
1547 if (S3I(s)->hs.tls13.key_share == NULL) 1547 if (S3I(s)->hs.key_share == NULL)
1548 return 0; 1548 return 0;
1549 1549
1550 if (!CBB_add_u16(cbb, tls13_key_share_group(S3I(s)->hs.tls13.key_share))) 1550 if (!CBB_add_u16(cbb, tls_key_share_group(S3I(s)->hs.key_share)))
1551 return 0; 1551 return 0;
1552 if (!CBB_add_u16_length_prefixed(cbb, &key_exchange)) 1552 if (!CBB_add_u16_length_prefixed(cbb, &key_exchange))
1553 return 0; 1553 return 0;
1554 if (!tls13_key_share_public(S3I(s)->hs.tls13.key_share, &key_exchange)) 1554 if (!tls_key_share_public(S3I(s)->hs.key_share, &key_exchange))
1555 return 0; 1555 return 0;
1556 1556
1557 if (!CBB_flush(cbb)) 1557 if (!CBB_flush(cbb))
@@ -1582,10 +1582,10 @@ tlsext_keyshare_client_parse(SSL *s, uint16_t msg_type, CBS *cbs, int *alert)
1582 if (!CBS_get_u16_length_prefixed(cbs, &key_exchange)) 1582 if (!CBS_get_u16_length_prefixed(cbs, &key_exchange))
1583 return 0; 1583 return 0;
1584 1584
1585 if (S3I(s)->hs.tls13.key_share == NULL) 1585 if (S3I(s)->hs.key_share == NULL)
1586 return 0; 1586 return 0;
1587 1587
1588 if (!tls13_key_share_peer_public(S3I(s)->hs.tls13.key_share, 1588 if (!tls_key_share_peer_public(S3I(s)->hs.key_share,
1589 group, &key_exchange)) 1589 group, &key_exchange))
1590 goto err; 1590 goto err;
1591 1591