Callback that supplies a passphrase when reading or writing encrypted PEM.

Synopsis

Declared in <openssl/types.h>

typedef int pem_password_cb(char*, int, int, void*);

Return Value

Number of password bytes written to buf (excluding NUL), or 0 on failure.

Parameters

Name

Description

buf

Output buffer that receives a NUL‐terminated password.

size

Capacity of buf in bytes.

rwflag

0 when reading (decrypt), nonzero when writing (encrypt).

userdata

Application pointer from the PEM API that invoked the callback.

Created with MrDocs