EVP_PKEY_settable_params.pod 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. =pod
  2. =head1 NAME
  3. EVP_PKEY_settable_params, EVP_PKEY_set_params,
  4. EVP_PKEY_set_int_param, EVP_PKEY_set_size_t_param, EVP_PKEY_set_bn_param,
  5. EVP_PKEY_set_utf8_string_param, EVP_PKEY_set_octet_string_param
  6. - set key parameters into a key
  7. =head1 SYNOPSIS
  8. #include <openssl/evp.h>
  9. const OSSL_PARAM *EVP_PKEY_settable_params(const EVP_PKEY *pkey);
  10. int EVP_PKEY_set_params(EVP_PKEY *pkey, OSSL_PARAM params[]);
  11. int EVP_PKEY_set_int_param(EVP_PKEY *pkey, const char *key_name, int in);
  12. int EVP_PKEY_set_size_t_param(EVP_PKEY *pkey, const char *key_name, size_t in);
  13. int EVP_PKEY_set_bn_param(EVP_PKEY *pkey, const char *key_name,
  14. const BIGNUM *bn);
  15. int EVP_PKEY_set_utf8_string_param(EVP_PKEY *pkey, const char *key_name,
  16. const char *str);
  17. int EVP_PKEY_set_octet_string_param(EVP_PKEY *pkey, const char *key_name,
  18. const unsigned char *buf, size_t bsize);
  19. =head1 DESCRIPTION
  20. These functions can be used to set additional parameters into an existing
  21. B<EVP_PKEY>.
  22. EVP_PKEY_set_params() sets one or more I<params> into a I<pkey>.
  23. See L<OSSL_PARAM(3)> for information about parameters.
  24. EVP_PKEY_settable_params() returns a constant list of I<params> indicating
  25. the names and types of key parameters that can be set.
  26. See L<OSSL_PARAM(3)> for information about parameters.
  27. EVP_PKEY_set_int_param() sets an integer value I<in> into a key I<pkey> for the
  28. associated field I<key_name>.
  29. EVP_PKEY_set_size_t_param() sets an size_t value I<in> into a key I<pkey> for
  30. the associated field I<key_name>.
  31. EVP_PKEY_set_bn_param() sets the BIGNUM value I<bn> into a key I<pkey> for the
  32. associated field I<key_name>.
  33. EVP_PKEY_set_utf8_string_param() sets the UTF8 string I<str> into a key I<pkey>
  34. for the associated field I<key_name>.
  35. EVP_PKEY_set_octet_string_param() sets the octet string value I<buf> with a
  36. size I<bsize> into a key I<pkey> for the associated field I<key_name>.
  37. =head1 NOTES
  38. These functions only work for B<EVP_PKEY>s that contain a provider side key.
  39. =head1 RETURN VALUES
  40. EVP_PKEY_settable_params() returns NULL on error or if it is not supported,
  41. All other methods return 1 if a value was successfully set, or 0 if
  42. there was an error.
  43. =head1 SEE ALSO
  44. L<EVP_PKEY_gettable_params(3)>,
  45. L<EVP_PKEY_CTX_new(3)>, L<provider-keymgmt(7)>, L<OSSL_PARAM(3)>,
  46. =head1 HISTORY
  47. These functions were added in OpenSSL 3.0.
  48. =head1 COPYRIGHT
  49. Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
  50. Licensed under the Apache License 2.0 (the "License"). You may not use
  51. this file except in compliance with the License. You can obtain a copy
  52. in the file LICENSE in the source distribution or at
  53. L<https://www.openssl.org/source/license.html>.
  54. =cut