aboutsummaryrefslogtreecommitdiffstats
path: root/apps/x509.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2000-10-06 11:51:47 +0000
committerDr. Stephen Henson <steve@openssl.org>2000-10-06 11:51:47 +0000
commit8ca533e37824a308e5b897486fc92c199bdf79a9 (patch)
tree32ffca4f9cb22f1d1b68f1e4e3c829a0cf54cc70 /apps/x509.c
parentd0c98589146d79f1059638057dad9bb80d662339 (diff)
downloadopenssl-8ca533e37824a308e5b897486fc92c199bdf79a9.tar.gz
More code for X509_print_ex() support.
Diffstat (limited to 'apps/x509.c')
-rw-r--r--apps/x509.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/x509.c b/apps/x509.c
index 76dd66db86..3bef1fc590 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -129,6 +129,7 @@ static char *x509_usage[]={
" -extensions - section from config file with X509V3 extensions to add\n",
" -clrext - delete extensions before signing and input certificate\n",
" -nameopt arg - various certificate name options\n",
+" -certopt arg - various certificate text options\n",
NULL
};
@@ -174,7 +175,7 @@ int MAIN(int argc, char **argv)
char *extsect = NULL, *extfile = NULL, *passin = NULL, *passargin = NULL;
int need_rand = 0;
int checkend=0,checkoffset=0;
- unsigned long nmflag = 0;
+ unsigned long nmflag = 0, certflag = 0;
reqfile=0;
@@ -326,6 +327,11 @@ int MAIN(int argc, char **argv)
alias= *(++argv);
trustout = 1;
}
+ else if (strcmp(*argv,"-certopt") == 0)
+ {
+ if (--argc < 1) goto bad;
+ if (!set_cert_ex(&certflag, *(++argv))) goto bad;
+ }
else if (strcmp(*argv,"-nameopt") == 0)
{
if (--argc < 1) goto bad;
@@ -774,7 +780,7 @@ bad:
}
else if (text == i)
{
- X509_print(out,x);
+ X509_print_ex(out,x,nmflag, certflag);
}
else if (startdate == i)
{