Debian Codegraph @

templates/man3/EVP_PKEY_sign.3ssl.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:23+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 # #-#-#-#-# archlinux: EVP_PKEY_sign.3ssl.pot (PACKAGE VERSION) #-#-#-#-#
20 #
21 #. #-#-#-#-# archlinux: EVP_PKEY_sign.3ssl.pot (PACKAGE VERSION) #-#-#-#-#
22 #. Required to disable full justification in groff 1.23.0.
23 #. ========================================================================
24 #. type: IX
25 #. #-#-#-#-# debian-trixie: EVP_PKEY_sign.3ssl.pot (PACKAGE VERSION) #-#-#-#-#
26 #. ========================================================================
27 #. type: IX
28 #. #-#-#-#-# debian-unstable: EVP_PKEY_sign.3ssl.pot (PACKAGE VERSION) #-#-#-#-#
29 #. ========================================================================
30 #. type: IX
31 #: archlinux debian-trixie debian-unstable
32 #, no-wrap
33 msgid "Title"
34 msgstr ""
35
36 #
37 #. Required to disable full justification in groff 1.23.0.
38 #. ========================================================================
39 #. type: IX
40 #: archlinux
41 #, no-wrap
42 msgid "EVP_PKEY_SIGN 3ssl"
43 msgstr ""
44
45 #. type: TH
46 #: archlinux debian-trixie debian-unstable
47 #, no-wrap
48 msgid "EVP_PKEY_SIGN"
49 msgstr ""
50
51 #. type: TH
52 #: archlinux debian-trixie debian-unstable
53 #, no-wrap
54 msgid "2026-04-07"
55 msgstr ""
56
57 #. type: TH
58 #: archlinux debian-unstable
59 #, no-wrap
60 msgid "3.6.2"
61 msgstr ""
62
63 #. type: TH
64 #: archlinux debian-trixie debian-unstable
65 #, no-wrap
66 msgid "OpenSSL"
67 msgstr ""
68
69 #. type: SH
70 #: archlinux debian-trixie debian-unstable
71 #, no-wrap
72 msgid "NAME"
73 msgstr ""
74
75 #. type: Plain text
76 #: archlinux debian-trixie debian-unstable
77 msgid ""
78 "EVP_PKEY_sign_init, EVP_PKEY_sign_init_ex, EVP_PKEY_sign_init_ex2, "
79 "EVP_PKEY_sign, EVP_PKEY_sign_message_init, EVP_PKEY_sign_message_update, "
80 "EVP_PKEY_sign_message_final - sign using a public key algorithm"
81 msgstr ""
82
83 #. type: IX
84 #: archlinux debian-trixie debian-unstable
85 #, no-wrap
86 msgid "SYNOPSIS"
87 msgstr ""
88
89 #. type: IX
90 #: archlinux debian-trixie debian-unstable
91 #, no-wrap
92 msgid "Header"
93 msgstr ""
94
95 #. type: Plain text
96 #: archlinux debian-trixie debian-unstable
97 #, no-wrap
98 msgid ""
99 "\\& #include E<lt>openssl/evp.hE<gt>\n"
100 "\\&\n"
101 "\\& int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);\n"
102 "\\& int EVP_PKEY_sign_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);\n"
103 "\\& int EVP_PKEY_sign_init_ex2(EVP_PKEY_CTX *ctx, EVP_SIGNATURE *algo,\n"
104 "\\& const OSSL_PARAM params[]);\n"
105 "\\& int EVP_PKEY_sign_message_init(EVP_PKEY_CTX *ctx, EVP_SIGNATURE *algo,\n"
106 "\\& const OSSL_PARAM params[]);\n"
107 "\\& int EVP_PKEY_sign_message_update(EVP_PKEY_CTX *ctx,\n"
108 "\\& unsigned char *in, size_t inlen);\n"
109 "\\& int EVP_PKEY_sign_message_final(EVP_PKEY_CTX *ctx, unsigned char *sig,\n"
110 "\\& size_t *siglen, size_t sigsize);\n"
111 "\\& int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,\n"
112 "\\& unsigned char *sig, size_t *siglen,\n"
113 "\\& const unsigned char *tbs, size_t tbslen);\n"
114 msgstr ""
115
116 #. type: IX
117 #: archlinux debian-trixie debian-unstable
118 #, no-wrap
119 msgid "DESCRIPTION"
120 msgstr ""
121
122 #. type: Plain text
123 #: archlinux debian-trixie debian-unstable
124 msgid ""
125 "\\&B<EVP_PKEY_sign_init()> initializes a public key algorithm context I<ctx> "
126 "for signing using the algorithm given when the context was created using "
127 "B<EVP_PKEY_CTX_new>\\|(3) or variants thereof. The algorithm is used to "
128 "fetch a B<EVP_SIGNATURE> method implicitly, see \"Implicit fetch\" in "
129 "B<provider>\\|(7) for more information about implicit fetches."
130 msgstr ""
131
132 #. type: Plain text
133 #: archlinux debian-trixie debian-unstable
134 msgid ""
135 "\\&B<EVP_PKEY_sign_init_ex()> is the same as B<EVP_PKEY_sign_init()> but "
136 "additionally sets the passed parameters I<params> on the context before "
137 "returning."
138 msgstr ""
139
140 #. type: Plain text
141 #: archlinux debian-trixie debian-unstable
142 msgid ""
143 "\\&B<EVP_PKEY_sign_init_ex2()> initializes a public key algorithm context "
144 "I<ctx> for signing a pre-computed message digest using the algorithm given "
145 "by I<algo> and the key given through B<EVP_PKEY_CTX_new>\\|(3) or "
146 "B<EVP_PKEY_CTX_new_from_pkey>\\|(3). A context I<ctx> without a pre-loaded "
147 "key cannot be used with this function. This function provides almost the "
148 "same functionality as B<EVP_PKEY_sign_init_ex()>, but is uniquely intended "
149 "to be used with a pre-computed message digest, and allows pre-determining "
150 "the exact conditions for that message digest, if a composite signature "
151 "algorithm (such as RSA-SHA256) was fetched. Following a call to this "
152 "function, setting parameters that modifies the digest implementation or "
153 "padding is not normally supported."
154 msgstr ""
155
156 #. type: Plain text
157 #: archlinux debian-trixie debian-unstable
158 msgid ""
159 "\\&B<EVP_PKEY_sign_message_init()> initializes a public key algorithm "
160 "context I<ctx> for signing an unlimited size message using the algorithm "
161 "given by I<algo> and the key given through B<EVP_PKEY_CTX_new>\\|(3) or "
162 "B<EVP_PKEY_CTX_new_from_pkey>\\|(3). Passing the message is supported both "
163 "in a one-shot fashion using \\&B<EVP_PKEY_sign()>, and through the "
164 "combination of B<EVP_PKEY_sign_message_update()> and "
165 "B<EVP_PKEY_sign_message_final()>. This function enables using algorithms "
166 "that can process input of arbitrary length, such as ED25519, RSA-SHA256 and "
167 "similar."
168 msgstr ""
169
170 #. type: Plain text
171 #: archlinux
172 msgid ""
173 "\\&B<EVP_PKEY_sign_message_update()> adds I<inlen> bytes from I<in> to the "
174 "data to be processed for signature. The signature algorithm specification "
175 "and implementation determine how the input bytes are processed and if "
176 "there\\*(Aqs a limit on the total size of the input. See \"NOTES\" below "
177 "for a deeper explanation."
178 msgstr ""
179
180 #. type: Plain text
181 #: archlinux
182 msgid ""
183 "\\&B<EVP_PKEY_sign_message_final()> signs the processed data and places the "
184 "data in \\&I<sig>, and the number of signature bytes in I<*siglen>, if the "
185 "number of bytes doesn\\*(Aqt surpass the size given by I<sigsize>. "
186 "\\&I<sig> may be NULL, and in that case, only I<*siglen> is updated with the "
187 "number of signature bytes."
188 msgstr ""
189
190 #. type: Plain text
191 #: archlinux debian-trixie debian-unstable
192 msgid ""
193 "\\&B<EVP_PKEY_sign()> is a one-shot function that can be used with all the "
194 "init functions above. When initialization was done with "
195 "B<EVP_PKEY_sign_init()>, B<EVP_PKEY_sign_init_ex()> or "
196 "B<EVP_PKEY_sign_init_ex2()>, the data specified by I<tbs> and I<tbslen> is "
197 "signed after appropriate padding. When initialization was done with "
198 "B<EVP_PKEY_sign_message_init()>, the data specified by I<tbs> and I<tbslen> "
199 "is digested by the implied message digest algorithm, and the result is "
200 "signed after appropriate padding. If I<sig> is NULL then the maximum size "
201 "of the output buffer is written to the \\&I<siglen> parameter. If I<sig> is "
202 "not NULL, then before the call the I<siglen> parameter should contain the "
203 "length of the I<sig> buffer, and if the call is successful the signature is "
204 "written to I<sig> and the amount of data written to I<siglen>."
205 msgstr ""
206
207 #. type: IX
208 #: archlinux debian-trixie debian-unstable
209 #, no-wrap
210 msgid "NOTES"
211 msgstr ""
212
213 #. type: IX
214 #: archlinux debian-trixie debian-unstable
215 #, no-wrap
216 msgid "General"
217 msgstr ""
218
219 #. type: IX
220 #: archlinux debian-trixie debian-unstable
221 #, no-wrap
222 msgid "Subsection"
223 msgstr ""
224
225 #. type: Plain text
226 #: archlinux debian-trixie debian-unstable
227 msgid ""
228 "Some signature implementations only accumulate the input data and do no "
229 "further processing before signing it (they expect the input to be a digest), "
230 "while others compress the data, typically by internally producing a digest, "
231 "and signing the result. Some of them support both modes of operation at the "
232 "same time. The caller is expected to know how the chosen algorithm is "
233 "supposed to behave and under what conditions."
234 msgstr ""
235
236 #. type: Plain text
237 #: archlinux debian-trixie debian-unstable
238 msgid ""
239 "For example, an RSA implementation can be expected to only expect a message "
240 "digest as input, while ED25519 can be expected to process the input with a "
241 "hash, i.e. to produce the message digest internally, and while RSA-SHA256 "
242 "can be expected to handle either mode of operation, depending on if the "
243 "operation was initialized with B<EVP_PKEY_sign_init_ex2()> or with "
244 "B<EVP_PKEY_sign_message_init()>."
245 msgstr ""
246
247 #. type: Plain text
248 #: archlinux debian-trixie debian-unstable
249 msgid ""
250 "Similarly, an RSA implementation usually expects additional details to be "
251 "set, like the message digest algorithm that the input is supposed to be "
252 "digested with, as well as the padding mode (see "
253 "B<EVP_PKEY_CTX_set_signature_md>\\|(3) and "
254 "\\&B<EVP_PKEY_CTX_set_rsa_padding>\\|(3) and similar others), while an RSA-"
255 "SHA256 implementation usually has these details pre-set and immutable."
256 msgstr ""
257
258 #. type: Plain text
259 #: archlinux
260 msgid ""
261 "The functions described here can\\*(Aqt be used to combine separate "
262 "algorithms. In particular, neither B<EVP_PKEY_CTX_set_signature_md>\\|(3) "
263 "nor the B<OSSL_PARAM> parameter \"digest\" (B<OSSL_SIGNATURE_PARAM_DIGEST>) "
264 "can be used to combine a signature algorithm with a hash algorithm to "
265 "process the input. In other words, it\\*(Aqs not possible to specify a "
266 "I<ctx> pre-loaded with an RSA pkey, or an I<algo> that fetched "
267 "CW<\\*(C`RSA\\*(C'> and try to specify SHA256 separately to get the "
268 "functionality of RSA-SHA256. If combining algorithms in that manner is "
269 "desired, please use B<EVP_DigestSignInit>\\|(3) and associated functions."
270 msgstr ""
271
272 #. type: IX
273 #: archlinux debian-trixie debian-unstable
274 #, no-wrap
275 msgid "Performing multiple signatures"
276 msgstr ""
277
278 #. type: Plain text
279 #: archlinux debian-trixie debian-unstable
280 msgid ""
281 "When initialized using B<EVP_PKEY_sign_init_ex()> or "
282 "B<EVP_PKEY_sign_init_ex2()>, \\&B<EVP_PKEY_sign()> can be called more than "
283 "once on the same context to have several one-shot operations performed using "
284 "the same parameters."
285 msgstr ""
286
287 #. type: Plain text
288 #: archlinux
289 msgid ""
290 "When initialized using B<EVP_PKEY_sign_message_init()>, it\\*(Aqs not "
291 "possible to call B<EVP_PKEY_sign()> multiple times."
292 msgstr ""
293
294 #. type: IX
295 #: archlinux debian-trixie debian-unstable
296 #, no-wrap
297 msgid "RETURN VALUES"
298 msgstr ""
299
300 #. type: Plain text
301 #: archlinux debian-trixie debian-unstable
302 msgid ""
303 "All functions return 1 for success and 0 or a negative value for failure."
304 msgstr ""
305
306 #. type: Plain text
307 #: archlinux debian-trixie debian-unstable
308 msgid ""
309 "In particular, B<EVP_PKEY_sign_init()> and its other variants may return -2 "
310 "to indicate that the operation is not supported by the public key algorithm."
311 msgstr ""
312
313 #. type: IX
314 #: archlinux debian-trixie debian-unstable
315 #, no-wrap
316 msgid "EXAMPLES"
317 msgstr ""
318
319 #. type: IX
320 #: archlinux debian-trixie debian-unstable
321 #, no-wrap
322 msgid "RSA with PKCS#1 padding for SHA256"
323 msgstr ""
324
325 #. type: Plain text
326 #: archlinux debian-trixie debian-unstable
327 msgid "Sign data using RSA with PKCS#1 padding and a SHA256 digest as input:"
328 msgstr ""
329
330 #. type: Plain text
331 #: archlinux debian-trixie debian-unstable
332 #, no-wrap
333 msgid ""
334 "\\& #include E<lt>openssl/evp.hE<gt>\n"
335 "\\& #include E<lt>openssl/rsa.hE<gt>\n"
336 "\\&\n"
337 "\\& EVP_PKEY_CTX *ctx;\n"
338 "\\& /* md is a SHA-256 digest in this example. */\n"
339 "\\& unsigned char *md, *sig;\n"
340 "\\& size_t mdlen = 32, siglen;\n"
341 "\\& EVP_PKEY *signing_key;\n"
342 "\\&\n"
343 "\\& /*\n"
344 "\\& * NB: assumes signing_key and md are set up before the next\n"
345 "\\& * step. signing_key must be an RSA private key and md must\n"
346 "\\& * point to the SHA-256 digest to be signed.\n"
347 "\\& */\n"
348 "\\& ctx = EVP_PKEY_CTX_new(signing_key, NULL /* no engine */);\n"
349 "\\& if (ctx == NULL)\n"
350 "\\& /* Error occurred */\n"
351 "\\& if (EVP_PKEY_sign_init(ctx) E<lt>= 0)\n"
352 "\\& /* Error */\n"
353 "\\& if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING) E<lt>= 0)\n"
354 "\\& /* Error */\n"
355 "\\& if (EVP_PKEY_CTX_set_signature_md(ctx, EVP_sha256()) E<lt>= 0)\n"
356 "\\& /* Error */\n"
357 "\\&\n"
358 "\\& /* Determine buffer length */\n"
359 "\\& if (EVP_PKEY_sign(ctx, NULL, &siglen, md, mdlen) E<lt>= 0)\n"
360 "\\& /* Error */\n"
361 "\\&\n"
362 "\\& sig = OPENSSL_malloc(siglen);\n"
363 "\\&\n"
364 "\\& if (sig == NULL)\n"
365 "\\& /* malloc failure */\n"
366 "\\&\n"
367 "\\& if (EVP_PKEY_sign(ctx, sig, &siglen, md, mdlen) E<lt>= 0)\n"
368 "\\& /* Error */\n"
369 "\\&\n"
370 "\\& /* Signature is siglen bytes written to buffer sig */\n"
371 msgstr ""
372
373 #. type: IX
374 #: archlinux debian-trixie debian-unstable
375 #, no-wrap
376 msgid "RSA-SHA256 with a pre-computed digest"
377 msgstr ""
378
379 #. type: Plain text
380 #: archlinux debian-trixie debian-unstable
381 msgid ""
382 "Sign a digest with RSA-SHA256 using one-shot functions. To be noted is that "
383 "RSA-SHA256 is assumed to be an implementation of "
384 "CW<\\*(C`sha256WithRSAEncryption\\*(C'>, for which the padding is pre-"
385 "determined to be B<RSA_PKCS1_PADDING>, and the input digest is assumed to "
386 "have been computed using SHA256."
387 msgstr ""
388
389 #. type: Plain text
390 #: archlinux debian-trixie debian-unstable
391 #, no-wrap
392 msgid ""
393 "\\& #include E<lt>openssl/evp.hE<gt>\n"
394 "\\& #include E<lt>openssl/rsa.hE<gt>\n"
395 "\\&\n"
396 "\\& EVP_PKEY_CTX *ctx;\n"
397 "\\& /* md is a SHA-256 digest in this example. */\n"
398 "\\& unsigned char *md, *sig;\n"
399 "\\& size_t mdlen = 32, siglen;\n"
400 "\\& EVP_PKEY *signing_key;\n"
401 "\\&\n"
402 "\\& /*\n"
403 "\\& * NB: assumes signing_key and md are set up before the next\n"
404 "\\& * step. signing_key must be an RSA private key and md must\n"
405 "\\& * point to the SHA-256 digest to be signed.\n"
406 "\\& */\n"
407 "\\& ctx = EVP_PKEY_CTX_new(signing_key, NULL /* no engine */);\n"
408 "\\& alg = EVP_SIGNATURE_fetch(NULL, \"RSA-SHA256\", NULL);\n"
409 "\\&\n"
410 "\\& if (ctx == NULL)\n"
411 "\\& /* Error occurred */\n"
412 "\\& if (EVP_PKEY_sign_init_ex2(ctx, alg, NULL) E<lt>= 0)\n"
413 "\\& /* Error */\n"
414 "\\&\n"
415 "\\& /* Determine buffer length */\n"
416 "\\& if (EVP_PKEY_sign(ctx, NULL, &siglen, md, mdlen) E<lt>= 0)\n"
417 "\\& /* Error */\n"
418 "\\&\n"
419 "\\& sig = OPENSSL_malloc(siglen);\n"
420 "\\&\n"
421 "\\& if (sig == NULL)\n"
422 "\\& /* malloc failure */\n"
423 "\\&\n"
424 "\\& if (EVP_PKEY_sign(ctx, sig, &siglen, md, mdlen) E<lt>= 0)\n"
425 "\\& /* Error */\n"
426 "\\&\n"
427 "\\& /* Signature is siglen bytes written to buffer sig */\n"
428 msgstr ""
429
430 #. type: IX
431 #: archlinux debian-trixie debian-unstable
432 #, no-wrap
433 msgid "RSA-SHA256, one-shot"
434 msgstr ""
435
436 #. type: Plain text
437 #: archlinux debian-trixie debian-unstable
438 msgid ""
439 "Sign a document with RSA-SHA256 using one-shot functions. To be noted is "
440 "that RSA-SHA256 is assumed to be an implementation of "
441 "\\&CW<\\*(C`sha256WithRSAEncryption\\*(C'>, for which the padding is pre-"
442 "determined to be \\&B<RSA_PKCS1_PADDING>."
443 msgstr ""
444
445 #. type: Plain text
446 #: archlinux debian-trixie debian-unstable
447 #, no-wrap
448 msgid ""
449 "\\& #include E<lt>openssl/evp.hE<gt>\n"
450 "\\& #include E<lt>openssl/rsa.hE<gt>\n"
451 "\\&\n"
452 "\\& EVP_PKEY_CTX *ctx;\n"
453 "\\& /* in is the input in this example. */\n"
454 "\\& unsigned char *in, *sig;\n"
455 "\\& /* inlen is the length of the input in this example. */\n"
456 "\\& size_t inlen, siglen;\n"
457 "\\& EVP_PKEY *signing_key;\n"
458 "\\& EVP_SIGNATURE *alg;\n"
459 "\\&\n"
460 "\\& /*\n"
461 "\\& * NB: assumes signing_key, in and inlen are set up before\n"
462 "\\& * the next step. signing_key must be an RSA private key,\n"
463 "\\& * in must point to data to be digested and signed, and\n"
464 "\\& * inlen must be the size of the data in bytes.\n"
465 "\\& */\n"
466 "\\& ctx = EVP_PKEY_CTX_new(signing_key, NULL /* no engine */);\n"
467 "\\& alg = EVP_SIGNATURE_fetch(NULL, \"RSA-SHA256\", NULL);\n"
468 "\\&\n"
469 "\\& if (ctx == NULL || alg == NULL)\n"
470 "\\& /* Error occurred */\n"
471 "\\& if (EVP_PKEY_sign_message_init(ctx, alg, NULL) E<lt>= 0)\n"
472 "\\& /* Error */\n"
473 "\\&\n"
474 "\\& /* Determine sig buffer length */\n"
475 "\\& if (EVP_PKEY_sign(ctx, NULL, &siglen, in, inlen) E<lt>= 0)\n"
476 "\\& /* Error */\n"
477 "\\&\n"
478 "\\& sig = OPENSSL_malloc(siglen);\n"
479 "\\&\n"
480 "\\& if (sig == NULL)\n"
481 "\\& /* malloc failure */\n"
482 "\\&\n"
483 "\\& if (EVP_PKEY_sign(ctx, sig, &siglen, in, inlen) E<lt>= 0)\n"
484 "\\& /* Error */\n"
485 "\\&\n"
486 "\\& /* Signature is siglen bytes written to buffer sig */\n"
487 msgstr ""
488
489 #. type: IX
490 #: archlinux debian-trixie debian-unstable
491 #, no-wrap
492 msgid "RSA-SHA256, using update and final"
493 msgstr ""
494
495 #. type: Plain text
496 #: archlinux debian-trixie debian-unstable
497 msgid ""
498 "This is the same as the previous example, but allowing stream-like "
499 "functionality."
500 msgstr ""
501
502 #. type: Plain text
503 #: archlinux debian-trixie debian-unstable
504 #, no-wrap
505 msgid ""
506 "\\& #include E<lt>openssl/evp.hE<gt>\n"
507 "\\& #include E<lt>openssl/rsa.hE<gt>\n"
508 "\\&\n"
509 "\\& EVP_PKEY_CTX *ctx;\n"
510 "\\& /* in is the input in this example. */\n"
511 "\\& unsigned char *in, *sig;\n"
512 "\\& /* inlen is the length of the input in this example. */\n"
513 "\\& size_t inlen, siglen;\n"
514 "\\& EVP_PKEY *signing_key;\n"
515 "\\& EVP_SIGNATURE *alg;\n"
516 "\\&\n"
517 "\\& /*\n"
518 "\\& * NB: assumes signing_key, in and inlen are set up before\n"
519 "\\& * the next step. signing_key must be an RSA private key,\n"
520 "\\& * in must point to data to be digested and signed, and\n"
521 "\\& * inlen must be the size of the data in bytes.\n"
522 "\\& */\n"
523 "\\& ctx = EVP_PKEY_CTX_new(signing_key, NULL /* no engine */);\n"
524 "\\& alg = EVP_SIGNATURE_fetch(NULL, \"RSA-SHA256\", NULL);\n"
525 "\\&\n"
526 "\\& if (ctx == NULL || alg == NULL)\n"
527 "\\& /* Error occurred */\n"
528 "\\& if (EVP_PKEY_sign_message_init(ctx, alg, NULL) E<lt>= 0)\n"
529 "\\& /* Error */\n"
530 "\\&\n"
531 "\\& while (inlen E<gt> 0) {\n"
532 "\\& if (EVP_PKEY_sign_message_update(ctx, in, inlen)) E<lt>= 0)\n"
533 "\\& /* Error */\n"
534 "\\& if (inlen E<gt> 256) {\n"
535 "\\& inlen -= 256;\n"
536 "\\& in += 256;\n"
537 "\\& } else {\n"
538 "\\& inlen = 0;\n"
539 "\\& }\n"
540 "\\& }\n"
541 "\\&\n"
542 "\\& /* Determine sig buffer length */\n"
543 "\\& if (EVP_PKEY_sign_message_final(ctx, NULL, &siglen) E<lt>= 0)\n"
544 "\\& /* Error */\n"
545 "\\&\n"
546 "\\& sig = OPENSSL_malloc(siglen);\n"
547 "\\&\n"
548 "\\& if (sig == NULL)\n"
549 "\\& /* malloc failure */\n"
550 "\\&\n"
551 "\\& if (EVP_PKEY_sign_message_final(ctx, sig, &siglen) E<lt>= 0)\n"
552 "\\& /* Error */\n"
553 "\\&\n"
554 "\\& /* Signature is siglen bytes written to buffer sig */\n"
555 msgstr ""
556
557 #. type: IX
558 #: archlinux debian-trixie debian-unstable
559 #, no-wrap
560 msgid "SEE ALSO"
561 msgstr ""
562
563 #. type: Plain text
564 #: archlinux debian-trixie debian-unstable
565 msgid ""
566 "\\&B<EVP_PKEY_CTX_new>\\|(3), \\&B<EVP_PKEY_CTX_ctrl>\\|(3), "
567 "\\&B<EVP_PKEY_encrypt>\\|(3), \\&B<EVP_PKEY_decrypt>\\|(3), "
568 "\\&B<EVP_PKEY_verify>\\|(3), \\&B<EVP_PKEY_verify_recover>\\|(3), "
569 "\\&B<EVP_PKEY_derive>\\|(3)"
570 msgstr ""
571
572 #. type: IX
573 #: archlinux debian-trixie debian-unstable
574 #, no-wrap
575 msgid "HISTORY"
576 msgstr ""
577
578 #. type: Plain text
579 #: archlinux debian-trixie debian-unstable
580 msgid ""
581 "The B<EVP_PKEY_sign_init()> and B<EVP_PKEY_sign()> functions were added in "
582 "OpenSSL 1.0.0."
583 msgstr ""
584
585 #. type: Plain text
586 #: archlinux debian-trixie debian-unstable
587 msgid "The B<EVP_PKEY_sign_init_ex()> function was added in OpenSSL 3.0."
588 msgstr ""
589
590 #. type: Plain text
591 #: archlinux debian-trixie debian-unstable
592 msgid ""
593 "The B<EVP_PKEY_sign_init_ex2()>, B<EVP_PKEY_sign_message_init()>, "
594 "\\&B<EVP_PKEY_sign_message_update()> and B<EVP_PKEY_sign_message_final()> "
595 "functions where added in OpenSSL 3.4."
596 msgstr ""
597
598 #. type: IX
599 #: archlinux debian-trixie debian-unstable
600 #, no-wrap
601 msgid "COPYRIGHT"
602 msgstr ""
603
604 #. type: Plain text
605 #: archlinux debian-trixie debian-unstable
606 msgid "Copyright 2006-2025 The OpenSSL Project Authors. All Rights Reserved."
607 msgstr ""
608
609 #. type: Plain text
610 #: archlinux debian-trixie debian-unstable
611 msgid ""
612 "Licensed under the Apache License 2.0 (the \"License\"). You may not use "
613 "this file except in compliance with the License. You can obtain a copy in "
614 "the file LICENSE in the source distribution or at E<lt>https://"
615 "www.openssl.org/source/license.htmlE<gt>."
616 msgstr ""
617
618 #. ========================================================================
619 #. type: IX
620 #: debian-trixie debian-unstable
621 #, no-wrap
622 msgid "EVP_PKEY_SIGN 3SSL"
623 msgstr ""
624
625 #. type: TH
626 #: debian-trixie
627 #, no-wrap
628 msgid "3.5.6"
629 msgstr ""
630
631 #. type: Plain text
632 #: debian-trixie debian-unstable
633 msgid ""
634 "\\&B<EVP_PKEY_sign_message_update()> adds I<inlen> bytes from I<in> to the "
635 "data to be processed for signature. The signature algorithm specification "
636 "and implementation determine how the input bytes are processed and if "
637 "there's a limit on the total size of the input. See \"NOTES\" below for a "
638 "deeper explanation."
639 msgstr ""
640
641 #. type: Plain text
642 #: debian-trixie debian-unstable
643 msgid ""
644 "\\&B<EVP_PKEY_sign_message_final()> signs the processed data and places the "
645 "data in \\&I<sig>, and the number of signature bytes in I<*siglen>, if the "
646 "number of bytes doesn't surpass the size given by I<sigsize>. \\&I<sig> may "
647 "be NULL, and in that case, only I<*siglen> is updated with the number of "
648 "signature bytes."
649 msgstr ""
650
651 #. type: Plain text
652 #: debian-trixie debian-unstable
653 msgid ""
654 "The functions described here can't be used to combine separate algorithms. "
655 "In particular, neither B<EVP_PKEY_CTX_set_signature_md>\\|(3) nor the "
656 "B<OSSL_PARAM> parameter \"digest\" (B<OSSL_SIGNATURE_PARAM_DIGEST>) can be "
657 "used to combine a signature algorithm with a hash algorithm to process the "
658 "input. In other words, it's not possible to specify a I<ctx> pre-loaded "
659 "with an RSA pkey, or an I<algo> that fetched CW<\\*(C`RSA\\*(C'> and try to "
660 "specify SHA256 separately to get the functionality of RSA-SHA256. If "
661 "combining algorithms in that manner is desired, please use "
662 "B<EVP_DigestSignInit>\\|(3) and associated functions."
663 msgstr ""
664
665 #. type: Plain text
666 #: debian-trixie debian-unstable
667 msgid ""
668 "When initialized using B<EVP_PKEY_sign_message_init()>, it's not possible to "
669 "call B<EVP_PKEY_sign()> multiple times."
670 msgstr ""