Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > problem with ssl and webrick ...

Reply
Thread Tools

problem with ssl and webrick ...

 
 
Karl-Heinz Wild
Guest
Posts: n/a
 
      06-19-2004
--Apple-Mail-1--139677948
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed

I have a problem with running webrick as https server.
is this a kown problem or something i could correct in my
script.

s = HTTPServer.new(
:ServerName => SERVERNAME,
ort => 443,
:SSLEnable => true,
#:SSLVerifyClient => ::OpenSSL::SSL::VERITY_NONE,
#:SSLCertName => [ [ 'C','LI' ], ['O','servername'], ['CN','WWW'] ],
ocumentRoot => ROOTPATH + "/htdocs" )


# ruby server-test.rb
[2004-06-20 01:49:42] INFO WEBrick 1.3.1
[2004-06-20 01:49:42] INFO ruby 1.8.1 (2004-05-02) [i386-freebsd5]
...............++++++
.................................................. ......................
.................................................. ......................
.....++++++
/usr/local/lib/ruby/1.8/webrick/ssl.rb:55:in `initialize': cannot
convert nil into String (TypeError)
from /usr/local/lib/ruby/1.8/webrick/ssl.rb:55:in `new'
from /usr/local/lib/ruby/1.8/webrick/ssl.rb:55:in
`create_self_signed_cert'
from /usr/local/lib/ruby/1.8/webrick/ssl.rb:106:in
`setup_ssl_context'
from /usr/local/lib/ruby/1.8/webrick/ssl.rb:90:in `listen'
from /usr/local/lib/ruby/1.8/webrick/server.rb:63:in
`initialize'
from /usr/local/lib/ruby/1.8/webrick/httpserver.rb:24:in
`initialize'
from server-test.rb:114:in `new'
from server-test.rb:114
--Apple-Mail-1--139677948--


 
Reply With Quote
 
 
 
 
Eric Hodel
Guest
Posts: n/a
 
      06-20-2004
--nVYOjVWOcH+Ezkzp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Karl-Heinz Wild ((E-Mail Removed)) wrote:

> I have a problem with running webrick as https server.
> is this a kown problem or something i could correct in my
> script.
>=20
> s =3D HTTPServer.new(
> :ServerName =3D> SERVERNAME,
> ort =3D> 443,
> :SSLEnable =3D> true,

^^^^
This requires the next two lines to be un-commented.

> #:SSLVerifyClient =3D> ::OpenSSL::SSL::VERITY_NONE,

^^^^^^^^^^^
This should be VERIFY_NONE

> #:SSLCertName =3D> [ [ 'C','LI' ], ['O','servername'], ['CN','WWW'] ],
> ocumentRoot =3D> ROOTPATH + "/htdocs" )


> # ruby server-test.rb

[snip]

I cannot dupe your problem, the snippet above is incomplete.

--=20
Eric Hodel - http://www.velocityreviews.com/forums/(E-Mail Removed) - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04


--nVYOjVWOcH+Ezkzp
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQFA1O07MypVHHlsnwQRAq3HAKDfNi1buNL+o5VH7BoyJw N6ms+csACbB2CC
VYq5Dl+S4Pos5kCWKz79idU=
=zFfO
-----END PGP SIGNATURE-----

--nVYOjVWOcH+Ezkzp--


 
Reply With Quote
 
 
 
 
Karl-Heinz Wild
Guest
Posts: n/a
 
      06-20-2004
On 20.06.2004, at 03:49, Eric Hodel wrote:

>> I have a problem with running webrick as https server.
>> is this a kown problem or something i could correct in my
>> script.
>>
>> s = HTTPServer.new(
>> :ServerName => SERVERNAME,
>> ort => 443,
>> :SSLEnable => true,

> ^^^^
> This requires the next two lines to be un-commented.
>
>> #:SSLVerifyClient => ::OpenSSL::SSL::VERITY_NONE,

> ^^^^^^^^^^^
> This should be VERIFY_NONE


So stupid. That's the fault. Thank you very much.

-
Karl-Heinz



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WEBrick: Has anyone used WEBrick::Session? Lloyd Zusman Ruby 2 02-21-2013 06:49 PM
WEBrick::Daemon and WEBrick Aaron Smith Ruby 2 03-18-2007 03:47 AM
WEBrick::HTTPServer and SSL Mike Houghton Ruby 3 02-04-2007 12:51 AM
webrick, ssl and non-ssl on the same port Pavel Smerk Ruby 3 08-15-2006 05:51 PM
SSL session id context in WEBrick Magnus Bodin Ruby 0 03-29-2005 01:12 PM



Advertisments