asn1/t_x509.c: fix serial number print, harmonize with a_int.c [from HEAD].
PR: 2675 Submitted by: Annie Yousar
This commit is contained in:
parent
d572544a2c
commit
f63c927e8e
2 changed files with 3 additions and 3 deletions
|
@ -386,8 +386,8 @@ long ASN1_INTEGER_get(const ASN1_INTEGER *a)
|
|||
|
||||
if (a->length > (int)sizeof(long))
|
||||
{
|
||||
/* hmm... a bit ugly */
|
||||
return(0xffffffffL);
|
||||
/* hmm... a bit ugly, return all ones */
|
||||
return -1;
|
||||
}
|
||||
if (a->data == NULL)
|
||||
return 0;
|
||||
|
|
|
@ -140,7 +140,7 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag)
|
|||
if (bs->length <= 4)
|
||||
{
|
||||
l=ASN1_INTEGER_get(bs);
|
||||
if (l < 0)
|
||||
if (bs->type == V_ASN1_NEG_INTEGER)
|
||||
{
|
||||
l= -l;
|
||||
neg="-";
|
||||
|
|
Loading…
Reference in a new issue