EVP_PKEY_CTX_set_params.pod 3.2 KB

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