EVP_set_default_properties.pod 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. =pod
  2. =head1 NAME
  3. EVP_set_default_properties, EVP_default_properties_enable_fips,
  4. EVP_default_properties_is_fips_enabled
  5. - Set default properties for future algorithm fetches
  6. =head1 SYNOPSIS
  7. #include <openssl/evp.h>
  8. int EVP_set_default_properties(OPENSSL_CTX *libctx, const char *propq);
  9. int EVP_default_properties_enable_fips(OPENSSL_CTX *libctx, int enable);
  10. int EVP_default_properties_is_fips_enabled(OPENSSL_CTX *libctx);
  11. =head1 DESCRIPTION
  12. EVP_set_default_properties() sets the default properties for all
  13. future EVP algorithm fetches, implicit as well as explicit.
  14. =for comment TODO(3.0) We should consider having an EVP document in
  15. section 7 that details everything about implicit vs explicit fetches
  16. and how they relate to properties.
  17. EVP_set_default_properties stores the properties given with the string
  18. I<propq> among the EVP data that's been stored in the library context
  19. given with I<libctx> (NULL signifies the default library context).
  20. Any previous default property for the specified library context will
  21. be dropped.
  22. EVP_default_properties_enable_fips() sets the 'fips=yes' to be a default property
  23. if I<enable> is non zero, otherwise it clears 'fips' from the default property
  24. query for the given I<libctx>. It merges the fips default property query with any
  25. existing query strings that have been set via EVP_set_default_properties().
  26. EVP_default_properties_is_fips_enabled() indicates if 'fips=yes' is a default
  27. property for the given I<libctx>.
  28. =head1 RETURN VALUES
  29. EVP_set_default_properties() and EVP_default_properties_enable_fips() return 1
  30. on success, or 0 on failure. An error is placed on the error stack if a
  31. failure occurs.
  32. EVP_default_properties_is_fips_enabled() returns 1 if the 'fips=yes' default
  33. property is set for the given I<libctx>, otherwise it returns 0.
  34. =head1 SEE ALSO
  35. L<EVP_MD_fetch(3)>
  36. =head1 HISTORY
  37. The functions described here were added in OpenSSL 3.0.
  38. =head1 COPYRIGHT
  39. Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
  40. Licensed under the Apache License 2.0 (the "License"). You may not use
  41. this file except in compliance with the License. You can obtain a copy
  42. in the file LICENSE in the source distribution or at
  43. L<https://www.openssl.org/source/license.html>.
  44. =cut