ASN.1 DER: Make INT32 / INT64 types read badly encoded LONG zeroes
authorRichard Levitte <levitte@openssl.org>
Thu, 6 Sep 2018 20:09:11 +0000 (22:09 +0200)
committerRichard Levitte <levitte@openssl.org>
Sun, 9 Sep 2018 01:39:37 +0000 (03:39 +0200)
commitca89174bc92c16f0a2a7eb86359b6c6fd1dd7a4d
treeb61c993d5e2656f3e5096974d71cbf4ef45578e9
parentc2278c8bc41b01df9fac5fc3d7134430a88dd0e5
ASN.1 DER: Make INT32 / INT64 types read badly encoded LONG zeroes

The deprecated ASN.1 type LONG / ZLONG (incorrectly) produced zero
length INTEGER encoding for zeroes.  For the sake of backward
compatibility, we allow those to be read without fault when using the
replacement types INT32 / UINT32 / INT64 / UINT64.

Fixes #7134

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7144)
crypto/asn1/x_int64.c