From: Luis Lavena Date: 2012-08-10T10:09:01+09:00 Subject: [ruby-core:47098] Re: [ruby-trunk - Bug #6830] test failure test_constants(OpenSSL::TestConfig) [/ruby/test/openssl/test_config.rb:27] on Mac + homebrew --20cf307f3b8e2abeca04c6defd74 Content-Type: text/plain; charset=ISO-8859-1 Test is wrong, it should check if default file exist and skip if doesn't. On windows if you change location openssl dlls it will cause an error, as explained in the github links I've included before. So is not a problem of platform but a hardcoded path on openssl. Sorry for top posting. Sent from mobile. On Aug 9, 2012 9:52 PM, "usa (Usaku NAKAMURA)" wrote: > > Issue #6830 has been updated by usa (Usaku NAKAMURA). > > > On my Windows box, OpenSSL::Config::DEFAULT_CONFIG_FILE returns the right > path. > So, this problem is not platform dependent but user's environment > dependent. > Therefore, I can't agree r36666. > ---------------------------------------- > Bug #6830: test failure test_constants(OpenSSL::TestConfig) > [/ruby/test/openssl/test_config.rb:27] on Mac + homebrew > https://bugs.ruby-lang.org/issues/6830#change-28750 > > Author: kosaki (Motohiro KOSAKI) > Status: Closed > Priority: Normal > Assignee: MartinBosslet (Martin Bosslet) > Category: ext > Target version: 2.0.0 > ruby -v: ruby 2.0.0dev (2012-08-04 trunk 36617) [x86_64-darwin12.0.0] > > > When using homebrew openssl, following test failure was happen. > > 2) Failure: > test_constants(OpenSSL::TestConfig) > [/Users/kosaki/ruby/git/test/openssl/test_config.rb:27]: > Exception raised: > <# /usr/local/openssl-1.0.1c/openssl.cnf>>. > > rough analysis. > > homebrew installed openssl library to "/usr/local/Cellar/openssl/1.0.1c". > > and following program output "/usr/local/openssl-1.0.1c". > > -------------------------- > int main() > { > printf("%s\n", X509_get_default_cert_area()); > return 0; > } > -------------------------- > > > I'm using following configure options. > > configure \ > --disable-install-doc \ > --with-baseruby=/usr/bin/ruby \ > --prefix=${HOME}/local/ruby-${suffix} \ > --program-suffix=-${suffix} \ > --with-openssl-dir=/usr/local/Cellar/openssl/1.0.1c > > > So, I have several questions. > > 1) Is X509_get_default_cert_area() a right way to obtain configuration > file? > 2) If yes, is this homebrew bug? > 3) if yes, should we skip this test when using Mac OS X? > > > > > -- > http://bugs.ruby-lang.org/ > > --20cf307f3b8e2abeca04c6defd74 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Test is wrong, it should check if default file exist and skip if doesn&#= 39;t.

On windows if you change location openssl dlls it will cause an error, a= s explained in the github links I've included before.

So is not a problem of platform but a hardcoded path on openssl.

Sorry for top posting. Sent from mobile.

On Aug 9, 2012 9:52 PM, "usa (Usaku NAKAMUR= A)" <usa@garbagecollect.jp= > wrote:

Issue #6830 has been updated by usa (Usaku NAKAMURA).


On my Windows box, OpenSSL::Config::DEFAULT_CONFIG_FILE returns the right p= ath.
So, this problem is not platform dependent but user's environment depen= dent.
Therefore, I can't agree r36666.
----------------------------------------
Bug #6830: test failure test_constants(OpenSSL::TestConfig) [/ruby/test/ope= nssl/test_config.rb:27] on Mac + homebrew
https://bugs.ruby-lang.org/issues/6830#change-28750

Author: kosaki (Motohiro KOSAKI)
Status: Closed
Priority: Normal
Assignee: MartinBosslet (Martin Bosslet)
Category: ext
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-08-04 trunk 36617) [x86_64-darwin12.0.0]


When using homebrew openssl, following test failure was happen.

=A0 2) Failure:
test_constants(OpenSSL::TestConfig) [/Users/kosaki/ruby/git/test/openssl/te= st_config.rb:27]:
Exception raised:
<#<Errno::ENOENT: No such file or directory - /usr/local/openssl-1.0.= 1c/openssl.cnf>>.

rough analysis.

homebrew installed openssl library to "/usr/local/Cellar/openssl/1.0.1= c".

and following program output "/usr/local/openssl-1.0.1c".

--------------------------
int main()
{
=A0 printf("%s\n", =A0 =A0 =A0 =A0X509_get_default_cert_area());<= br> =A0 return 0;
}
--------------------------


I'm using following configure options.

configure \
=A0 =A0 --disable-install-doc \
=A0 =A0 --with-baseruby=3D/usr/bin/ruby \
=A0 =A0 --prefix=3D${HOME}/local/ruby-${suffix} \
=A0 =A0 --program-suffix=3D-${suffix} \
=A0 =A0 --with-openssl-dir=3D/usr/local/Cellar/openssl/1.0.1c


So, I have several questions.

1) Is X509_get_default_cert_area() a right way to obtain configuration file= ?
2) If yes, is this homebrew bug?
3) if yes, should we skip this test when using Mac OS X?




--
http://bugs.ruby-l= ang.org/

--20cf307f3b8e2abeca04c6defd74--