[BTLS]: Correctly handle certificates with negative serial numbers. (#3719)
commit1a55680bfaffa3fa00881889133e5313a6cd9ab4
authorMartin Baulig <martin.baulig@xamarin.com>
Mon, 10 Oct 2016 16:02:26 +0000 (10 18:02 +0200)
committerGitHub <noreply@github.com>
Mon, 10 Oct 2016 16:02:26 +0000 (10 18:02 +0200)
tree35de0c3a20f1e0d2fcff2401a31f71b5a6c31a22
parent0865083699aba2c370a466a5268b101ee87609ff
[BTLS]: Correctly handle certificates with negative serial numbers. (#3719)

In mono_btls_x509_get_serial_number(), first call i2c_ASN1_INTEGER()
which takes care of padding and computing the 2s complement for negative
numbers, then reverse the buffer.
mono/btls/btls-x509.c