[MacRuby] #924: MacRuby throws an exception of "Unsupported digest algorithm (OpenSSL::Digest::MD5)."
#924: MacRuby throws an exception of "Unsupported digest algorithm (OpenSSL::Digest::MD5)." ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: joshua.ballanco@… Type: defect | Status: new Priority: major | Milestone: Component: ControlTower | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby require "openssl" require 'socket' host = "127.0.0.1" port = 0 ctx = OpenSSL::SSL::SSLContext.new() tcps = TCPServer.new(host, port) ssls = OpenSSL::SSL::SSLServer.new(tcps, ctx) }}} Result: {{{ $ macruby -v test.rb MacRuby 0.8 (ruby 1.9.2) [universal-darwin10.0, x86_64] Unsupported digest algorithm (OpenSSL::Digest::MD5). (RuntimeError) }}} Should pass Algorithm's name with EVP_get_digestbyname in GetDigestPtr().[[BR]] It seems that MacRuby pass Class name. MacRuby: {{{ $ VM_OPT_LEVEL=0 DYLD_LIBRARY_PATH=. gdb --args ./macruby -I./lib -I./ext ~/tmp/test.rb (gdb) b ossl_digest.c:43 (gdb) r Breakpoint 1, GetDigestPtr (obj=8592142624) at ossl_digest.c:43 43 md = EVP_get_digestbyname(name); (gdb) p name $1 = 0x200217840 "OpenSSL::Digest::MD5" Current language: auto; currently c (gdb) }}} Ruby 1.9.2: {{{ $ gdb --args ruby test.rb (gdb) b ossl_digest.c:43 (gdb) r Breakpoint 1, GetDigestPtr (obj=3005200) at ossl_digest.c:43 43 md = EVP_get_digestbyname(name); (gdb) p name $1 = 0x2ddb18 "MD5" (gdb) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/924> MacRuby <http://macruby.org/>
#924: MacRuby throws an exception of "Unsupported digest algorithm (OpenSSL::Digest::MD5)." ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Changes (by watson1978@…): * owner: joshua.ballanco@… => lsansonetti@… * component: ControlTower => MacRuby -- Ticket URL: <http://www.macruby.org/trac/ticket/924#comment:1> MacRuby <http://macruby.org/>
#924: MacRuby throws an exception of "Unsupported digest algorithm (OpenSSL::Digest::MD5)." ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@…): I atach a pach: {{{ #!diff diff --git a/ext/openssl/lib/openssl/digest.rb b/ext/openssl/lib/openssl/digest.rb index 1ee1faf..5dde221 100644 --- a/ext/openssl/lib/openssl/digest.rb +++ b/ext/openssl/lib/openssl/digest.rb @@ -33,11 +33,11 @@ module OpenSSL class Stub < Digest class << self def digest(data) - Digest.digest(name, data) + Digest.digest(@name, data) end def hexdigest(data) - Digest.hexdigest(name, data) + Digest.hexdigest(@name, data) end end }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/924#comment:2> MacRuby <http://macruby.org/>
#924: MacRuby throws an exception of "Unsupported digest algorithm (OpenSSL::Digest::MD5)." ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by watson1978@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: Fixed with r4570. -- Ticket URL: <http://www.macruby.org/trac/ticket/924#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby