-/* $OpenBSD: ssl_asn1.c,v 1.61 2022/01/11 18:39:28 jsing Exp $ */
+/* $OpenBSD: ssl_asn1.c,v 1.62 2022/06/06 16:12:30 tb Exp $ */
/*
* Copyright (c) 2016 Joel Sing <jsing@openbsd.org>
*
/* Cipher suite ID. */
/* XXX - require cipher to be non-NULL or always/only use cipher_id. */
- cid = (uint16_t)(s->cipher_id & 0xffff);
+ cid = (uint16_t)(s->cipher_id & SSL3_CK_VALUE_MASK);
if (s->cipher != NULL)
cid = ssl3_cipher_get_value(s->cipher);
if (!CBB_add_asn1(&session, &cipher_suite, CBS_ASN1_OCTETSTRING))
-/* $OpenBSD: ssl_txt.c,v 1.32 2022/06/06 15:20:54 tb Exp $ */
+/* $OpenBSD: ssl_txt.c,v 1.33 2022/06/06 16:12:31 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
goto err;
if (x->cipher == NULL) {
- if ((x->cipher_id & 0xff000000) == 0x02000000) {
- if (BIO_printf(bp, " Cipher : %06lX\n",
- x->cipher_id & 0xffffff) <= 0)
- goto err;
- } else {
- if (BIO_printf(bp, " Cipher : %04lX\n",
- x->cipher_id & 0xffff) <= 0)
- goto err;
- }
+ if (BIO_printf(bp, " Cipher : %04lX\n",
+ x->cipher_id & SSL3_CK_VALUE_MASK) <= 0)
+ goto err;
} else {
const char *cipher_name = "unknown";