PEM_do_header

Decrypt PEM payload bytes in place using cipher info and a password callback.

Synopsis

Declared in <openssl/pem.h>

int
PEM_do_header(
    EVP_CIPHER_INFO* cipher,
    unsigned char* data,
    long* len,
    pem_password_cb* callback,
    void* u);

Description

Deprecated: prefer PKCS#8 with PKCS#5 v2.0 PBE for new private-key storage.

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
cipherCipher and IV previously filled by PEM_get_EVP_CIPHER_INFO().
dataEncoded payload buffer; decrypted octets overwrite the same buffer.
lenOn input, length of data; on output, length of the decrypted payload.
callbackPassword callback used when cipher indicates encryption; may be NULL.
uApplication pointer forwarded to callback.