summaryrefslogtreecommitdiff
path: root/lib/libssl/ssl_asn1.c
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-06-06 16:12:32 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-06-06 16:12:32 +0000
commitd5144a521c641a5ed2471ab103e0297c662c332f (patch)
treeedc9ac8682cbbb293f8d4ec6bfda27985b06ead9 /lib/libssl/ssl_asn1.c
parent258bdd7c0db3de9ef58ceff1aec5d599e8319819 (diff)
Use SSL3_CK_VALUE_MASK instead of hardcoded 0xffff and remove some
SSLv2 remnants. ok jsing
Diffstat (limited to 'lib/libssl/ssl_asn1.c')
-rw-r--r--lib/libssl/ssl_asn1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/ssl_asn1.c b/lib/libssl/ssl_asn1.c
index 70a50acc5c7..e0bf92d0357 100644
--- a/lib/libssl/ssl_asn1.c
+++ b/lib/libssl/ssl_asn1.c
@@ -1,4 +1,4 @@
-/* $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>
*
@@ -71,7 +71,7 @@ SSL_SESSION_encode(SSL_SESSION *s, unsigned char **out, size_t *out_len,
/* 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))