Fix encoding bug in i2c_ASN1_INTEGER

Fix bug where i2c_ASN1_INTEGER mishandles zero if it is marked as
negative.

Thanks to Huzaifa Sidhpurwala <huzaifas@redhat.com> and
Hanno Böck <hanno@hboeck.de> for reporting this issue.

Reviewed-by: Rich Salz <rsalz@openssl.org>

(cherry-picked from a0eed48d37a4b7beea0c966caf09ad46f4a92a44)

Bug: 28175332
Change-Id: I4366a15dee46a02e67746fd1642f2a7bd17f8f84
2 files changed