Class: SimpleCA::SignCSR

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_ca/sign_csr.rb

Constant Summary collapse

THREE_YEARS =
365.25 * 24 * 60 * 60

Instance Method Summary collapse

Constructor Details

#initialize(root, key) ⇒ SignCSR

Returns a new instance of SignCSR.



5
6
7
8
# File 'lib/simple_ca/sign_csr.rb', line 5

def initialize root, key
  @root = root
  @key = key
end

Instance Method Details

#call(csr) ⇒ Object



10
11
12
# File 'lib/simple_ca/sign_csr.rb', line 10

def call csr
  sign_cert(OpenSSL::X509::Certificate.new, csr)
end