Module: GenRelease::OpenSSLUtils

Extended by:
OpenSSLUtils
Included in:
OpenSSLUtils
Defined in:
lib/genRelease/commands/help_modules/OpenSSLUtils.rb

Constant Summary collapse

PUBKEY =
"id_rsa.pub"
PRIKEY =
"id_rsa"
PEM =
"rsa.pem"

Instance Method Summary collapse

Instance Method Details

#new_certification_fileObject



9
10
11
12
13
14
15
16
# File 'lib/genRelease/commands/help_modules/OpenSSLUtils.rb', line 9

def new_certification_file
  rsa = ::OpenSSL::PKey::RSA.new 2048
  p rsa.to_pem
  FileUtils::write PRIKEY, rsa.to_pem
  p rsa.public_key.to_s
  FileUtils::write PUBKEY, rsa.public_key.to_s
  FileUtils::write PEM, "#{rsa.public_key}#{rsa.to_pem}"
end