Debian Codegraph @

upstream/debian-unstable/man3/PKCS12_item_decrypt_d2i.3ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
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 "PKCS12_ITEM_DECRYPT_D2I 3SSL"
58 .TH PKCS12_ITEM_DECRYPT_D2I 3SSL 2026-04-07 3.6.2 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 PKCS12_item_decrypt_d2i, PKCS12_item_decrypt_d2i_ex,
65 PKCS12_item_i2d_encrypt, PKCS12_item_i2d_encrypt_ex \- PKCS12 item
66 encrypt/decrypt functions
67 .SH SYNOPSIS
68 .IX Header "SYNOPSIS"
69 .Vb 1
70 \& #include <openssl/pkcs12.h>
71 \&
72 \& void *PKCS12_item_decrypt_d2i(const X509_ALGOR *algor, const ASN1_ITEM *it,
73 \& const char *pass, int passlen,
74 \& const ASN1_OCTET_STRING *oct, int zbuf);
75 \& void *PKCS12_item_decrypt_d2i_ex(const X509_ALGOR *algor, const ASN1_ITEM *it,
76 \& const char *pass, int passlen,
77 \& const ASN1_OCTET_STRING *oct, int zbuf,
78 \& OSSL_LIB_CTX *libctx,
79 \& const char *propq);
80 \& ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt(X509_ALGOR *algor,
81 \& const ASN1_ITEM *it,
82 \& const char *pass, int passlen,
83 \& void *obj, int zbuf);
84 \& ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt_ex(X509_ALGOR *algor,
85 \& const ASN1_ITEM *it,
86 \& const char *pass, int passlen,
87 \& void *obj, int zbuf,
88 \& OSSL_LIB_CTX *ctx,
89 \& const char *propq);
90 .Ve
91 .SH DESCRIPTION
92 .IX Header "DESCRIPTION"
93 \&\fBPKCS12_item_decrypt_d2i()\fR and \fBPKCS12_item_decrypt_d2i_ex()\fR decrypt an octet
94 string containing an ASN.1 encoded object using the algorithm \fIalgor\fR and
95 password \fIpass\fR of length \fIpasslen\fR. If \fIzbuf\fR is nonzero then the output
96 buffer will zeroed after the decrypt.
97 .PP
98 \&\fBPKCS12_item_i2d_encrypt()\fR and \fBPKCS12_item_i2d_encrypt_ex()\fR encrypt an ASN.1
99 object \fIit\fR using the algorithm \fIalgor\fR and password \fIpass\fR of length
100 \&\fIpasslen\fR, returning an encoded object in \fIobj\fR. If \fIzbuf\fR is nonzero then
101 the buffer containing the input encoding will be zeroed after the encrypt.
102 .PP
103 Functions ending in \fB_ex()\fR allow for a library context \fIctx\fR and property query
104 \&\fIpropq\fR to be used to select algorithm implementations.
105 .SH "RETURN VALUES"
106 .IX Header "RETURN VALUES"
107 \&\fBPKCS12_item_decrypt_d2i()\fR and \fBPKCS12_item_decrypt_d2i_ex()\fR return the decrypted
108 object or NULL if an error occurred.
109 .PP
110 \&\fBPKCS12_item_i2d_encrypt()\fR and \fBPKCS12_item_i2d_encrypt_ex()\fR return the encrypted
111 data as an ASN.1 Octet String or NULL if an error occurred.
112 .SH "SEE ALSO"
113 .IX Header "SEE ALSO"
114 \&\fBPKCS12_pbe_crypt_ex\fR\|(3),
115 \&\fBPKCS8_encrypt_ex\fR\|(3)
116 .SH HISTORY
117 .IX Header "HISTORY"
118 \&\fBPKCS12_item_decrypt_d2i_ex()\fR and \fBPKCS12_item_i2d_encrypt_ex()\fR were added in OpenSSL 3.0.
119 .SH COPYRIGHT
120 .IX Header "COPYRIGHT"
121 Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
122 .PP
123 Licensed under the Apache License 2.0 (the "License"). You may not use
124 this file except in compliance with the License. You can obtain a copy
125 in the file LICENSE in the source distribution or at
126 <https://www.openssl.org/source/license.html>.