diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-02-19 01:29:29 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-02-19 01:29:29 +0000 |
commit | 0ca5f8b15c927d56004d3b53744ab68e6ec1b79b (patch) | |
tree | a04d70b9b38d66f1b52aa45ccddc39051da5ce14 /crypto/x509v3/v3_utl.c | |
parent | 6b056c414d1a80055405976ddf09d4dfee85ecf8 (diff) |
Overhaul 'crl' application, add a proper X509_CRL_print function and start
to support CRL extensions.
Diffstat (limited to 'crypto/x509v3/v3_utl.c')
-rw-r--r-- | crypto/x509v3/v3_utl.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c index 45a3a56234..2b4d079b0e 100644 --- a/crypto/x509v3/v3_utl.c +++ b/crypto/x509v3/v3_utl.c @@ -133,19 +133,30 @@ STACK **extlist; return 1; } +char *i2s_ASN1_INTEGER(method, a) +X509V3_EXT_METHOD *method; +ASN1_INTEGER *a; +{ + BIGNUM *bntmp = NULL; + char *strtmp = NULL; + if(!a) return NULL; + if(!(bntmp = ASN1_INTEGER_to_BN(a, NULL)) || + !(strtmp = BN_bn2dec(bntmp)) ) + X509V3err(X509V3_F_I2S_ASN1_INTEGER,ERR_R_MALLOC_FAILURE); + BN_free(bntmp); + return strtmp; +} + int X509V3_add_value_int(name, aint, extlist) char *name; ASN1_INTEGER *aint; STACK **extlist; { - BIGNUM *bntmp; char *strtmp; int ret; if(!aint) return 1; - bntmp = ASN1_INTEGER_to_BN(aint, NULL); - strtmp = BN_bn2dec(bntmp); + if(!(strtmp = i2s_ASN1_INTEGER(NULL, aint))) return 0; ret = X509V3_add_value(name, strtmp, extlist); - BN_free(bntmp); Free(strtmp); return ret; } |