openssl-fipsinstall.pod.in 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. =pod
  2. {- OpenSSL::safe::output_do_not_edit_headers(); -}
  3. =head1 NAME
  4. openssl-fipsinstall - perform FIPS configuration installation
  5. =head1 SYNOPSIS
  6. B<openssl fipsinstall>
  7. [B<-help>]
  8. [B<-in> I<configfilename>]
  9. [B<-out> I<configfilename>]
  10. [B<-module> I<modulefilename>]
  11. [B<-provider_name> I<providername>]
  12. [B<-section_name> I<sectionname>]
  13. [B<-verify>]
  14. [B<-mac_name> I<macname>]
  15. [B<-macopt> I<nm>:I<v>]
  16. [B<-noout>]
  17. [B<-quiet>]
  18. [B<-no_conditional_errors>]
  19. [B<-no_security_checks>]
  20. [B<-corrupt_desc> I<selftest_description>]
  21. [B<-corrupt_type> I<selftest_type>]
  22. [B<-config> I<parent_config>]
  23. =head1 DESCRIPTION
  24. This command is used to generate a FIPS module configuration file.
  25. This configuration file can be used each time a FIPS module is loaded
  26. in order to pass data to the FIPS module self tests. The FIPS module always
  27. verifies its MAC, but only needs to run the KAT's once,
  28. at installation.
  29. The generated configuration file consists of:
  30. =over 4
  31. =item - A MAC of the FIPS module file.
  32. =item - A test status indicator.
  33. This indicates if the Known Answer Self Tests (KAT's) have successfully run.
  34. =item - A MAC of the status indicator.
  35. =item - A control for conditional self tests errors.
  36. By default if a continuous test (e.g a key pair test) fails then the FIPS module
  37. will enter an error state, and no services or cryptographic algorithms will be
  38. able to be accessed after this point.
  39. The default value of '1' will cause the fips module error state to be entered.
  40. If the value is '0' then the module error state will not be entered.
  41. Regardless of whether the error state is entered or not, the current operation
  42. (e.g. key generation) will return an error. The user is responsible for retrying
  43. the operation if the module error state is not entered.
  44. =item - A control to indicate whether run-time security checks are done.
  45. This indicates if run-time checks related to enforcement of security parameters
  46. such as minimum security strength of keys and approved curve names are used.
  47. The default value of '1' will perform the checks.
  48. If the value is '0' the checks are not performed and FIPS compliance must
  49. be done by procedures documented in the relevant Security Policy.
  50. =back
  51. This file is described in L<fips_config(5)>.
  52. =head1 OPTIONS
  53. =over 4
  54. =item B<-help>
  55. Print a usage message.
  56. =item B<-module> I<filename>
  57. Filename of the FIPS module to perform an integrity check on.
  58. The path provided in the filename is used to load the module when it is
  59. activated, and this overrides the environment variable B<OPENSSL_MODULES>.
  60. =item B<-out> I<configfilename>
  61. Filename to output the configuration data to; the default is standard output.
  62. =item B<-in> I<configfilename>
  63. Input filename to load configuration data from. Used with the B<-verify> option.
  64. Standard input is used if the filename is C<->.
  65. =item B<-verify>
  66. Verify that the input configuration file contains the correct information.
  67. =item B<-provider_name> I<providername>
  68. Name of the provider inside the configuration file.
  69. The default value is C<fips>.
  70. =item B<-section_name> I<sectionname>
  71. Name of the section inside the configuration file.
  72. The default value is C<fips_sect>.
  73. =item B<-mac_name> I<name>
  74. Specifies the name of a supported MAC algorithm which will be used.
  75. The MAC mechanisms that are available will depend on the options
  76. used when building OpenSSL.
  77. To see the list of supported MAC's use the command
  78. C<openssl list -mac-algorithms>. The default is B<HMAC>.
  79. =item B<-macopt> I<nm>:I<v>
  80. Passes options to the MAC algorithm.
  81. A comprehensive list of controls can be found in the EVP_MAC implementation
  82. documentation.
  83. Common control strings used for this command are:
  84. =over 4
  85. =item B<key>:I<string>
  86. Specifies the MAC key as an alphanumeric string (use if the key contains
  87. printable characters only).
  88. The string length must conform to any restrictions of the MAC algorithm.
  89. A key must be specified for every MAC algorithm.
  90. If no key is provided, the default that was specified when OpenSSL was
  91. configured is used.
  92. =item B<hexkey>:I<string>
  93. Specifies the MAC key in hexadecimal form (two hex digits per byte).
  94. The key length must conform to any restrictions of the MAC algorithm.
  95. A key must be specified for every MAC algorithm.
  96. If no key is provided, the default that was specified when OpenSSL was
  97. configured is used.
  98. =item B<digest>:I<string>
  99. Used by HMAC as an alphanumeric string (use if the key contains printable
  100. characters only).
  101. The string length must conform to any restrictions of the MAC algorithm.
  102. To see the list of supported digests, use the command
  103. C<openssl list -digest-commands>.
  104. The default digest is SHA-256.
  105. =back
  106. =item B<-noout>
  107. Disable logging of the self tests.
  108. =item B<-no_conditional_errors>
  109. Configure the module to not enter an error state if a conditional self test
  110. fails as described above.
  111. =item B<-no_security_checks>
  112. Configure the module to not perform run-time security checks as described above.
  113. =item B<-quiet>
  114. Do not output pass/fail messages. Implies B<-noout>.
  115. =item B<-corrupt_desc> I<selftest_description>,
  116. B<-corrupt_type> I<selftest_type>
  117. The corrupt options can be used to test failure of one or more self tests by
  118. name.
  119. Either option or both may be used to select the tests to corrupt.
  120. Refer to the entries for B<st-desc> and B<st-type> in L<OSSL_PROVIDER-FIPS(7)> for
  121. values that can be used.
  122. =item B<-config> I<parent_config>
  123. Test that a FIPS provider can be loaded from the specified configuration file.
  124. A previous call to this application needs to generate the extra configuration
  125. data that is included by the base C<parent_config> configuration file.
  126. See L<config(5)> for further information on how to set up a provider section.
  127. All other options are ignored if '-config' is used.
  128. =back
  129. =head1 EXAMPLES
  130. Calculate the mac of a FIPS module F<fips.so> and run a FIPS self test
  131. for the module, and save the F<fips.cnf> configuration file:
  132. openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips
  133. Verify that the configuration file F<fips.cnf> contains the correct info:
  134. openssl fipsinstall -module ./fips.so -in fips.cnf -provider_name fips -verify
  135. Corrupt any self tests which have the description C<SHA1>:
  136. openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips \
  137. -corrupt_desc 'SHA1'
  138. Validate that the fips module can be loaded from a base configuration file:
  139. export OPENSSL_CONF_INCLUDE=<path of configuration files>
  140. export OPENSSL_MODULES=<provider-path>
  141. openssl fipsinstall -config' 'default.cnf'
  142. =head1 SEE ALSO
  143. L<config(5)>,
  144. L<fips_config(5)>,
  145. L<OSSL_PROVIDER-FIPS(7)>,
  146. L<EVP_MAC(3)>
  147. =head1 COPYRIGHT
  148. Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
  149. Licensed under the Apache License 2.0 (the "License"). You may not use
  150. this file except in compliance with the License. You can obtain a copy
  151. in the file LICENSE in the source distribution or at
  152. L<https://www.openssl.org/source/license.html>.
  153. =cut