openssl-fipsinstall.pod 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. =pod
  2. =head1 NAME
  3. openssl-fipsinstall - perform FIPS configuration installation
  4. =head1 SYNOPSIS
  5. B<openssl fipsinstall>
  6. [B<-help>]
  7. [B<-in> I<configfilename>]
  8. [B<-out> I<configfilename>]
  9. [B<-module> I<modulefilename>]
  10. [B<-provider_name> I<providername>]
  11. [B<-section_name> I<sectionname>]
  12. [B<-verify>]
  13. [B<-mac_name> I<macname>]
  14. [B<-macopt> I<nm>:I<v>]
  15. [B<-noout>]
  16. [B<-corrupt_desc> I<selftest_description>]
  17. [B<-corrupt_type> I<selftest_type>]
  18. =head1 DESCRIPTION
  19. This command is used to generate a FIPS module configuration file.
  20. The generated configuration file consists of:
  21. =over 4
  22. =item - A mac of the FIPS module file.
  23. =item - A status indicator that indicates if the known answer Self Tests (KAT's)
  24. have successfully run.
  25. =back
  26. This configuration file can be used each time a FIPS module is loaded
  27. in order to pass data to the FIPS modules self tests. The FIPS module always
  28. verifies the modules MAC, but only needs to run the KATS once during install.
  29. =head1 OPTIONS
  30. =over 4
  31. =item B<-help>
  32. Print a usage message.
  33. =item B<-module> I<filename>
  34. Filename of a fips module to perform an integrity check on.
  35. =item B<-out> I<configfilename>
  36. Filename to output the configuration data to, or standard output by default.
  37. =item B<-in> I<configfilename>
  38. Input filename to load configuration data from. Used with the '-verify' option.
  39. Standard input is used if the filename is '-'.
  40. =item B<-verify>
  41. Verify that the input configuration file contains the correct information
  42. =item B<-provider_name> I<providername>
  43. Name of the provider inside the configuration file.
  44. =item B<-section_name> I<sectionname>
  45. Name of the section inside the configuration file.
  46. =item B<-mac_name> I<name>
  47. Specifies the name of a supported MAC algorithm which will be used.
  48. To see the list of supported MAC's use the command
  49. C<openssl list -mac-algorithms>. The default is B<HMAC>.
  50. =item B<-macopt> I<nm>:I<v>
  51. Passes options to the MAC algorithm.
  52. A comprehensive list of controls can be found in the EVP_MAC implementation
  53. documentation.
  54. Common control strings used for fipsinstall are:
  55. =over 4
  56. =item B<key>:I<string>
  57. Specifies the MAC key as an alphanumeric string (use if the key contains
  58. printable characters only).
  59. The string length must conform to any restrictions of the MAC algorithm.
  60. A key must be specified for every MAC algorithm.
  61. =item B<hexkey>:I<string>
  62. Specifies the MAC key in hexadecimal form (two hex digits per byte).
  63. The key length must conform to any restrictions of the MAC algorithm.
  64. A key must be specified for every MAC algorithm.
  65. =item B<digest>:I<string>
  66. Used by HMAC as an alphanumeric string (use if the key contains printable
  67. characters only).
  68. The string length must conform to any restrictions of the MAC algorithm.
  69. To see the list of supported digests, use the command
  70. C<openssl list -digest-commands>.
  71. =back
  72. =item B<-noout>
  73. Disable logging of the self tests.
  74. =item B<-corrupt_desc> I<selftest_description>
  75. =item B<-corrupt_type> I<selftest_type>
  76. The corrupt options can be used to test failure of one or more self test(s) by
  77. name.
  78. Either option or both may be used to select the self test(s) to corrupt.
  79. Refer to the entries for "st-desc" and "st-type" in L<OSSL_PROVIDER-FIPS(7)> for
  80. values that can be used.
  81. =back
  82. =head1 EXAMPLES
  83. Calculate the mac of a FIPS module F<fips.so> and run a FIPS self test
  84. for the module, and save the F<fips.conf> configuration file:
  85. openssl fipsinstall -module ./fips.so -out fips.conf -provider_name fips \
  86. -section_name fipsinstall -mac_name HMAC -macopt digest:SHA256 \
  87. -macopt hexkey:000102030405060708090A0B0C0D0E0F10111213
  88. Verify that the configuration file F<fips.conf> contains the correct info:
  89. openssl fipsinstall -module ./fips.so -in fips.conf -provider_name fips \
  90. -section_name fips_install -mac_name HMAC -macopt digest:SHA256 \
  91. -macopt hexkey:000102030405060708090A0B0C0D0E0F10111213 -verify
  92. Corrupt any self tests which have the description 'SHA1':
  93. openssl fipsinstall -module ./fips.so -out fips.conf -provider_name fips \
  94. -section_name fipsinstall -mac_name HMAC -macopt digest:SHA256 \
  95. -macopt hexkey:000102030405060708090A0B0C0D0E0F10111213 \
  96. -corrupt_desc', 'SHA1'
  97. =head1 NOTES
  98. The MAC mechanisms that are available will depend on the options
  99. used when building OpenSSL.
  100. The command C<openssl list -mac-algorithms> command can be used to list them.
  101. =head1 SEE ALSO
  102. L<fips_config(5)>,
  103. L<OSSL_PROVIDER-FIPS(7)>,
  104. L<EVP_MAC(3)>
  105. =head1 COPYRIGHT
  106. Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
  107. Licensed under the OpenSSL license (the "License"). You may not use
  108. this file except in compliance with the License. You can obtain a copy
  109. in the file LICENSE in the source distribution or at
  110. L<https://www.openssl.org/source/license.html>.
  111. =cut