Class: R509::Config::CAProfile

Inherits:
Object
  • Object
show all
Defined in:
lib/r509/config.rb

Overview

Provides access to configuration profiles

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (CAProfile) initialize(opts = {})

All hash options for CAProfile are optional.

Parameters:

  • opts (Hash) (defaults to: {})

    a customizable set of options

Options Hash (opts):

  • :basic_constraints (String)
  • :key_usage (Array)
  • :extended_key_usage (Array)
  • :certificate_policies (Array)
  • :ocsp_no_check (Boolean)

    Sets OCSP No Check extension in the certificate if true

  • :inhibit_any_policy (Integer)

    Sets the value of the inhibitAnyPolicy extension

  • :policy_constraints (Hash)

    Sets the value of the policyConstriants extension

  • :name_constraints (Hash)

    Sets the value of the nameConstraints extension

  • :subject_item_policy (R509::Config::SubjectItemPolicy)


29
30
31
32
33
34
35
36
37
38
39
# File 'lib/r509/config.rb', line 29

def initialize(opts = {})
  validate_basic_constraints opts[:basic_constraints]
  validate_key_usage opts[:key_usage]
  validate_extended_key_usage opts[:extended_key_usage]
  validate_certificate_policies opts[:certificate_policies]
  validate_inhibit_any_policy opts[:inhibit_any_policy]
  validate_policy_constraints opts[:policy_constraints]
  validate_name_constraints opts[:name_constraints]
  @ocsp_no_check = (opts[:ocsp_no_check] == true or opts[:ocsp_no_check] == "true")?true:false
  validate_subject_item_policy opts[:subject_item_policy]
end

Instance Attribute Details

- (Object) basic_constraints (readonly)

Returns the value of attribute basic_constraints



15
16
17
# File 'lib/r509/config.rb', line 15

def basic_constraints
  @basic_constraints
end

- (Object) certificate_policies (readonly)

Returns the value of attribute certificate_policies



15
16
17
# File 'lib/r509/config.rb', line 15

def certificate_policies
  @certificate_policies
end

- (Object) extended_key_usage (readonly)

Returns the value of attribute extended_key_usage



15
16
17
# File 'lib/r509/config.rb', line 15

def extended_key_usage
  @extended_key_usage
end

- (Object) inhibit_any_policy (readonly)

Returns the value of attribute inhibit_any_policy



15
16
17
# File 'lib/r509/config.rb', line 15

def inhibit_any_policy
  @inhibit_any_policy
end

- (Object) key_usage (readonly)

Returns the value of attribute key_usage



15
16
17
# File 'lib/r509/config.rb', line 15

def key_usage
  @key_usage
end

- (Object) name_constraints (readonly)

Returns the value of attribute name_constraints



15
16
17
# File 'lib/r509/config.rb', line 15

def name_constraints
  @name_constraints
end

- (Object) ocsp_no_check (readonly)

Returns the value of attribute ocsp_no_check



15
16
17
# File 'lib/r509/config.rb', line 15

def ocsp_no_check
  @ocsp_no_check
end

- (Object) policy_constraints (readonly)

Returns the value of attribute policy_constraints



15
16
17
# File 'lib/r509/config.rb', line 15

def policy_constraints
  @policy_constraints
end

- (Object) subject_item_policy (readonly)

Returns the value of attribute subject_item_policy



15
16
17
# File 'lib/r509/config.rb', line 15

def subject_item_policy
  @subject_item_policy
end