Default pem_password_cb that prompts on the terminal (or copies userdata).
Declared in <openssl/pem.h>
int
PEM_def_callback(
char* buf,
int num,
int rwflag,
void* userdata);
Password length written to buf, or 0 on failure / empty input.
| Name | Description |
|---|---|
| buf | Destination buffer for the password bytes. |
| num | Capacity of buf in bytes. |
| rwflag | 0 when reading/decrypting, non-zero when writing/encrypting. |
| userdata | Optional default password string, or NULL to prompt. |