1PKCS12_ITEM_DECRYPT_D2I(3ossl) OpenSSL PKCS12_ITEM_DECRYPT_D2I(3ossl)
2
3
4
6 PKCS12_item_decrypt_d2i, PKCS12_item_decrypt_d2i_ex,
7 PKCS12_item_i2d_encrypt, PKCS12_item_i2d_encrypt_ex - PKCS12 item
8 encrypt/decrypt functions
9
11 #include <openssl/pkcs12.h>
12
13 void *PKCS12_item_decrypt_d2i(const X509_ALGOR *algor, const ASN1_ITEM *it,
14 const char *pass, int passlen,
15 const ASN1_OCTET_STRING *oct, int zbuf);
16 void *PKCS12_item_decrypt_d2i_ex(const X509_ALGOR *algor, const ASN1_ITEM *it,
17 const char *pass, int passlen,
18 const ASN1_OCTET_STRING *oct, int zbuf,
19 OSSL_LIB_CTX *libctx,
20 const char *propq);
21 ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt(X509_ALGOR *algor,
22 const ASN1_ITEM *it,
23 const char *pass, int passlen,
24 void *obj, int zbuf);
25 ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt_ex(X509_ALGOR *algor,
26 const ASN1_ITEM *it,
27 const char *pass, int passlen,
28 void *obj, int zbuf,
29 OSSL_LIB_CTX *ctx,
30 const char *propq);
31
33 PKCS12_item_decrypt_d2i() and PKCS12_item_decrypt_d2i_ex() decrypt an
34 octet string containing an ASN.1 encoded object using the algorithm
35 algor and password pass of length passlen. If zbuf is nonzero then the
36 output buffer will zeroed after the decrypt.
37
38 PKCS12_item_i2d_encrypt() and PKCS12_item_i2d_encrypt_ex() encrypt an
39 ASN.1 object it using the algorithm algor and password pass of length
40 passlen, returning an encoded object in obj. If zbuf is nonzero then
41 the buffer containing the input encoding will be zeroed after the
42 encrypt.
43
44 Functions ending in _ex() allow for a library context ctx and property
45 query propq to be used to select algorithm implementations.
46
48 PKCS12_item_decrypt_d2i() and PKCS12_item_decrypt_d2i_ex() return the
49 decrypted object or NULL if an error occurred.
50
51 PKCS12_item_i2d_encrypt() and PKCS12_item_i2d_encrypt_ex() return the
52 encrypted data as an ASN.1 Octet String or NULL if an error occurred.
53
55 PKCS12_pbe_crypt_ex(3), PKCS8_encrypt_ex(3)
56
58 PKCS12_item_decrypt_d2i_ex() and PKCS12_item_i2d_encrypt_ex() were
59 added in OpenSSL 3.0.
60
62 Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
63
64 Licensed under the Apache License 2.0 (the "License"). You may not use
65 this file except in compliance with the License. You can obtain a copy
66 in the file LICENSE in the source distribution or at
67 <https://www.openssl.org/source/license.html>.
68
69
70
713.1.1 2023-08-31 PKCS12_ITEM_DECRYPT_D2I(3ossl)