Now that master_key_length is a size_t, we no longer have to fiddle with
data_len. We can rather pass a pointer to it to CBS_write_bytes().
ok jsing
-/* $OpenBSD: ssl_asn1.c,v 1.62 2022/06/06 16:12:30 tb Exp $ */
+/* $OpenBSD: ssl_asn1.c,v 1.63 2022/06/07 17:20:26 tb Exp $ */
/*
* Copyright (c) 2016 Joel Sing <jsing@openbsd.org>
*
if (!CBS_get_asn1(&session, &master_key, CBS_ASN1_OCTETSTRING))
goto err;
if (!CBS_write_bytes(&master_key, s->master_key, sizeof(s->master_key),
- &data_len))
- goto err;
- if (data_len > INT_MAX)
+ &s->master_key_length))
goto err;
- s->master_key_length = (int)data_len;
/* Time [1]. */
s->time = time(NULL);