EVP_set_default_properties.pod 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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(OSSL_LIB_CTX *libctx, const char *propq);
  9. int EVP_default_properties_enable_fips(OSSL_LIB_CTX *libctx, int enable);
  10. int EVP_default_properties_is_fips_enabled(OSSL_LIB_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. See
  14. L<crypto(7)/ALGORITHM FETCHING> for information about implicit and explicit
  15. fetching.
  16. EVP_set_default_properties stores the properties given with the string
  17. I<propq> among the EVP data that's been stored in the library context
  18. given with I<libctx> (NULL signifies the default library context).
  19. Any previous default property for the specified library context will
  20. be dropped.
  21. EVP_default_properties_enable_fips() sets the 'fips=yes' to be a default property
  22. if I<enable> is non zero, otherwise it clears 'fips' from the default property
  23. query for the given I<libctx>. It merges the fips default property query with any
  24. existing query strings that have been set via EVP_set_default_properties().
  25. EVP_default_properties_is_fips_enabled() indicates if 'fips=yes' is a default
  26. property for the given I<libctx>.
  27. =head1 NOTES
  28. EVP_set_default_properties() and EVP_default_properties_enable_fips() are not
  29. thread safe. They are intended to be called only during the initialisation
  30. phase of a I<libctx>.
  31. =head1 RETURN VALUES
  32. EVP_set_default_properties() and EVP_default_properties_enable_fips() return 1
  33. on success, or 0 on failure. An error is placed on the error stack if a
  34. failure occurs.
  35. EVP_default_properties_is_fips_enabled() returns 1 if the 'fips=yes' default
  36. property is set for the given I<libctx>, otherwise it returns 0.
  37. =head1 SEE ALSO
  38. L<EVP_MD_fetch(3)>
  39. =head1 HISTORY
  40. The functions described here were added in OpenSSL 3.0.
  41. =head1 COPYRIGHT
  42. Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
  43. Licensed under the Apache License 2.0 (the "License"). You may not use
  44. this file except in compliance with the License. You can obtain a copy
  45. in the file LICENSE in the source distribution or at
  46. L<https://www.openssl.org/source/license.html>.
  47. =cut