diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2021-05-22 08:47:20 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-22 08:47:20 +1200 |
commit | 05e1c015d64cc2a2f99d8d85586e6d48c725e30c (patch) | |
tree | 77eabc40563238b7d2541548f0b2fd8a1fba2d67 /lib | |
parent | 964d8368f2d26eda3a58d9586a51a9289ef0d87f (diff) | |
download | ruby-openssl-05e1c015d64cc2a2f99d8d85586e6d48c725e30c.tar.gz |
Implement `Certificate.load` to load certificate chain. (#441)
* Add feature for loading the chained certificate into Certificate array.
Co-authored-by: Sao I Kuan <saoikuan@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/openssl/x509.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/openssl/x509.rb b/lib/openssl/x509.rb index 6771b90c..367a899e 100644 --- a/lib/openssl/x509.rb +++ b/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 |