EVP_PKEY_settable_params.3ossl 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. .\" -*- mode: troff; coding: utf-8 -*-
  2. .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
  3. .\"
  4. .\" Standard preamble:
  5. .\" ========================================================================
  6. .de Sp \" Vertical space (when we can't use .PP)
  7. .if t .sp .5v
  8. .if n .sp
  9. ..
  10. .de Vb \" Begin verbatim text
  11. .ft CW
  12. .nf
  13. .ne \\$1
  14. ..
  15. .de Ve \" End verbatim text
  16. .ft R
  17. .fi
  18. ..
  19. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
  20. .ie n \{\
  21. . ds C` ""
  22. . ds C' ""
  23. 'br\}
  24. .el\{\
  25. . ds C`
  26. . ds C'
  27. 'br\}
  28. .\"
  29. .\" Escape single quotes in literal strings from groff's Unicode transform.
  30. .ie \n(.g .ds Aq \(aq
  31. .el .ds Aq '
  32. .\"
  33. .\" If the F register is >0, we'll generate index entries on stderr for
  34. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  35. .\" entries marked with X<> in POD. Of course, you'll have to process the
  36. .\" output yourself in some meaningful fashion.
  37. .\"
  38. .\" Avoid warning from groff about undefined register 'F'.
  39. .de IX
  40. ..
  41. .nr rF 0
  42. .if \n(.g .if rF .nr rF 1
  43. .if (\n(rF:(\n(.g==0)) \{\
  44. . if \nF \{\
  45. . de IX
  46. . tm Index:\\$1\t\\n%\t"\\$2"
  47. ..
  48. . if !\nF==2 \{\
  49. . nr % 0
  50. . nr F 2
  51. . \}
  52. . \}
  53. .\}
  54. .rr rF
  55. .\" ========================================================================
  56. .\"
  57. .IX Title "EVP_PKEY_SETTABLE_PARAMS 3ossl"
  58. .TH EVP_PKEY_SETTABLE_PARAMS 3ossl 2025-01-17 3.4.0 OpenSSL
  59. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  60. .\" way too many mistakes in technical documents.
  61. .if n .ad l
  62. .nh
  63. .SH NAME
  64. EVP_PKEY_settable_params, EVP_PKEY_set_params,
  65. EVP_PKEY_set_int_param, EVP_PKEY_set_size_t_param, EVP_PKEY_set_bn_param,
  66. EVP_PKEY_set_utf8_string_param, EVP_PKEY_set_octet_string_param
  67. \&\- set key parameters into a key
  68. .SH SYNOPSIS
  69. .IX Header "SYNOPSIS"
  70. .Vb 1
  71. \& #include <openssl/evp.h>
  72. \&
  73. \& const OSSL_PARAM *EVP_PKEY_settable_params(const EVP_PKEY *pkey);
  74. \& int EVP_PKEY_set_params(EVP_PKEY *pkey, OSSL_PARAM params[]);
  75. \& int EVP_PKEY_set_int_param(EVP_PKEY *pkey, const char *key_name, int in);
  76. \& int EVP_PKEY_set_size_t_param(EVP_PKEY *pkey, const char *key_name, size_t in);
  77. \& int EVP_PKEY_set_bn_param(EVP_PKEY *pkey, const char *key_name,
  78. \& const BIGNUM *bn);
  79. \& int EVP_PKEY_set_utf8_string_param(EVP_PKEY *pkey, const char *key_name,
  80. \& const char *str);
  81. \& int EVP_PKEY_set_octet_string_param(EVP_PKEY *pkey, const char *key_name,
  82. \& const unsigned char *buf, size_t bsize);
  83. .Ve
  84. .SH DESCRIPTION
  85. .IX Header "DESCRIPTION"
  86. These functions can be used to set additional parameters into an existing
  87. \&\fBEVP_PKEY\fR.
  88. .PP
  89. \&\fBEVP_PKEY_set_params()\fR sets one or more \fIparams\fR into a \fIpkey\fR.
  90. See \fBOSSL_PARAM\fR\|(3) for information about parameters.
  91. .PP
  92. \&\fBEVP_PKEY_settable_params()\fR returns a constant list of \fIparams\fR indicating
  93. the names and types of key parameters that can be set.
  94. See \fBOSSL_PARAM\fR\|(3) for information about parameters.
  95. .PP
  96. \&\fBEVP_PKEY_set_int_param()\fR sets an integer value \fIin\fR into a key \fIpkey\fR for the
  97. associated field \fIkey_name\fR.
  98. .PP
  99. \&\fBEVP_PKEY_set_size_t_param()\fR sets an size_t value \fIin\fR into a key \fIpkey\fR for
  100. the associated field \fIkey_name\fR.
  101. .PP
  102. \&\fBEVP_PKEY_set_bn_param()\fR sets the BIGNUM value \fIbn\fR into a key \fIpkey\fR for the
  103. associated field \fIkey_name\fR.
  104. .PP
  105. \&\fBEVP_PKEY_set_utf8_string_param()\fR sets the UTF8 string \fIstr\fR into a key \fIpkey\fR
  106. for the associated field \fIkey_name\fR.
  107. .PP
  108. \&\fBEVP_PKEY_set_octet_string_param()\fR sets the octet string value \fIbuf\fR with a
  109. size \fIbsize\fR into a key \fIpkey\fR for the associated field \fIkey_name\fR.
  110. .SH NOTES
  111. .IX Header "NOTES"
  112. These functions only work for \fBEVP_PKEY\fRs that contain a provider side key.
  113. .SH "RETURN VALUES"
  114. .IX Header "RETURN VALUES"
  115. \&\fBEVP_PKEY_settable_params()\fR returns NULL on error or if it is not supported,
  116. .PP
  117. All other methods return 1 if a value was successfully set, or 0 if
  118. there was an error.
  119. .SH "SEE ALSO"
  120. .IX Header "SEE ALSO"
  121. \&\fBEVP_PKEY_gettable_params\fR\|(3),
  122. \&\fBEVP_PKEY_CTX_new\fR\|(3), \fBprovider\-keymgmt\fR\|(7), \fBOSSL_PARAM\fR\|(3),
  123. .SH HISTORY
  124. .IX Header "HISTORY"
  125. These functions were added in OpenSSL 3.0.
  126. .SH COPYRIGHT
  127. .IX Header "COPYRIGHT"
  128. Copyright 2020\-2021 The OpenSSL Project Authors. All Rights Reserved.
  129. .PP
  130. Licensed under the Apache License 2.0 (the "License"). You may not use
  131. this file except in compliance with the License. You can obtain a copy
  132. in the file LICENSE in the source distribution or at
  133. <https://www.openssl.org/source/license.html>.