1 | =pod
|
---|
2 |
|
---|
3 | =head1 NAME
|
---|
4 |
|
---|
5 | PKCS12_item_decrypt_d2i, PKCS12_item_decrypt_d2i_ex,
|
---|
6 | PKCS12_item_i2d_encrypt, PKCS12_item_i2d_encrypt_ex - PKCS12 item
|
---|
7 | encrypt/decrypt functions
|
---|
8 |
|
---|
9 | =head1 SYNOPSIS
|
---|
10 |
|
---|
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 |
|
---|
32 | =head1 DESCRIPTION
|
---|
33 |
|
---|
34 | PKCS12_item_decrypt_d2i() and PKCS12_item_decrypt_d2i_ex() decrypt an octet
|
---|
35 | string containing an ASN.1 encoded object using the algorithm I<algor> and
|
---|
36 | password I<pass> of length I<passlen>. If I<zbuf> is nonzero then the output
|
---|
37 | buffer will zeroed after the decrypt.
|
---|
38 |
|
---|
39 | PKCS12_item_i2d_encrypt() and PKCS12_item_i2d_encrypt_ex() encrypt an ASN.1
|
---|
40 | object I<it> using the algorithm I<algor> and password I<pass> of length
|
---|
41 | I<passlen>, returning an encoded object in I<obj>. If I<zbuf> is nonzero then
|
---|
42 | the buffer containing the input encoding will be zeroed after the encrypt.
|
---|
43 |
|
---|
44 | Functions ending in _ex() allow for a library context I<ctx> and property query
|
---|
45 | I<propq> to be used to select algorithm implementations.
|
---|
46 |
|
---|
47 | =head1 RETURN VALUES
|
---|
48 |
|
---|
49 | PKCS12_item_decrypt_d2i() and PKCS12_item_decrypt_d2i_ex() return the decrypted
|
---|
50 | object or NULL if an error occurred.
|
---|
51 |
|
---|
52 | PKCS12_item_i2d_encrypt() and PKCS12_item_i2d_encrypt_ex() return the encrypted
|
---|
53 | data as an ASN.1 Octet String or NULL if an error occurred.
|
---|
54 |
|
---|
55 | =head1 SEE ALSO
|
---|
56 |
|
---|
57 | L<PKCS12_pbe_crypt_ex(3)>,
|
---|
58 | L<PKCS8_encrypt_ex(3)>
|
---|
59 |
|
---|
60 | =head1 HISTORY
|
---|
61 |
|
---|
62 | PKCS12_item_decrypt_d2i_ex() and PKCS12_item_i2d_encrypt_ex() were added in OpenSSL 3.0.
|
---|
63 |
|
---|
64 | =head1 COPYRIGHT
|
---|
65 |
|
---|
66 | Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
|
---|
67 |
|
---|
68 | Licensed under the Apache License 2.0 (the "License"). You may not use
|
---|
69 | this file except in compliance with the License. You can obtain a copy
|
---|
70 | in the file LICENSE in the source distribution or at
|
---|
71 | L<https://www.openssl.org/source/license.html>.
|
---|
72 |
|
---|
73 | =cut
|
---|