kemal/src/kemal/ssl.cr

18 lines
310 B
Crystal
Raw Normal View History

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