diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/f_int.c')
-rw-r--r-- | src/lib/libcrypto/asn1/f_int.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/f_int.c b/src/lib/libcrypto/asn1/f_int.c index 6b090f6740..48cc3bfb90 100644 --- a/src/lib/libcrypto/asn1/f_int.c +++ b/src/lib/libcrypto/asn1/f_int.c | |||
@@ -69,10 +69,16 @@ int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a) | |||
69 | 69 | ||
70 | if (a == NULL) return(0); | 70 | if (a == NULL) return(0); |
71 | 71 | ||
72 | if (a->type & V_ASN1_NEG) | ||
73 | { | ||
74 | if (BIO_write(bp, "-", 1) != 1) goto err; | ||
75 | n = 1; | ||
76 | } | ||
77 | |||
72 | if (a->length == 0) | 78 | if (a->length == 0) |
73 | { | 79 | { |
74 | if (BIO_write(bp,"00",2) != 2) goto err; | 80 | if (BIO_write(bp,"00",2) != 2) goto err; |
75 | n=2; | 81 | n += 2; |
76 | } | 82 | } |
77 | else | 83 | else |
78 | { | 84 | { |