Issue #4879 has been reported by Akio Tajima.

----------------------------------------
Bug #4879: test_new(OpenSSL::TestPKeyRSA) fails on Win32
http://redmine.ruby-lang.org/issues/4879

Author: Akio Tajima
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 1.9.3
ruby -v: ruby 1.9.3dev (2011-06-13) [i386-mswin32_100]


??????????????
openssl???test_pkey_rsa.rb:48 ???fail??????????Visual C++10 ???????????????????

  1) Failure:
test_new(OpenSSL::TestPKeyRSA) [C:/Users/arton/Documents/ruby/trunk/test/openssl/test_pkey_rsa.rb:48]:
<[]> expected but was
<["error:0906D06C:PEM routines:PEM_read_bio:no start line"]>.

????????????試????????????常??????????????
?????????????????????????????????????Ruby????????????????????????????????????????????????????????????????????????
irb(main):001:0> require 'openssl'
=> true
irb(main):002:0> key = OpenSSL::PKey::RSA.new 512
=> -----BEGIN RSA PRIVATE KEY-----
MIIBOgIBAAJBAMuc7mPnOVmPweq1XMZrOZaOMVoTCX88fsU4460qF0me4S+yGL90
(??????)
-----END RSA PRIVATE KEY-----

irb(main):003:0> pem  = key.public_key.to_pem
=> "-----BEGIN PUBLIC KEY-----\nMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMuc7mPnOVmPweq1
XMZrOZaOMVoTCX88\nfsU4460qF0me4S+yGL902+yR5Gv2R6B4QvE5EnxGY5zD9t355+IKaQMCAwEAAQ
==\n-----END PUBLIC KEY-----\n"
irb(main):004:0> OpenSSL::PKey::RSA.new pem
=> -----BEGIN PUBLIC KEY-----
MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMuc7mPnOVmPweq1XMZrOZaOMVoTCX88
fsU4460qF0me4S+yGL902+yR5Gv2R6B4QvE5EnxGY5zD9t355+IKaQMCAwEAAQ==
-----END PUBLIC KEY-----

irb(main):005:0> OpenSSL.errors
=> []

???????????????????test_new???????????設??????????????????????読???????????????????????次?????????test_new????????????????????????????
  def test_new
    $stderr.puts OpenSSL.errors.inspect
    $stderr.flush
    key = OpenSSL::PKey::RSA.new 512
    pem  = key.public_key.to_pem
    OpenSSL::PKey::RSA.new pem
    assert_equal([], OpenSSL.errors)
  end

??????????修正????????fail?????????????????????????????????????????以????????????????????????試????????????常????????????????????
.........................................................["error:0D07803A:asn1 e
ncoding routines:ASN1_ITEM_EX_D2I:nested asn1 error"]...(??????)

OpenSSL???1.0.0a???????

irb(main):001:0> require 'openssl'
=> true
irb(main):002:0> OpenSSL::OPENSSL_VERSION
=> "OpenSSL 1.0.0a 1 Jun 2010"

????????????????????????????


-- 
http://redmine.ruby-lang.org