-/* $OpenBSD: asn1test.c,v 1.12 2022/11/26 16:08:56 tb Exp $ */
+/* $OpenBSD: asn1test.c,v 1.13 2024/07/22 14:50:45 jsing Exp $ */
/*
* Copyright (c) 2014, 2016 Joel Sing <jsing@openbsd.org>
*
struct ssl_asn1_test ssl_asn1_tests[] = {
{
.session = {
- .cipher_id = 0x03000000L | 1,
+ .cipher_value = 1,
.ssl_version = TLS1_2_VERSION,
},
.asn1 = {
},
{
.session = {
- .cipher_id = 0x03000000L | 1,
+ .cipher_value = 1,
.ssl_version = TLS1_2_VERSION,
.master_key_length = 26,
.session_id = "0123456789",
},
{
.session = {
- .cipher_id = 0x03000000L | 1,
+ .cipher_value = 1,
.ssl_version = TLS1_2_VERSION,
.master_key_length = 26,
.session_id = "0123456789",
},
{
.session = {
- .cipher_id = 0x03000000L | 1,
+ .cipher_value = 1,
.ssl_version = TLS1_2_VERSION,
.timeout = -1,
},
},
{
.session = {
- .cipher_id = 0x03000000L | 1,
+ .cipher_value = 1,
.ssl_version = TLS1_2_VERSION,
.time = -1,
},
s1->ssl_version, s2->ssl_version);
return (1);
}
- if (s1->cipher_id != s2->cipher_id) {
- fprintf(stderr, "cipher_id differs: %ld != %ld\n",
- s1->cipher_id, s2->cipher_id);
+ if (s1->cipher_value != s2->cipher_value) {
+ fprintf(stderr, "cipher_value differs: %d != %d\n",
+ s1->cipher_value, s2->cipher_value);
return (1);
}
-/* $OpenBSD: tlsexttest.c,v 1.90 2024/03/30 09:53:41 tb Exp $ */
+/* $OpenBSD: tlsexttest.c,v 1.91 2024/07/22 14:50:45 jsing Exp $ */
/*
* Copyright (c) 2017 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2017 Doug Hogan <doug@openbsd.org>
errx(1, "failed to create session");
/* Setup the state so we can call needs. */
- if ((ssl->s3->hs.cipher =
- ssl3_get_cipher_by_id(TLS1_CK_ECDHE_ECDSA_CHACHA20_POLY1305))
- == NULL) {
+ if ((ssl->s3->hs.cipher = ssl3_get_cipher_by_value(0xcca9)) == NULL) {
FAIL("server cannot find cipher\n");
goto err;
}
ssl->s3->hs.our_max_tls_version = TLS1_3_VERSION;
ssl->s3->hs.negotiated_tls_version = TLS1_3_VERSION;
- ssl->s3->hs.cipher =
- ssl3_get_cipher_by_id(TLS1_CK_RSA_WITH_AES_128_SHA256);
+ ssl->s3->hs.cipher = ssl3_get_cipher_by_value(0x003c);
if (!tlsext_server_build(ssl, SSL_TLSEXT_MSG_SH, &cbb)) {
FAIL("failed to build serverhello extensions\n");
/* Turn a few things on so we get extensions... */
ssl->s3->send_connection_binding = 1;
- ssl->s3->hs.cipher =
- ssl3_get_cipher_by_id(TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256);
+ ssl->s3->hs.cipher = ssl3_get_cipher_by_value(0xc027);
ssl->tlsext_status_expected = 1;
ssl->tlsext_ticket_expected = 1;
if ((ssl->session->tlsext_ecpointformatlist = malloc(1)) == NULL) {