2016-12-03 22:43:30 +00:00
|
|
|
module Kemal
|
2016-01-13 20:22:34 +00:00
|
|
|
class SSL
|
|
|
|
getter context
|
|
|
|
|
|
|
|
def initialize
|
2016-06-14 21:18:00 +00:00
|
|
|
@context = OpenSSL::SSL::Context::Server.new
|
2016-01-13 20:22:34 +00:00
|
|
|
end
|
|
|
|
|
2017-08-24 20:32:43 +00:00
|
|
|
def key_file=(key_file : String)
|
2016-01-13 20:22:34 +00:00
|
|
|
@context.private_key = key_file
|
|
|
|
end
|
|
|
|
|
2017-08-24 20:32:43 +00:00
|
|
|
def cert_file=(cert_file : String)
|
2016-01-13 20:22:34 +00:00
|
|
|
@context.certificate_chain = cert_file
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|