diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-06-11 12:18:15 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-06-11 12:18:15 +0000 |
commit | a91dedca48ec58e6baab75839753121fb725c9e1 (patch) | |
tree | 939e2269057c5d61dbfa1aca78369159282cb3bd /apps/x509.c | |
parent | 482a9d41b93f504a94ee889c1ebe406e05088c93 (diff) |
Document EVP routines. Change EVP_SealInit() and EVP_OpenInit()
to support multiple calls.
New function to retrieve email address from certificates and
requests.
Diffstat (limited to 'apps/x509.c')
-rw-r--r-- | apps/x509.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/x509.c b/apps/x509.c index 88ef1e064d..cdfc24a5c7 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -97,6 +97,7 @@ static char *x509_usage[]={ " -hash - print hash value\n", " -subject - print subject DN\n", " -issuer - print issuer DN\n", +" -email - print email address(es)\n", " -startdate - notBefore field\n", " -enddate - notAfter field\n", " -purpose - print out certificate purposes\n", @@ -161,7 +162,7 @@ int MAIN(int argc, char **argv) char *CAkeyfile=NULL,*CAserial=NULL; char *alias=NULL; int text=0,serial=0,hash=0,subject=0,issuer=0,startdate=0,enddate=0; - int noout=0,sign_flag=0,CA_flag=0,CA_createserial=0; + int noout=0,sign_flag=0,CA_flag=0,CA_createserial=0,email=0; int trustout=0,clrtrust=0,clrreject=0,aliasout=0,clrext=0; int C=0; int x509req=0,days=DEF_DAYS,modulus=0,pubkey=0; @@ -327,6 +328,8 @@ int MAIN(int argc, char **argv) } else if (strcmp(*argv,"-C") == 0) C= ++num; + else if (strcmp(*argv,"-email") == 0) + email= ++num; else if (strcmp(*argv,"-serial") == 0) serial= ++num; else if (strcmp(*argv,"-modulus") == 0) @@ -617,6 +620,15 @@ bad: i2a_ASN1_INTEGER(STDout,x->cert_info->serialNumber); BIO_printf(STDout,"\n"); } + else if (email == i) + { + int j; + STACK *emlst; + emlst = X509_get1_email(x); + for(j = 0; j < sk_num(emlst); j++) + BIO_printf(STDout, "%s\n", sk_value(emlst, j)); + X509_email_free(emlst); + } else if (aliasout == i) { unsigned char *alstr; |