diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2021-05-22 08:47:20 +1200 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2021-07-18 17:44:55 +0900 |
commit | 1146a94aeea7d2ea1ead3bfcbddd0f4de696abe6 (patch) | |
tree | ea3cf733e6c7e7c141b6ffd1c2b89a7392498a93 /ext/openssl/lib | |
parent | a01daab656a3d32b52bd236503e3d9aebaf39483 (diff) | |
download | ruby-1146a94aeea7d2ea1ead3bfcbddd0f4de696abe6.tar.gz |
[ruby/openssl] Implement `Certificate.load` to load certificate chain. (https://github.com/ruby/openssl/pull/441)
* Add feature for loading the chained certificate into Certificate array.
https://github.com/ruby/openssl/commit/05e1c015d6
Co-authored-by: Sao I Kuan <saoikuan@gmail.com>
Diffstat (limited to 'ext/openssl/lib')
-rw-r--r-- | ext/openssl/lib/openssl/x509.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/openssl/lib/openssl/x509.rb b/ext/openssl/lib/openssl/x509.rb index 6771b90c1a..367a899e21 100644 --- a/ext/openssl/lib/openssl/x509.rb +++ b/ext/openssl/lib/openssl/x509.rb @@ -338,6 +338,10 @@ module OpenSSL q.text 'not_after='; q.pp self.not_after } end + + def self.load_file(path) + load(File.binread(path)) + end end class CRL |