Module: Chef::Resource::SslCertificate::Cert

Included in:
Chef::Resource::SslCertificate
Defined in:
libraries/resource_ssl_certificate_cert.rb

Overview

ssl_certificate Chef Resource cert related methods.

Constant Summary collapse

ATTRS =
%w(
  cert_name
  cert_dir
  cert_path
  cert_source
  cert_bag
  cert_item
  cert_item_key
  cert_encrypted
  cert_secret_file
  cert_content
  subject_alternate_names
  extended_key_usage
  ca_cert_path
  ca_key_path
  ca_key_passphrase
).freeze
SOURCES =
%w(
  attribute
  data_bag
  chef_vault
  file
  self_signed
  with_ca
).freeze

Instance Method Summary collapse

Instance Method Details

#ca_cert_path(arg = nil) ⇒ Object

CA cert public methods


122
123
124
# File 'libraries/resource_ssl_certificate_cert.rb', line 122

def ca_cert_path(arg = nil)
  set_or_return(:ca_cert_path, arg, kind_of: String)
end

#ca_key_passphrase(arg = nil) ⇒ Object


130
131
132
# File 'libraries/resource_ssl_certificate_cert.rb', line 130

def ca_key_passphrase(arg = nil)
  set_or_return(:ca_key_passphrase, arg, kind_of: String)
end

#ca_key_path(arg = nil) ⇒ Object


126
127
128
# File 'libraries/resource_ssl_certificate_cert.rb', line 126

def ca_key_path(arg = nil)
  set_or_return(:ca_key_path, arg, kind_of: String)
end

#cert_bag(arg = nil) ⇒ Object


88
89
90
# File 'libraries/resource_ssl_certificate_cert.rb', line 88

def cert_bag(arg = nil)
  set_or_return(:cert_bag, arg, kind_of: String)
end

#cert_content(arg = nil) ⇒ Object


108
109
110
# File 'libraries/resource_ssl_certificate_cert.rb', line 108

def cert_content(arg = nil)
  set_or_return(:cert_content, arg, kind_of: String)
end

#cert_dir(arg = nil) ⇒ Object


76
77
78
# File 'libraries/resource_ssl_certificate_cert.rb', line 76

def cert_dir(arg = nil)
  set_or_return(:cert_dir, arg, kind_of: String)
end

#cert_encrypted(arg = nil) ⇒ Object


100
101
102
# File 'libraries/resource_ssl_certificate_cert.rb', line 100

def cert_encrypted(arg = nil)
  set_or_return(:cert_encrypted, arg, kind_of: [TrueClass, FalseClass])
end

#cert_item(arg = nil) ⇒ Object


92
93
94
# File 'libraries/resource_ssl_certificate_cert.rb', line 92

def cert_item(arg = nil)
  set_or_return(:cert_item, arg, kind_of: String)
end

#cert_item_key(arg = nil) ⇒ Object


96
97
98
# File 'libraries/resource_ssl_certificate_cert.rb', line 96

def cert_item_key(arg = nil)
  set_or_return(:cert_item_key, arg, kind_of: String)
end

#cert_name(arg = nil) ⇒ Object


72
73
74
# File 'libraries/resource_ssl_certificate_cert.rb', line 72

def cert_name(arg = nil)
  set_or_return(:cert_name, arg, kind_of: String, required: true)
end

#cert_path(arg = nil) ⇒ Object


80
81
82
# File 'libraries/resource_ssl_certificate_cert.rb', line 80

def cert_path(arg = nil)
  set_or_return(:cert_path, arg, kind_of: String, required: true)
end

#cert_secret_file(arg = nil) ⇒ Object


104
105
106
# File 'libraries/resource_ssl_certificate_cert.rb', line 104

def cert_secret_file(arg = nil)
  set_or_return(:cert_secret_file, arg, kind_of: String)
end

#cert_source(arg = nil) ⇒ Object


84
85
86
# File 'libraries/resource_ssl_certificate_cert.rb', line 84

def cert_source(arg = nil)
  set_or_return(:cert_source, arg, kind_of: String)
end

#extended_key_usage(arg = nil) ⇒ Object


116
117
118
# File 'libraries/resource_ssl_certificate_cert.rb', line 116

def extended_key_usage(arg = nil)
  set_or_return(:extended_key_usage, arg, kind_of: Array)
end

#initialize_cert_defaultsObject


68
69
70
# File 'libraries/resource_ssl_certificate_cert.rb', line 68

def initialize_cert_defaults
  initialize_attribute_defaults(Cert::ATTRS)
end

#subject_alternate_names(arg = nil) ⇒ Object


112
113
114
# File 'libraries/resource_ssl_certificate_cert.rb', line 112

def subject_alternate_names(arg = nil)
  set_or_return(:subject_alternate_names, arg, kind_of: Array)
end