problem with ssl and webrick ...

Discussion in 'Ruby' started by Karl-Heinz Wild, Jun 20, 2004.

  1. --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,
    :port => 443,
    :SSLEnable => true,
    #:SSLVerifyClient => ::OpenSSL::SSL::VERITY_NONE,
    #:SSLCertName => [ [ 'C','LI' ], ['O','servername'], ['CN','WWW'] ],
    :DocumentRoot => 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--
     
    Karl-Heinz Wild, Jun 20, 2004
    #1
    1. Advertising

  2. Karl-Heinz Wild

    Eric Hodel Guest

    --nVYOjVWOcH+Ezkzp
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable

    Karl-Heinz Wild () 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,
    > :port =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'] ],
    > :DocumentRoot =3D> ROOTPATH + "/htdocs" )


    > # ruby server-test.rb

    [snip]

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

    --=20
    Eric Hodel - - 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+o5VH7BoyJwN6ms+csACbB2CC
    VYq5Dl+S4Pos5kCWKz79idU=
    =zFfO
    -----END PGP SIGNATURE-----

    --nVYOjVWOcH+Ezkzp--
     
    Eric Hodel, Jun 20, 2004
    #2
    1. Advertising

  3. 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,
    >> :port => 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
     
    Karl-Heinz Wild, Jun 20, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lloyd Zusman
    Replies:
    2
    Views:
    432
  2. Magnus Bodin

    SSL session id context in WEBrick

    Magnus Bodin, Mar 29, 2005, in forum: Ruby
    Replies:
    0
    Views:
    139
    Magnus Bodin
    Mar 29, 2005
  3. Pavel Smerk
    Replies:
    3
    Views:
    162
    Michal Suchanek
    Aug 15, 2006
  4. Mike Houghton

    WEBrick::HTTPServer and SSL

    Mike Houghton, Feb 2, 2007, in forum: Ruby
    Replies:
    3
    Views:
    257
    Eric Hodel
    Feb 4, 2007
  5. Aaron Smith

    WEBrick::Daemon and WEBrick

    Aaron Smith, Mar 9, 2007, in forum: Ruby
    Replies:
    2
    Views:
    340
    Aaron Smith
    Mar 18, 2007
Loading...

Share This Page