aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-05-22 08:47:20 +1200
committerGitHub <noreply@github.com>2021-05-22 08:47:20 +1200
commit05e1c015d64cc2a2f99d8d85586e6d48c725e30c (patch)
tree77eabc40563238b7d2541548f0b2fd8a1fba2d67 /lib
parent964d8368f2d26eda3a58d9586a51a9289ef0d87f (diff)
downloadruby-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.rb4
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