Hi,
I’m trying to get WEBrick to run a https site but I get the following
error (it seems after keys have been generated for the cert).
[email protected]:/# ruby sslserver.rb [2000-01-06 18:38:03] INFO WEBrick
1.3.1
[2000-01-06 18:38:03] INFO ruby 1.8.5 (2006-08-25) [mips-linux]
…++++++
…++++++
/usr/lib/ruby/1.8/webrick/ssl.rb:65:in create_self_signed_cert': undefined method
create_extension’ for
#OpenSSL::X509::ExtensionFactory:0x2ae594b8 (NoMethodError)
from /usr/lib/ruby/1.8/webrick/ssl.rb:106:in setup_ssl_context' from /usr/lib/ruby/1.8/webrick/ssl.rb:90:in
listen’
from /usr/lib/ruby/1.8/webrick/server.rb:63:in initialize' from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in
initialize’
from sslserver.rb:5:in `new’
from sslserver.rb:5
The script is the HTTPS Server example from http://www.webrick.org/ with
modified DocumentRoot:
[email protected]:/# cat sslserver.rb
#!/usr/local/bin/ruby
require ‘webrick’
require ‘webrick/https’
s = WEBrick::HTTPServer.new(
:Port => 2000,
:DocumentRoot => “/”,
:SSLEnable => true,
:SSLVerifyClient => ::OpenSSL::SSL::VERIFY_NONE,
:SSLCertName => [ [“C”,“JP”], [“O”,“WEBrick.Org”], [“CN”, “WWW”] ]
)
trap(“INT”){ s.shutdown }
s.start
Thank you for any help!
Best, Bjorn