Class: EzCrypto::Name

Class | EzCrypto::Name
In: | lib/ezsig.rb
Parent: | Object

A handy ruby wrapper around OpenSSL‘s Name object. This was created to make it really easy to extract information out of the certificate.

### Methods

[] c cn common_name country email l locality method_missing name new o organisation organisational_unit organization organizational_unit ou province st state to_s

### Public Class methods

new(name)

Initializes the Name object with the underlying OpenSSL Name object. You generally do not need to use this. Rather use the Certificates subject or issuer methods.

### Public Instance methods

[](attr_key)

Lookup fields in the certificate.

c()

Alias for country

cn()

Alias for common_name

common_name()

The common name. For SSL this means the domain name. For personal certificates it is the name.

country()

The 2 letter country code of the name

email()

Returns the email if present in the name

l()

Alias for locality

locality()

The locality

method_missing(method)
name()

Alias for common_name

o()

Alias for organization

organisation()

Alias for organization

organisational_unit()

Alias for organizational_unit

organization()

The Organization

organizational_unit()

The Organizational Unit

ou()

Alias for organizational_unit

province()

Alias for state

st()

Alias for state

state()

The state or province code

to_s()

Returns the full name object in classic horrible X500 format.

[Validate]