diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-07-04 15:35:25 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-10-16 21:37:00 +0900 |
commit | 1dd7c25d53eca4ec7965bb9b9cf5e2b837555686 (patch) | |
tree | c0a05f0c5477336ea7da1b4c2f90d8705b53d9ef /ext | |
parent | e9deede7aef43ee6079571638faf973f7fc67d32 (diff) | |
download | ruby-openssl-1dd7c25d53eca4ec7965bb9b9cf5e2b837555686.tar.gz |
pkey: remove unused ossl_pkey_new_from_file() function
The function was added by e10f4de2aeec ("for compatibility with old
SSLSocket", 2001-11-16) and is no longer used since 902312feaae7
(2002-12-22).
Diffstat (limited to 'ext')
-rw-r--r-- | ext/openssl/ossl_pkey.c | 21 | ||||
-rw-r--r-- | ext/openssl/ossl_pkey.h | 1 |
2 files changed, 0 insertions, 22 deletions
diff --git a/ext/openssl/ossl_pkey.c b/ext/openssl/ossl_pkey.c index 70b97fc9..9e262da0 100644 --- a/ext/openssl/ossl_pkey.c +++ b/ext/openssl/ossl_pkey.c @@ -100,27 +100,6 @@ ossl_pkey_new(EVP_PKEY *pkey) UNREACHABLE; } -VALUE -ossl_pkey_new_from_file(VALUE filename) -{ - FILE *fp; - EVP_PKEY *pkey; - - rb_check_safe_obj(filename); - if (!(fp = fopen(StringValueCStr(filename), "r"))) { - ossl_raise(ePKeyError, "%s", strerror(errno)); - } - rb_fd_fix_cloexec(fileno(fp)); - - pkey = PEM_read_PrivateKey(fp, NULL, ossl_pem_passwd_cb, NULL); - fclose(fp); - if (!pkey) { - ossl_raise(ePKeyError, NULL); - } - - return ossl_pkey_new(pkey); -} - /* * call-seq: * OpenSSL::PKey.read(string [, pwd ]) -> PKey diff --git a/ext/openssl/ossl_pkey.h b/ext/openssl/ossl_pkey.h index 218f2ebb..e3b723cd 100644 --- a/ext/openssl/ossl_pkey.h +++ b/ext/openssl/ossl_pkey.h @@ -48,7 +48,6 @@ int ossl_generate_cb_2(int p, int n, BN_GENCB *cb); void ossl_generate_cb_stop(void *ptr); VALUE ossl_pkey_new(EVP_PKEY *); -VALUE ossl_pkey_new_from_file(VALUE); EVP_PKEY *GetPKeyPtr(VALUE); EVP_PKEY *DupPKeyPtr(VALUE); EVP_PKEY *GetPrivPKeyPtr(VALUE); |