spkac.pod 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. =pod
  2. =head1 NAME
  3. openssl-spkac,
  4. spkac - SPKAC printing and generating utility
  5. =head1 SYNOPSIS
  6. B<openssl> B<spkac>
  7. [B<-help>]
  8. [B<-in filename>]
  9. [B<-out filename>]
  10. [B<-key keyfile>]
  11. [B<-keyform PEM|DER|ENGINE>]
  12. [B<-passin arg>]
  13. [B<-challenge string>]
  14. [B<-pubkey>]
  15. [B<-spkac spkacname>]
  16. [B<-spksect section>]
  17. [B<-noout>]
  18. [B<-verify>]
  19. [B<-engine id>]
  20. =head1 DESCRIPTION
  21. The B<spkac> command processes Netscape signed public key and challenge
  22. (SPKAC) files. It can print out their contents, verify the signature and
  23. produce its own SPKACs from a supplied private key.
  24. =head1 OPTIONS
  25. =over 4
  26. =item B<-help>
  27. Print out a usage message.
  28. =item B<-in filename>
  29. This specifies the input filename to read from or standard input if this
  30. option is not specified. Ignored if the B<-key> option is used.
  31. =item B<-out filename>
  32. Specifies the output filename to write to or standard output by
  33. default.
  34. =item B<-key keyfile>
  35. Create an SPKAC file using the private key in B<keyfile>. The
  36. B<-in>, B<-noout>, B<-spksect> and B<-verify> options are ignored if
  37. present.
  38. =item B<-keyform PEM|DER|ENGINE>
  39. Whether the key format is PEM, DER, or an engine-backed key.
  40. The default is PEM.
  41. =item B<-passin password>
  42. The input file password source. For more information about the format of B<arg>
  43. see L<openssl(1)/Pass Phrase Options>.
  44. =item B<-challenge string>
  45. Specifies the challenge string if an SPKAC is being created.
  46. =item B<-spkac spkacname>
  47. Allows an alternative name form the variable containing the
  48. SPKAC. The default is "SPKAC". This option affects both
  49. generated and input SPKAC files.
  50. =item B<-spksect section>
  51. Allows an alternative name form the section containing the
  52. SPKAC. The default is the default section.
  53. =item B<-noout>
  54. Don't output the text version of the SPKAC (not used if an
  55. SPKAC is being created).
  56. =item B<-pubkey>
  57. Output the public key of an SPKAC (not used if an SPKAC is
  58. being created).
  59. =item B<-verify>
  60. Verifies the digital signature on the supplied SPKAC.
  61. =item B<-engine id>
  62. Specifying an engine (by its unique B<id> string) will cause B<spkac>
  63. to attempt to obtain a functional reference to the specified engine,
  64. thus initialising it if needed. The engine will then be set as the default
  65. for all available algorithms.
  66. =back
  67. =head1 EXAMPLES
  68. Print out the contents of an SPKAC:
  69. openssl spkac -in spkac.cnf
  70. Verify the signature of an SPKAC:
  71. openssl spkac -in spkac.cnf -noout -verify
  72. Create an SPKAC using the challenge string "hello":
  73. openssl spkac -key key.pem -challenge hello -out spkac.cnf
  74. Example of an SPKAC, (long lines split up for clarity):
  75. SPKAC=MIG5MGUwXDANBgkqhkiG9w0BAQEFAANLADBIAkEA\
  76. 1cCoq2Wa3Ixs47uI7FPVwHVIPDx5yso105Y6zpozam135a\
  77. 8R0CpoRvkkigIyXfcCjiVi5oWk+6FfPaD03uPFoQIDAQAB\
  78. FgVoZWxsbzANBgkqhkiG9w0BAQQFAANBAFpQtY/FojdwkJ\
  79. h1bEIYuc2EeM2KHTWPEepWYeawvHD0gQ3DngSC75YCWnnD\
  80. dq+NQ3F+X4deMx9AaEglZtULwV4=
  81. =head1 NOTES
  82. A created SPKAC with suitable DN components appended can be fed into
  83. the B<ca> utility.
  84. SPKACs are typically generated by Netscape when a form is submitted
  85. containing the B<KEYGEN> tag as part of the certificate enrollment
  86. process.
  87. The challenge string permits a primitive form of proof of possession
  88. of private key. By checking the SPKAC signature and a random challenge
  89. string some guarantee is given that the user knows the private key
  90. corresponding to the public key being certified. This is important in
  91. some applications. Without this it is possible for a previous SPKAC
  92. to be used in a "replay attack".
  93. =head1 SEE ALSO
  94. L<ca(1)>
  95. =head1 COPYRIGHT
  96. Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
  97. Licensed under the OpenSSL license (the "License"). You may not use
  98. this file except in compliance with the License. You can obtain a copy
  99. in the file LICENSE in the source distribution or at
  100. L<https://www.openssl.org/source/license.html>.
  101. =cut