PKCS12_item_i2d_encrypt_ex

Encode an ASN.1 object and encrypt the result using a library context.

Synopsis

Declared in <openssl/pkcs12.h>

ASN1_OCTET_STRING*
PKCS12_item_i2d_encrypt_ex(
    X509_ALGOR* algor,
    ASN1_ITEM const* it,
    char const* pass,
    int passlen,
    void* obj,
    int zbuf,
    OSSL_LIB_CTX* ctx,
    char const* propq);

Return Value

Encrypted data as an ASN.1 octet string, or NULL on error.

Parameters

NameDescription
algorPBE algorithm identifier.
itASN.1 item descriptor for obj.
passPassphrase for encryption.
passlenLength of pass, or -1 to use strlen().
objObject to encode and encrypt.
zbufIf nonzero, zero the plaintext encoding buffer after encryption.
ctxLibrary context for algorithm fetching, or NULL for default.
propqProperty query for algorithm fetching, or NULL.