Overhaul 'crl' application, add a proper X509_CRL_print function and start

to support CRL extensions.
This commit is contained in:
Dr. Stephen Henson
1999-02-19 01:29:29 +00:00
parent 6b056c414d
commit 0ca5f8b15c
16 changed files with 354 additions and 57 deletions

View File

@@ -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;
}