Callback that supplies a passphrase when reading or writing encrypted PEM.
Declared in <openssl/types.h>
typedef int pem_password_cb(char*, int, int, void*);
Number of password bytes written to buf (excluding NUL), or 0 on failure.
| 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. |