summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_asn1.c
diff options
context:
space:
mode:
authortb <>2022-06-06 16:12:31 +0000
committertb <>2022-06-06 16:12:31 +0000
commit0338dfd70caeed3b09fb2a9b023fad29068336ac (patch)
treeb91fc02a2b07350768adf8d97a4356881758386a /src/lib/libssl/ssl_asn1.c
parent5352ed61e080069f259dec46d7e371239b23c514 (diff)
downloadopenbsd-0338dfd70caeed3b09fb2a9b023fad29068336ac.tar.gz
openbsd-0338dfd70caeed3b09fb2a9b023fad29068336ac.tar.bz2
openbsd-0338dfd70caeed3b09fb2a9b023fad29068336ac.zip
Use SSL3_CK_VALUE_MASK instead of hardcoded 0xffff and remove some
SSLv2 remnants. ok jsing
Diffstat (limited to 'src/lib/libssl/ssl_asn1.c')
-rw-r--r--src/lib/libssl/ssl_asn1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_asn1.c b/src/lib/libssl/ssl_asn1.c
index 70a50acc5c..e0bf92d035 100644
--- a/src/lib/libssl/ssl_asn1.c
+++ b/src/lib/libssl/ssl_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_asn1.c,v 1.61 2022/01/11 18:39:28 jsing Exp $ */ 1/* $OpenBSD: ssl_asn1.c,v 1.62 2022/06/06 16:12:30 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2016 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2016 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -71,7 +71,7 @@ SSL_SESSION_encode(SSL_SESSION *s, unsigned char **out, size_t *out_len,
71 71
72 /* Cipher suite ID. */ 72 /* Cipher suite ID. */
73 /* XXX - require cipher to be non-NULL or always/only use cipher_id. */ 73 /* XXX - require cipher to be non-NULL or always/only use cipher_id. */
74 cid = (uint16_t)(s->cipher_id & 0xffff); 74 cid = (uint16_t)(s->cipher_id & SSL3_CK_VALUE_MASK);
75 if (s->cipher != NULL) 75 if (s->cipher != NULL)
76 cid = ssl3_cipher_get_value(s->cipher); 76 cid = ssl3_cipher_get_value(s->cipher);
77 if (!CBB_add_asn1(&session, &cipher_suite, CBS_ASN1_OCTETSTRING)) 77 if (!CBB_add_asn1(&session, &cipher_suite, CBS_ASN1_OCTETSTRING))