apache-config-generator/lib/apache/ssl.rb

18 lines
438 B
Ruby
Raw Permalink Normal View History

2010-05-10 21:43:34 +00:00
module Apache
module SSL
def enable_ssl_engine(options = {})
2010-05-18 17:20:49 +00:00
self + [ '', "SSLEngine on" ]
2010-05-12 18:24:35 +00:00
options.each do |key, value|
2010-05-19 13:48:33 +00:00
value = value.quoteize
2010-05-12 18:24:35 +00:00
case key
2010-05-10 21:43:34 +00:00
when :certificate_file, :certificate_key_file
2010-05-18 16:43:57 +00:00
self << "SSL#{key.apachify} #{value}"
2010-05-10 21:43:34 +00:00
when :ca_certificate_file
2010-05-12 18:24:35 +00:00
self << "SSLCACertificateFile #{value}"
2010-05-10 21:43:34 +00:00
end
end
2010-05-19 13:48:33 +00:00
blank_line!
2010-05-10 21:43:34 +00:00
end
end
end