aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_pkey.c
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-07-04 15:35:25 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-10-16 21:37:00 +0900
commit1dd7c25d53eca4ec7965bb9b9cf5e2b837555686 (patch)
treec0a05f0c5477336ea7da1b4c2f90d8705b53d9ef /ext/openssl/ossl_pkey.c
parente9deede7aef43ee6079571638faf973f7fc67d32 (diff)
downloadruby-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/openssl/ossl_pkey.c')
-rw-r--r--ext/openssl/ossl_pkey.c21
1 files changed, 0 insertions, 21 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