Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
OpenSSL::X509::Store#add_cert
(::OpenSSL::X509::Certificate certificate) -> self
store.add_cert(cert) → self
ext/openssl/ossl_x509store.c
View on GitHub ↗
static VALUE
ossl_x509store_add_cert(VALUE self, VALUE arg)
{
X509_STORE *store;
X509 *cert;
cert = GetX509CertPtr(arg); /* NO NEED TO DUP */
GetX509Store(self, store);
if (X509_STORE_add_cert(store, cert) != 1)
ossl_raise(eX509StoreError, "X509_STORE_add_cert");
return self;
}
Adds the OpenSSL::X509::Certificate cert to the certificate store.
See also the man page X509_STORE_add_cert(3).