Skip to content

Certificate#crl_uris throws exception "undefined method `value' for nil (NoMethodError)" #775

Closed
@gettalong

Description

@gettalong

I have a certificate that errors out when calling cert.crl_uris with a NoMethodError for a nil value.

Going through the code the certificate has two values in cdp_asn1. The first one has the expected tag value of 6 for the URI. The second one, however, has a tag value of 4, leading to a nil value in crl_uris. Looking at the code there might be other situations where a nil value might be included in crl_uris.

Having the nil value in crl_uris leads to an error when calling crl_uris&.map(&:value). This can be avoided by using #compact, i.e. crl_uris&.compact&.map(&:value).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions