diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2002-08-23 03:43:48 +0400 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2002-08-23 03:43:48 +0400 |
commit | fc85ac20c7540c2db46235f32b3505db6ca7f304 (patch) | |
tree | f3cd8b40f0c672c2b2b7b7e1632cc3e9aa551b89 /apps | |
parent | e88479243cdb19d1bc194f280923395b7856380b (diff) |
Make -nameopt work in req and add support for -reqopt
Diffstat (limited to 'apps')
-rw-r--r-- | apps/apps.c | 1 | ||||
-rw-r--r-- | apps/req.c | 14 |
2 files changed, 11 insertions, 4 deletions
diff --git a/apps/apps.c b/apps/apps.c index 6f64e6313f..1a24b1c596 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -1088,6 +1088,7 @@ int set_cert_ex(unsigned long *flags, const char *arg) { "no_extensions", X509_FLAG_NO_EXTENSIONS, 0}, { "no_sigdump", X509_FLAG_NO_SIGDUMP, 0}, { "no_aux", X509_FLAG_NO_AUX, 0}, + { "no_attributes", X509_FLAG_NO_ATTRIBUTES, 0}, { "ext_default", X509V3_EXT_DEFAULT, X509V3_EXT_UNKNOWN_MASK}, { "ext_error", X509V3_EXT_ERROR_UNKNOWN, X509V3_EXT_UNKNOWN_MASK}, { "ext_parse", X509V3_EXT_PARSE_UNKNOWN, X509V3_EXT_UNKNOWN_MASK}, diff --git a/apps/req.c b/apps/req.c index 1105e59e67..c4bec05436 100644 --- a/apps/req.c +++ b/apps/req.c @@ -155,7 +155,7 @@ int MAIN(int argc, char **argv) #ifndef OPENSSL_NO_ECDSA EC_KEY *ec_params = NULL; #endif - unsigned long nmflag = 0; + unsigned long nmflag = 0, reqflag = 0; int ex=1,x509=0,days=30; X509 *x509ss=NULL; X509_REQ *req=NULL; @@ -408,6 +408,11 @@ int MAIN(int argc, char **argv) if (--argc < 1) goto bad; if (!set_name_ex(&nmflag, *(++argv))) goto bad; } + else if (strcmp(*argv,"-reqopt") == 0) + { + if (--argc < 1) goto bad; + if (!set_cert_ex(&reqflag, *(++argv))) goto bad; + } else if (strcmp(*argv,"-subject") == 0) subject=1; else if (strcmp(*argv,"-text") == 0) @@ -503,7 +508,8 @@ bad: BIO_printf(bio_err," -extensions .. specify certificate extension section (override value in config file)\n"); BIO_printf(bio_err," -reqexts .. specify request extension section (override value in config file)\n"); BIO_printf(bio_err," -utf8 input characters are UTF8 (default ASCII)\n"); - BIO_printf(bio_err," -nameopt arg - various certificate name options\n"); + BIO_printf(bio_err," -nameopt arg - various certificate name options\n"); + BIO_printf(bio_err," -reqopt arg - various request text options\n\n"); goto end; } @@ -1051,9 +1057,9 @@ loop: if (text) { if (x509) - X509_print(out,x509ss); + X509_print_ex(out, x509ss, nmflag, reqflag); else - X509_REQ_print(out,req); + X509_REQ_print_ex(out, req, nmflag, reqflag); } if(subject) |