]> granicus.if.org Git - openssl/commit
Fix x_int64.c
authorRichard Levitte <levitte@openssl.org>
Mon, 10 Apr 2017 20:01:05 +0000 (22:01 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 11 Apr 2017 20:09:35 +0000 (22:09 +0200)
commit8e4fa6f7f0a1f648911088c2f1e432ca8c2b78e5
treef6ec4a784da404a1620f46be9868b6ce60903dba
parent9d522f08817b6e706ae54c2688b215ff1c631b49
Fix x_int64.c

Clearing a misunderstanding.  The routines c2i_uint64_int() and
i2c_uint64_int() expect to receive that internal values are absolute
and with a separate sign flag, and the x_int64.c code handles values
that aren't absolute and have the sign bit embedded.  We therefore
need to convert between absolute and non-absolute values for the
encoding of negative values to be correct.

[extended tests]

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3160)
(cherry picked from commit 429223d198aabacd129cf6dde5a4203b5af41737)
crypto/asn1/x_int64.c