2
0

EVP_PKEY_CTX_set_params.pod 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. =pod
  2. =head1 NAME
  3. EVP_PKEY_CTX_set_params,
  4. EVP_PKEY_CTX_settable_params,
  5. EVP_PKEY_CTX_get_params,
  6. EVP_PKEY_CTX_gettable_params
  7. - provider parameter passing operations
  8. =head1 SYNOPSIS
  9. #include <openssl/evp.h>
  10. int EVP_PKEY_CTX_set_params(EVP_PKEY_CTX *ctx, const OSSL_PARAM *params);
  11. const OSSL_PARAM *EVP_PKEY_CTX_settable_params(const EVP_PKEY_CTX *ctx);
  12. int EVP_PKEY_CTX_get_params(EVP_PKEY_CTX *ctx, OSSL_PARAM *params);
  13. const OSSL_PARAM *EVP_PKEY_CTX_gettable_params(const EVP_PKEY_CTX *ctx);
  14. =head1 DESCRIPTION
  15. The EVP_PKEY_CTX_get_params() and EVP_PKEY_CTX_set_params() functions allow
  16. transfer of arbitrary key parameters to and from providers.
  17. Not all parameters may be supported by all providers.
  18. See L<OSSL_PROVIDER(3)> for more information on providers.
  19. The I<params> field is a pointer to a list of B<OSSL_PARAM> structures,
  20. terminated with a L<OSSL_PARAM_END(3)> struct.
  21. See L<OSSL_PARAM(3)> for information about passing parameters.
  22. These functions must only be called after the EVP_PKEY_CTX has been initialised
  23. for use in an operation.
  24. These methods replace the EVP_PKEY_CTX_ctrl() mechanism. (EVP_PKEY_CTX_ctrl now
  25. calls these methods internally to interact with providers).
  26. EVP_PKEY_CTX_gettable_params() and EVP_PKEY_CTX_settable_params() get a
  27. constant L<OSSL_PARAM(3)> array that describes the gettable and
  28. settable parameters for the current algorithm implementation, i.e. parameters
  29. that can be used with EVP_PKEY_CTX_get_params() and EVP_PKEY_CTX_set_params()
  30. respectively.
  31. These functions must only be called after the EVP_PKEY_CTX has been initialised
  32. for use in an operation.
  33. =head2 Parameters
  34. Examples of EVP_PKEY parameters include the following:
  35. L<provider-keymgmt(7)/Common parameters>
  36. L<provider-keyexch(7)/Key Exchange parameters>
  37. L<provider-signature(7)/Signature parameters>
  38. L<EVP_PKEY-RSA(7)/Common RSA parameters>
  39. L<EVP_PKEY-RSA(7)/RSA key generation parameters>
  40. L<EVP_PKEY-FFC(7)/FFC parameters>
  41. L<EVP_PKEY-FFC(7)/FFC key generation parameters>
  42. L<EVP_PKEY-DSA(7)/DSA parameters>
  43. L<EVP_PKEY-DSA(7)/DSA key generation parameters>
  44. L<EVP_PKEY-DH(7)/DH parameters>
  45. L<EVP_PKEY-DH(7)/DH key generation parameters>
  46. L<EVP_PKEY-EC(7)/Common EC parameters>
  47. L<EVP_PKEY-X25519(7)/Common X25519, X448, ED25519 and ED448 parameters>
  48. =head1 RETURN VALUES
  49. EVP_PKEY_CTX_set_params() returns 1 for success or 0 otherwise.
  50. EVP_PKEY_CTX_settable_params() returns an OSSL_PARAM array on success or NULL on
  51. error.
  52. It may also return NULL if there are no settable parameters available.
  53. All other functions and macros described on this page return a positive value
  54. for success and 0 or a negative value for failure. In particular a return value
  55. of -2 indicates the operation is not supported by the public key algorithm.
  56. =head1 SEE ALSO
  57. L<EVP_PKEY_CTX_new(3)>,
  58. L<EVP_PKEY_encrypt(3)>,
  59. L<EVP_PKEY_decrypt(3)>,
  60. L<EVP_PKEY_sign(3)>,
  61. L<EVP_PKEY_verify(3)>,
  62. L<EVP_PKEY_verify_recover(3)>,
  63. L<EVP_PKEY_derive(3)>,
  64. L<EVP_PKEY_keygen(3)>
  65. =head1 HISTORY
  66. All functions were added in OpenSSL 3.0.
  67. =head1 COPYRIGHT
  68. Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
  69. Licensed under the Apache License 2.0 (the "License"). You may not use
  70. this file except in compliance with the License. You can obtain a copy
  71. in the file LICENSE in the source distribution or at
  72. L<https://www.openssl.org/source/license.html>.
  73. =cut