EVP_set_default_properties.3ossl 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. .\" -*- mode: troff; coding: utf-8 -*-
  2. .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
  3. .\"
  4. .\" Standard preamble:
  5. .\" ========================================================================
  6. .de Sp \" Vertical space (when we can't use .PP)
  7. .if t .sp .5v
  8. .if n .sp
  9. ..
  10. .de Vb \" Begin verbatim text
  11. .ft CW
  12. .nf
  13. .ne \\$1
  14. ..
  15. .de Ve \" End verbatim text
  16. .ft R
  17. .fi
  18. ..
  19. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
  20. .ie n \{\
  21. . ds C` ""
  22. . ds C' ""
  23. 'br\}
  24. .el\{\
  25. . ds C`
  26. . ds C'
  27. 'br\}
  28. .\"
  29. .\" Escape single quotes in literal strings from groff's Unicode transform.
  30. .ie \n(.g .ds Aq \(aq
  31. .el .ds Aq '
  32. .\"
  33. .\" If the F register is >0, we'll generate index entries on stderr for
  34. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  35. .\" entries marked with X<> in POD. Of course, you'll have to process the
  36. .\" output yourself in some meaningful fashion.
  37. .\"
  38. .\" Avoid warning from groff about undefined register 'F'.
  39. .de IX
  40. ..
  41. .nr rF 0
  42. .if \n(.g .if rF .nr rF 1
  43. .if (\n(rF:(\n(.g==0)) \{\
  44. . if \nF \{\
  45. . de IX
  46. . tm Index:\\$1\t\\n%\t"\\$2"
  47. ..
  48. . if !\nF==2 \{\
  49. . nr % 0
  50. . nr F 2
  51. . \}
  52. . \}
  53. .\}
  54. .rr rF
  55. .\" ========================================================================
  56. .\"
  57. .IX Title "EVP_SET_DEFAULT_PROPERTIES 3ossl"
  58. .TH EVP_SET_DEFAULT_PROPERTIES 3ossl 2025-01-17 3.4.0 OpenSSL
  59. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  60. .\" way too many mistakes in technical documents.
  61. .if n .ad l
  62. .nh
  63. .SH NAME
  64. EVP_set_default_properties, EVP_default_properties_enable_fips,
  65. EVP_default_properties_is_fips_enabled
  66. \&\- Set default properties for future algorithm fetches
  67. .SH SYNOPSIS
  68. .IX Header "SYNOPSIS"
  69. .Vb 1
  70. \& #include <openssl/evp.h>
  71. \&
  72. \& int EVP_set_default_properties(OSSL_LIB_CTX *libctx, const char *propq);
  73. \& int EVP_default_properties_enable_fips(OSSL_LIB_CTX *libctx, int enable);
  74. \& int EVP_default_properties_is_fips_enabled(OSSL_LIB_CTX *libctx);
  75. .Ve
  76. .SH DESCRIPTION
  77. .IX Header "DESCRIPTION"
  78. \&\fBEVP_set_default_properties()\fR sets the default properties for all
  79. future EVP algorithm fetches, implicit as well as explicit. See
  80. "ALGORITHM FETCHING" in \fBcrypto\fR\|(7) for information about implicit and explicit
  81. fetching.
  82. .PP
  83. EVP_set_default_properties stores the properties given with the string
  84. \&\fIpropq\fR among the EVP data that's been stored in the library context
  85. given with \fIlibctx\fR (NULL signifies the default library context).
  86. .PP
  87. Any previous default property for the specified library context will
  88. be dropped.
  89. .PP
  90. \&\fBEVP_default_properties_enable_fips()\fR sets the 'fips=yes' to be a default property
  91. if \fIenable\fR is non zero, otherwise it clears 'fips' from the default property
  92. query for the given \fIlibctx\fR. It merges the fips default property query with any
  93. existing query strings that have been set via \fBEVP_set_default_properties()\fR.
  94. .PP
  95. \&\fBEVP_default_properties_is_fips_enabled()\fR indicates if 'fips=yes' is a default
  96. property for the given \fIlibctx\fR.
  97. .SH NOTES
  98. .IX Header "NOTES"
  99. \&\fBEVP_set_default_properties()\fR and \fBEVP_default_properties_enable_fips()\fR are not
  100. thread safe. They are intended to be called only during the initialisation
  101. phase of a \fIlibctx\fR.
  102. .SH "RETURN VALUES"
  103. .IX Header "RETURN VALUES"
  104. \&\fBEVP_set_default_properties()\fR and \fBEVP_default_properties_enable_fips()\fR return 1
  105. on success, or 0 on failure. An error is placed on the error stack if a
  106. failure occurs.
  107. .PP
  108. \&\fBEVP_default_properties_is_fips_enabled()\fR returns 1 if the 'fips=yes' default
  109. property is set for the given \fIlibctx\fR, otherwise it returns 0.
  110. .SH "SEE ALSO"
  111. .IX Header "SEE ALSO"
  112. \&\fBEVP_MD_fetch\fR\|(3)
  113. .SH HISTORY
  114. .IX Header "HISTORY"
  115. The functions described here were added in OpenSSL 3.0.
  116. .SH COPYRIGHT
  117. .IX Header "COPYRIGHT"
  118. Copyright 2019\-2021 The OpenSSL Project Authors. All Rights Reserved.
  119. .PP
  120. Licensed under the Apache License 2.0 (the "License"). You may not use
  121. this file except in compliance with the License. You can obtain a copy
  122. in the file LICENSE in the source distribution or at
  123. <https://www.openssl.org/source/license.html>.