provider-encoder.7ossl 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. .\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
  2. .\"
  3. .\" Standard preamble:
  4. .\" ========================================================================
  5. .de Sp \" Vertical space (when we can't use .PP)
  6. .if t .sp .5v
  7. .if n .sp
  8. ..
  9. .de Vb \" Begin verbatim text
  10. .ft CW
  11. .nf
  12. .ne \\$1
  13. ..
  14. .de Ve \" End verbatim text
  15. .ft R
  16. .fi
  17. ..
  18. .\" Set up some character translations and predefined strings. \*(-- will
  19. .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
  20. .\" double quote, and \*(R" will give a right double quote. \*(C+ will
  21. .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
  22. .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
  23. .\" nothing in troff, for use with C<>.
  24. .tr \(*W-
  25. .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
  26. .ie n \{\
  27. . ds -- \(*W-
  28. . ds PI pi
  29. . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  30. . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  31. . ds L" ""
  32. . ds R" ""
  33. . ds C` ""
  34. . ds C' ""
  35. 'br\}
  36. .el\{\
  37. . ds -- \|\(em\|
  38. . ds PI \(*p
  39. . ds L" ``
  40. . ds R" ''
  41. . ds C`
  42. . ds C'
  43. 'br\}
  44. .\"
  45. .\" Escape single quotes in literal strings from groff's Unicode transform.
  46. .ie \n(.g .ds Aq \(aq
  47. .el .ds Aq '
  48. .\"
  49. .\" If the F register is >0, we'll generate index entries on stderr for
  50. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  51. .\" entries marked with X<> in POD. Of course, you'll have to process the
  52. .\" output yourself in some meaningful fashion.
  53. .\"
  54. .\" Avoid warning from groff about undefined register 'F'.
  55. .de IX
  56. ..
  57. .nr rF 0
  58. .if \n(.g .if rF .nr rF 1
  59. .if (\n(rF:(\n(.g==0)) \{\
  60. . if \nF \{\
  61. . de IX
  62. . tm Index:\\$1\t\\n%\t"\\$2"
  63. ..
  64. . if !\nF==2 \{\
  65. . nr % 0
  66. . nr F 2
  67. . \}
  68. . \}
  69. .\}
  70. .rr rF
  71. .\"
  72. .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
  73. .\" Fear. Run. Save yourself. No user-serviceable parts.
  74. . \" fudge factors for nroff and troff
  75. .if n \{\
  76. . ds #H 0
  77. . ds #V .8m
  78. . ds #F .3m
  79. . ds #[ \f1
  80. . ds #] \fP
  81. .\}
  82. .if t \{\
  83. . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
  84. . ds #V .6m
  85. . ds #F 0
  86. . ds #[ \&
  87. . ds #] \&
  88. .\}
  89. . \" simple accents for nroff and troff
  90. .if n \{\
  91. . ds ' \&
  92. . ds ` \&
  93. . ds ^ \&
  94. . ds , \&
  95. . ds ~ ~
  96. . ds /
  97. .\}
  98. .if t \{\
  99. . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
  100. . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
  101. . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
  102. . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
  103. . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
  104. . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
  105. .\}
  106. . \" troff and (daisy-wheel) nroff accents
  107. .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
  108. .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  109. .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
  110. .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  111. .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
  112. .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  113. .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  114. .ds ae a\h'-(\w'a'u*4/10)'e
  115. .ds Ae A\h'-(\w'A'u*4/10)'E
  116. . \" corrections for vroff
  117. .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
  118. .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
  119. . \" for low resolution devices (crt and lpr)
  120. .if \n(.H>23 .if \n(.V>19 \
  121. \{\
  122. . ds : e
  123. . ds 8 ss
  124. . ds o a
  125. . ds d- d\h'-1'\(ga
  126. . ds D- D\h'-1'\(hy
  127. . ds th \o'bp'
  128. . ds Th \o'LP'
  129. . ds ae ae
  130. . ds Ae AE
  131. .\}
  132. .rm #[ #] #H #V #F C
  133. .\" ========================================================================
  134. .\"
  135. .IX Title "PROVIDER-ENCODER 7ossl"
  136. .TH PROVIDER-ENCODER 7ossl "2024-09-03" "3.3.2" "OpenSSL"
  137. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  138. .\" way too many mistakes in technical documents.
  139. .if n .ad l
  140. .nh
  141. .SH "NAME"
  142. provider\-encoder \- The OSSL_ENCODER library <\-> provider functions
  143. .SH "SYNOPSIS"
  144. .IX Header "SYNOPSIS"
  145. .Vb 1
  146. \& #include <openssl/core_dispatch.h>
  147. \&
  148. \& /*
  149. \& * None of these are actual functions, but are displayed like this for
  150. \& * the function signatures for functions that are offered as function
  151. \& * pointers in OSSL_DISPATCH arrays.
  152. \& */
  153. \&
  154. \& /* Encoder parameter accessor and descriptor */
  155. \& const OSSL_PARAM *OSSL_FUNC_encoder_gettable_params(void *provctx);
  156. \& int OSSL_FUNC_encoder_get_params(OSSL_PARAM params[]);
  157. \&
  158. \& /* Functions to construct / destruct / manipulate the encoder context */
  159. \& void *OSSL_FUNC_encoder_newctx(void *provctx);
  160. \& void OSSL_FUNC_encoder_freectx(void *ctx);
  161. \& int OSSL_FUNC_encoder_set_ctx_params(void *ctx, const OSSL_PARAM params[]);
  162. \& const OSSL_PARAM *OSSL_FUNC_encoder_settable_ctx_params(void *provctx);
  163. \&
  164. \& /* Functions to check selection support */
  165. \& int OSSL_FUNC_encoder_does_selection(void *provctx, int selection);
  166. \&
  167. \& /* Functions to encode object data */
  168. \& int OSSL_FUNC_encoder_encode(void *ctx, OSSL_CORE_BIO *out,
  169. \& const void *obj_raw,
  170. \& const OSSL_PARAM obj_abstract[],
  171. \& int selection,
  172. \& OSSL_PASSPHRASE_CALLBACK *cb,
  173. \& void *cbarg);
  174. \&
  175. \& /* Functions to import and free a temporary object to be encoded */
  176. \& void *OSSL_FUNC_encoder_import_object(void *ctx, int selection,
  177. \& const OSSL_PARAM params[]);
  178. \& void OSSL_FUNC_encoder_free_object(void *obj);
  179. .Ve
  180. .SH "DESCRIPTION"
  181. .IX Header "DESCRIPTION"
  182. \&\fIWe use the wide term \*(L"encode\*(R" in this manual. This includes but is
  183. not limited to serialization.\fR
  184. .PP
  185. The \s-1ENCODER\s0 operation is a generic method to encode a provider-native
  186. object (\fIobj_raw\fR) or an object abstraction (\fIobject_abstract\fR, see
  187. \&\fBprovider\-object\fR\|(7)) into an encoded form, and write the result to
  188. the given \s-1OSSL_CORE_BIO.\s0 If the caller wants to get the encoded
  189. stream to memory, it should provide a \fBBIO_s_mem\fR\|(3) \fB\s-1BIO\s0\fR.
  190. .PP
  191. The encoder doesn't need to know more about the \fB\s-1OSSL_CORE_BIO\s0\fR
  192. pointer than being able to pass it to the appropriate \s-1BIO\s0 upcalls (see
  193. \&\*(L"Core functions\*(R" in \fBprovider\-base\fR\|(7)).
  194. .PP
  195. The \s-1ENCODER\s0 implementation may be part of a chain, where data is
  196. passed from one to the next. For example, there may be an
  197. implementation to encode an object to \s-1DER\s0 (that object is assumed to
  198. be provider-native and thereby passed via \fIobj_raw\fR), and another one
  199. that encodes \s-1DER\s0 to \s-1PEM\s0 (that one would receive the \s-1DER\s0 encoding via
  200. \&\fIobj_abstract\fR).
  201. .PP
  202. The encoding using the \s-1\fBOSSL_PARAM\s0\fR\|(3) array form allows a
  203. encoder to be used for data that's been exported from another
  204. provider, and thereby allow them to exist independently of each
  205. other.
  206. .PP
  207. The encoding using a provider side object can only be safely used
  208. with provider data coming from the same provider, for example keys
  209. with the \s-1KEYMGMT\s0 provider.
  210. .PP
  211. All \*(L"functions\*(R" mentioned here are passed as function pointers between
  212. \&\fIlibcrypto\fR and the provider in \s-1\fBOSSL_DISPATCH\s0\fR\|(3) arrays via
  213. \&\s-1\fBOSSL_ALGORITHM\s0\fR\|(3) arrays that are returned by the provider's
  214. \&\fBprovider_query_operation()\fR function
  215. (see \*(L"Provider Functions\*(R" in \fBprovider\-base\fR\|(7)).
  216. .PP
  217. All these \*(L"functions\*(R" have a corresponding function type definition
  218. named \fBOSSL_FUNC_{name}_fn\fR, and a helper function to retrieve the
  219. function pointer from an \s-1\fBOSSL_DISPATCH\s0\fR\|(3) element named
  220. \&\fBOSSL_FUNC_{name}\fR.
  221. For example, the \*(L"function\*(R" \fBOSSL_FUNC_encoder_encode()\fR has these:
  222. .PP
  223. .Vb 8
  224. \& typedef int
  225. \& (OSSL_FUNC_encoder_encode_fn)(void *ctx, OSSL_CORE_BIO *out,
  226. \& const void *obj_raw,
  227. \& const OSSL_PARAM obj_abstract[],
  228. \& int selection,
  229. \& OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg);
  230. \& static ossl_inline OSSL_FUNC_encoder_encode_fn
  231. \& OSSL_FUNC_encoder_encode(const OSSL_DISPATCH *opf);
  232. .Ve
  233. .PP
  234. \&\s-1\fBOSSL_DISPATCH\s0\fR\|(3) arrays are indexed by numbers that are provided as
  235. macros in \fBopenssl\-core_dispatch.h\fR\|(7), as follows:
  236. .PP
  237. .Vb 2
  238. \& OSSL_FUNC_encoder_get_params OSSL_FUNC_ENCODER_GET_PARAMS
  239. \& OSSL_FUNC_encoder_gettable_params OSSL_FUNC_ENCODER_GETTABLE_PARAMS
  240. \&
  241. \& OSSL_FUNC_encoder_newctx OSSL_FUNC_ENCODER_NEWCTX
  242. \& OSSL_FUNC_encoder_freectx OSSL_FUNC_ENCODER_FREECTX
  243. \& OSSL_FUNC_encoder_set_ctx_params OSSL_FUNC_ENCODER_SET_CTX_PARAMS
  244. \& OSSL_FUNC_encoder_settable_ctx_params OSSL_FUNC_ENCODER_SETTABLE_CTX_PARAMS
  245. \&
  246. \& OSSL_FUNC_encoder_does_selection OSSL_FUNC_ENCODER_DOES_SELECTION
  247. \&
  248. \& OSSL_FUNC_encoder_encode OSSL_FUNC_ENCODER_ENCODE
  249. \&
  250. \& OSSL_FUNC_encoder_import_object OSSL_FUNC_ENCODER_IMPORT_OBJECT
  251. \& OSSL_FUNC_encoder_free_object OSSL_FUNC_ENCODER_FREE_OBJECT
  252. .Ve
  253. .SS "Names and properties"
  254. .IX Subsection "Names and properties"
  255. The name of an implementation should match the type of object it handles.
  256. For example, an implementation that encodes an \s-1RSA\s0 key should be named \*(L"\s-1RSA\*(R".\s0
  257. Likewise, an implementation that further encodes \s-1DER\s0 should be named \*(L"\s-1DER\*(R".\s0
  258. .PP
  259. Properties can be used to further specify details about an implementation:
  260. .IP "output" 4
  261. .IX Item "output"
  262. This property is used to specify what type of output the implementation
  263. produces.
  264. .Sp
  265. This property is \fImandatory\fR.
  266. .Sp
  267. OpenSSL providers recognize the following output types:
  268. .RS 4
  269. .IP "text" 4
  270. .IX Item "text"
  271. An implementation with that output type outputs human readable text, making
  272. that implementation suitable for \f(CW\*(C`\-text\*(C'\fR output in diverse \fBopenssl\fR\|(1)
  273. commands.
  274. .IP "pem" 4
  275. .IX Item "pem"
  276. An implementation with that output type outputs \s-1PEM\s0 formatted data.
  277. .IP "der" 4
  278. .IX Item "der"
  279. An implementation with that output type outputs \s-1DER\s0 formatted data.
  280. .IP "msblob" 4
  281. .IX Item "msblob"
  282. An implementation with that output type outputs \s-1MSBLOB\s0 formatted data.
  283. .IP "pvk" 4
  284. .IX Item "pvk"
  285. An implementation with that output type outputs \s-1PVK\s0 formatted data.
  286. .RE
  287. .RS 4
  288. .RE
  289. .IP "structure" 4
  290. .IX Item "structure"
  291. This property is used to specify the structure that is used for the encoded
  292. object. An example could be \f(CW\*(C`pkcs8\*(C'\fR, to specify explicitly that an object
  293. (presumably an asymmetric key pair, in this case) will be wrapped in a
  294. PKCS#8 structure as part of the encoding.
  295. .Sp
  296. This property is \fIoptional\fR.
  297. .PP
  298. The possible values of both these properties is open ended. A provider may
  299. very well specify output types and structures that libcrypto doesn't know
  300. anything about.
  301. .SS "Subset selections"
  302. .IX Subsection "Subset selections"
  303. Sometimes, an object has more than one subset of data that is interesting to
  304. treat separately or together. It's possible to specify what subsets are to
  305. be encoded, with a set of bits \fIselection\fR that are passed in an \fBint\fR.
  306. .PP
  307. This set of bits depend entirely on what kind of provider-side object is
  308. passed. For example, those bits are assumed to be the same as those used
  309. with \fBprovider\-keymgmt\fR\|(7) (see \*(L"Key Objects\*(R" in \fBprovider\-keymgmt\fR\|(7)) when
  310. the object is an asymmetric keypair.
  311. .PP
  312. \&\s-1ENCODER\s0 implementations are free to regard the \fIselection\fR as a set of
  313. hints, but must do so with care. In the end, the output must make sense,
  314. and if there's a corresponding decoder, the resulting decoded object must
  315. match the original object that was encoded.
  316. .PP
  317. \&\fBOSSL_FUNC_encoder_does_selection()\fR should tell if a particular implementation
  318. supports any of the combinations given by \fIselection\fR.
  319. .SS "Context functions"
  320. .IX Subsection "Context functions"
  321. \&\fBOSSL_FUNC_encoder_newctx()\fR returns a context to be used with the rest of
  322. the functions.
  323. .PP
  324. \&\fBOSSL_FUNC_encoder_freectx()\fR frees the given \fIctx\fR, if it was created by
  325. \&\fBOSSL_FUNC_encoder_newctx()\fR.
  326. .PP
  327. \&\fBOSSL_FUNC_encoder_set_ctx_params()\fR sets context data according to parameters
  328. from \fIparams\fR that it recognises. Unrecognised parameters should be
  329. ignored.
  330. Passing \s-1NULL\s0 for \fIparams\fR should return true.
  331. .PP
  332. \&\fBOSSL_FUNC_encoder_settable_ctx_params()\fR returns a constant \s-1\fBOSSL_PARAM\s0\fR\|(3)
  333. array describing the parameters that \fBOSSL_FUNC_encoder_set_ctx_params()\fR
  334. can handle.
  335. .PP
  336. See \s-1\fBOSSL_PARAM\s0\fR\|(3) for further details on the parameters structure used by
  337. \&\fBOSSL_FUNC_encoder_set_ctx_params()\fR and \fBOSSL_FUNC_encoder_settable_ctx_params()\fR.
  338. .SS "Import functions"
  339. .IX Subsection "Import functions"
  340. A provider-native object may be associated with a foreign provider, and may
  341. therefore be unsuitable for direct use with a given \s-1ENCODER\s0 implementation.
  342. Provided that the foreign provider's implementation to handle the object has
  343. a function to export that object in \s-1\fBOSSL_PARAM\s0\fR\|(3) array form, the \s-1ENCODER\s0
  344. implementation should be able to import that array and create a suitable
  345. object to be passed to \fBOSSL_FUNC_encoder_encode()\fR's \fIobj_raw\fR.
  346. .PP
  347. \&\fBOSSL_FUNC_encoder_import_object()\fR should import the subset of \fIparams\fR
  348. given with \fIselection\fR to create a provider-native object that can be
  349. passed as \fIobj_raw\fR to \fBOSSL_FUNC_encoder_encode()\fR.
  350. .PP
  351. \&\fBOSSL_FUNC_encoder_free_object()\fR should free the object that was created with
  352. \&\fBOSSL_FUNC_encoder_import_object()\fR.
  353. .SS "Encoding functions"
  354. .IX Subsection "Encoding functions"
  355. \&\fBOSSL_FUNC_encoder_encode()\fR should take a provider-native object (in
  356. \&\fIobj_raw\fR) or an object abstraction (in \fIobj_abstract\fR), and should output
  357. the object in encoded form to the \fB\s-1OSSL_CORE_BIO\s0\fR. The \fIselection\fR bits,
  358. if relevant, should determine in greater detail what will be output.
  359. The encoding functions also take an \s-1\fBOSSL_PASSPHRASE_CALLBACK\s0\fR\|(3) function
  360. pointer along with a pointer to application data \fIcbarg\fR, which should be
  361. used when a pass phrase prompt is needed.
  362. .SS "Encoder operation parameters"
  363. .IX Subsection "Encoder operation parameters"
  364. Operation parameters currently recognised by built-in encoders are as
  365. follows:
  366. .ie n .IP """cipher"" (\fB\s-1OSSL_ENCODER_PARAM_CIPHER\s0\fR) <\s-1UTF8\s0 string>" 4
  367. .el .IP "``cipher'' (\fB\s-1OSSL_ENCODER_PARAM_CIPHER\s0\fR) <\s-1UTF8\s0 string>" 4
  368. .IX Item "cipher (OSSL_ENCODER_PARAM_CIPHER) <UTF8 string>"
  369. The name of the encryption cipher to be used when generating encrypted
  370. encoding. This is used when encoding private keys, as well as
  371. other objects that need protection.
  372. .Sp
  373. If this name is invalid for the encoding implementation, the
  374. implementation should refuse to perform the encoding, i.e.
  375. \&\fBOSSL_FUNC_encoder_encode_data()\fR and \fBOSSL_FUNC_encoder_encode_object()\fR
  376. should return an error.
  377. .ie n .IP """properties"" (\fB\s-1OSSL_ENCODER_PARAM_PROPERTIES\s0\fR) <\s-1UTF8\s0 string>" 4
  378. .el .IP "``properties'' (\fB\s-1OSSL_ENCODER_PARAM_PROPERTIES\s0\fR) <\s-1UTF8\s0 string>" 4
  379. .IX Item "properties (OSSL_ENCODER_PARAM_PROPERTIES) <UTF8 string>"
  380. The properties to be queried when trying to fetch the algorithm given
  381. with the \*(L"cipher\*(R" parameter.
  382. This must be given together with the \*(L"cipher\*(R" parameter to be
  383. considered valid.
  384. .Sp
  385. The encoding implementation isn't obligated to use this value.
  386. However, it is recommended that implementations that do not handle
  387. property strings return an error on receiving this parameter unless
  388. its value \s-1NULL\s0 or the empty string.
  389. .ie n .IP """save-parameters"" (\fB\s-1OSSL_ENCODER_PARAM_SAVE_PARAMETERS\s0\fR) <integer>" 4
  390. .el .IP "``save-parameters'' (\fB\s-1OSSL_ENCODER_PARAM_SAVE_PARAMETERS\s0\fR) <integer>" 4
  391. .IX Item "save-parameters (OSSL_ENCODER_PARAM_SAVE_PARAMETERS) <integer>"
  392. If set to 0 disables saving of key domain parameters. Default is 1.
  393. It currently has an effect only on \s-1DSA\s0 keys.
  394. .PP
  395. Parameters currently recognised by the built-in pass phrase callback:
  396. .ie n .IP """info"" (\fB\s-1OSSL_PASSPHRASE_PARAM_INFO\s0\fR) <\s-1UTF8\s0 string>" 4
  397. .el .IP "``info'' (\fB\s-1OSSL_PASSPHRASE_PARAM_INFO\s0\fR) <\s-1UTF8\s0 string>" 4
  398. .IX Item "info (OSSL_PASSPHRASE_PARAM_INFO) <UTF8 string>"
  399. A string of information that will become part of the pass phrase
  400. prompt. This could be used to give the user information on what kind
  401. of object it's being prompted for.
  402. .SH "RETURN VALUES"
  403. .IX Header "RETURN VALUES"
  404. \&\fBOSSL_FUNC_encoder_newctx()\fR returns a pointer to a context, or \s-1NULL\s0 on
  405. failure.
  406. .PP
  407. \&\fBOSSL_FUNC_encoder_set_ctx_params()\fR returns 1, unless a recognised
  408. parameter was invalid or caused an error, for which 0 is returned.
  409. .PP
  410. \&\fBOSSL_FUNC_encoder_settable_ctx_params()\fR returns a pointer to an array of
  411. constant \s-1\fBOSSL_PARAM\s0\fR\|(3) elements.
  412. .PP
  413. \&\fBOSSL_FUNC_encoder_does_selection()\fR returns 1 if the encoder implementation
  414. supports any of the \fIselection\fR bits, otherwise 0.
  415. .PP
  416. \&\fBOSSL_FUNC_encoder_encode()\fR returns 1 on success, or 0 on failure.
  417. .SH "SEE ALSO"
  418. .IX Header "SEE ALSO"
  419. \&\fBprovider\fR\|(7)
  420. .SH "HISTORY"
  421. .IX Header "HISTORY"
  422. The \s-1ENCODER\s0 interface was introduced in OpenSSL 3.0.
  423. .SH "COPYRIGHT"
  424. .IX Header "COPYRIGHT"
  425. Copyright 2019\-2021 The OpenSSL Project Authors. All Rights Reserved.
  426. .PP
  427. Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use
  428. this file except in compliance with the License. You can obtain a copy
  429. in the file \s-1LICENSE\s0 in the source distribution or at
  430. <https://www.openssl.org/source/license.html>.