Class: R509::Cert::Extensions::CRLDistributionPoints

Inherits:
OpenSSL::X509::Extension
  • Object
show all
Includes:
GeneralNamesMixin, ValidationMixin
Defined in:
lib/r509/cert/extensions/crl_distribution_points.rb

Overview

RFC 5280 Description (see: www.ietf.org/rfc/rfc5280.txt)

The CRL distribution points extension identifies how CRL information is obtained. The extension SHOULD be non-critical, but this profile RECOMMENDS support for this extension by CAs and applications. Further discussion of CRL management is contained in Section 5.

You can use this extension to parse an existing extension for easy access to the contents or create a new one.

Constant Summary

OID =

friendly name for CDP OID

"crlDistributionPoints"

Instance Method Summary (collapse)

Constructor Details

- (CRLDistributionPoints) initialize(arg)

This method takes a hash or an existing Extension object to parse.

Examples:

R509::Cert::Extensions::CRLDistributionPoints.new(
  :value => [
    { :type => "URI", :value => "http://crl.domain.com/test.crl" }
)
name = R509::ASN1::GeneralName.new(:type => "URI", :value => "http://crl.domain.com/test.crl")
R509::Cert::Extensions::CRLDistributionPoints.new(
  :value => [name]
)

Parameters:

  • arg (Hash)

    a customizable set of options

Options Hash (arg):

  • :value (Array, R509::ASN1::GeneralNames)

    Array of hashes (see examples) or GeneralNames object

  • :critical (Boolean) — default: false


38
39
40
41
42
43
44
45
# File 'lib/r509/cert/extensions/crl_distribution_points.rb', line 38

def initialize(arg)
  if not R509::Cert::Extensions.is_extension?(arg)
    arg = build_extension(arg)
  end

  super(arg)
  parse_extension
end

Instance Method Details

- (Array<R509::Subject>) directory_names Also known as: dir_names Originally defined in module GeneralNamesMixin

Directory names

Returns:

- (Array<String>) dns_names Originally defined in module GeneralNamesMixin

DNS names

Returns:

  • (Array<String>)

    DNS names

- (Array<String>) ip_addresses Also known as: ips Originally defined in module GeneralNamesMixin

IP addresses. They will be formatted as strings (dotted quad with optional netmask for IPv4 and colon-hexadecimal with optional netmask for IPv6

Returns:

  • (Array<String>)

    IP addresses. They will be formatted as strings (dotted quad with optional netmask for IPv4 and colon-hexadecimal with optional netmask for IPv6

- (Array) names Originally defined in module GeneralNamesMixin

Array of GeneralName objects preserving order found in the extension

Returns:

  • (Array)

    array of GeneralName objects preserving order found in the extension

- (Array<String>) rfc_822_names Also known as: email_names Originally defined in module GeneralNamesMixin

Email addresses

Returns:

  • (Array<String>)

    email addresses

- (Hash) to_h

Returns:

  • (Hash)


48
49
50
51
52
53
# File 'lib/r509/cert/extensions/crl_distribution_points.rb', line 48

def to_h
  {
    :critical => self.critical?,
    :value => R509::Cert::Extensions.names_to_h(@general_names.names)
  }
end

- (YAML) to_yaml

Returns:

  • (YAML)


56
57
58
# File 'lib/r509/cert/extensions/crl_distribution_points.rb', line 56

def to_yaml
  self.to_h.to_yaml
end

- (Array<String>) uris Originally defined in module GeneralNamesMixin

URIs (not typically found in SAN extensions)

Returns:

  • (Array<String>)

    URIs (not typically found in SAN extensions)