diff options
Diffstat (limited to 'ext/openssl/ossl.h')
-rw-r--r-- | ext/openssl/ossl.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h index 5b2f6e11b9..25f2c857a8 100644 --- a/ext/openssl/ossl.h +++ b/ext/openssl/ossl.h @@ -77,11 +77,6 @@ extern "C" { # include <openssl/ocsp.h> #endif -/* OpenSSL requires passwords for PEM-encoded files to be at least four - * characters long - */ -#define OSSL_MIN_PWD_LEN 4 - /* * Common Module */ @@ -146,8 +141,14 @@ do{\ }while(0) /* - * our default PEM callback + * Our default PEM callback */ +/* Convert the argument to String and validate the length. Note this may raise. */ +VALUE ossl_pem_passwd_value(VALUE); +/* Can be casted to pem_password_cb. If a password (String) is passed as the + * "arbitrary data" (typically the last parameter of PEM_{read,write}_ + * functions), uses the value. If not, but a block is given, yields to it. + * If not either, fallbacks to PEM_def_callback() which reads from stdin. */ int ossl_pem_passwd_cb(char *, int, int, void *); /* |