Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
OpenSSL::X509::Extension::AuthorityInfoAccess#ocsp_uris
() -> ::Array[::String]?
ocsp_uris
ext/openssl/lib/openssl/x509.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/ext/openssl/lib/openssl/x509.rb, line 177
def ocsp_uris
aia_asn1 = parse_aia_asn1
return nil if aia_asn1.nil?
ocsp = aia_asn1.value.select do |authority_info_access|
authority_info_access.value.first.value == "OCSP"
end
ocsp&.map(&:value)&.map(&:last)&.map(&:value)
end
Get the URIs for OCSP from the certificate’s authority information access extension exteension, as described in RFC5280 Section 4.2.2.1.
Returns an array of strings or nil or raises ASN1::ASN1Error.