class method
OpenSSL::X509::Certificate.load
(::String filename, ?::Module | bool) -> bool
OpenSSL::X509::Certificate.load(string) → [certs...]
OpenSSL::X509::Certificate.load(file) → [certs...]
ext/openssl/ossl_x509cert.c
View on GitHub ↗
static VALUE
ossl_x509_load(VALUE klass, VALUE buffer)
{
BIO *in = ossl_obj2bio(&buffer);
return rb_ensure(load_chained_certificates, (VALUE)in, load_chained_certificates_ensure, (VALUE)in);
}
Read the chained certificates from the given input. Supports both PEM and DER encoded certificates.
PEM is a text format and supports more than one certificate.
DER is a binary format and only supports one certificate.
If the file is empty, or contains only unrelated data, an OpenSSL::X509::CertificateError exception will be raised.