Class: Digicert::CSRGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/digicert/csr_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(common_name:, organization:, san_names: [], rsa_key: nil) ⇒ CSRGenerator

Returns a new instance of CSRGenerator.



5
6
7
8
9
10
# File 'lib/digicert/csr_generator.rb', line 5

def initialize(common_name:, organization:, san_names: [], rsa_key: nil)
  @rsa_key = rsa_key
  @common_name = common_name
  @san_names = san_names
  @organization = organization
end

Class Method Details

.generate(attributes) ⇒ Object



16
17
18
# File 'lib/digicert/csr_generator.rb', line 16

def self.generate(attributes)
  new(attributes).generate
end

Instance Method Details

#generateObject



12
13
14
# File 'lib/digicert/csr_generator.rb', line 12

def generate
  create_r509_csr.to_s
end