Unbreak ASN.1 indefinite length encoding.
authorjsing <jsing@openbsd.org>
Mon, 17 Oct 2022 18:03:15 +0000 (18:03 +0000)
committerjsing <jsing@openbsd.org>
Mon, 17 Oct 2022 18:03:15 +0000 (18:03 +0000)
commitbb014f8014ffbae7e1ce8b381b786179c49d10de
tree7982b7dc1094d3ef884c17beb6dca99424525cf9
parentcbe0841215e99384ac75fa10b48fd423655676e9
Unbreak ASN.1 indefinite length encoding.

In r1.25 of tasn_enc.c a check was added to ensure that asn1_ex_i2c()
returned the same value on both calls, however in the ndef case the len
variable gets changed between calls. Keep a copy of the original value to
test against.

Issue reported by niklas, who encountered a test failure in rust-openssl.

ok miod@ tb@
lib/libcrypto/asn1/tasn_enc.c