]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
apps x509: passing PKCS#11 URL as -signkey
authorBastian Germann <bage@linutronix.de>
Thu, 13 Feb 2020 10:58:27 +0000 (11:58 +0100)
committerDmitry Belyavskiy <beldmit@gmail.com>
Fri, 14 Feb 2020 14:58:23 +0000 (17:58 +0300)
OpenSSL 1.1.0 has extended option checking, and rejects passing a PKCS#11
engine URL to "-signkey" option. The actual code is ready to take it.

Change the option parsing to allow an engine URL to be passed and modify
the manpage accordingly.

CLA: trivial

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/11086)

apps/x509.c
doc/man1/openssl-x509.pod.in

index c00753797e9dd3c580f10c14fe4dc743bdf2c751..7403669863d84b49b58d6c81156a395f1d4d64f4 100644 (file)
@@ -128,7 +128,7 @@ const OPTIONS x509_options[] = {
     {"setalias", OPT_SETALIAS, 's', "Set certificate alias"},
     {"days", OPT_DAYS, 'n',
      "How long till expiry of a signed certificate - def 30 days"},
-    {"signkey", OPT_SIGNKEY, '<', "Self sign cert with arg"},
+    {"signkey", OPT_SIGNKEY, 's', "Self sign cert with arg"},
     {"set_serial", OPT_SET_SERIAL, 's', "Serial number to use"},
     {"extensions", OPT_EXTENSIONS, 's', "Section from config file to use"},
     {"certopt", OPT_CERTOPT, 's', "Various certificate text options"},
index 3da2b0d122381b0e6cb00962908d083172931fd2..50496984f8c57eff75844bbc203e4e68f1f00ebc 100644 (file)
@@ -45,7 +45,7 @@ B<openssl> B<x509>
 [B<-setalias> I<arg>]
 [B<-days> I<arg>]
 [B<-set_serial> I<n>]
-[B<-signkey> I<filename>]
+[B<-signkey> I<arg>]
 [B<-badsig>]
 [B<-passin> I<arg>]
 [B<-x509toreq>]
@@ -348,10 +348,11 @@ can thus behave like a "mini CA".
 
 =over 4
 
-=item B<-signkey> I<filename>
+=item B<-signkey> I<arg>
 
 This option causes the input file to be self signed using the supplied
-private key.
+private key or engine. The private key's format is specified with the
+B<-keyform> option.
 
 It sets the issuer name to the subject name (i.e., makes it self-issued)
 and changes the public key to the supplied value (unless overridden by