Sha256: f642cc945ec01a0b4c26aa92253ea5e65aec37522ebc3a6432a130ec102e076f
Contents?: true
Size: 516 Bytes
Versions: 36
Compression:
Stored size: 516 Bytes
Contents
require "stud/temporary" module LogStashTest class Certicate attr_reader :ssl_key, :ssl_cert def initialize @ssl_cert = Stud::Temporary.pathname("ssl_certificate") @ssl_key = Stud::Temporary.pathname("ssl_key") system("openssl req -x509 -batch -nodes -newkey rsa:2048 -keyout #{ssl_key} -out #{ssl_cert} -subj /CN=localhost > /dev/null 2>&1") end end class << self def certificate Certicate.new end def random_port rand(2000..10000) end end end
Version data entries
36 entries across 36 versions & 2 rubygems