Circular require in openssl


#1

e$B0J2<$N$h$&$K!“e(Bopenssl e$B$K$O4D>u$Ne(B require
e$B$,$”$j!"7Y9p$,=P$^$9!#e(B

% ./ruby -v -ropenssl -e ‘’
ruby 1.9.2dev (2009-02-15 trunk 22317) [i686-linux]
/home/ruby/ancdata/lib/ruby/1.9.1/i686-linux/openssl.so: warning:
loading in progress, circular require considered harmful -
/home/ruby/ancdata/lib/ruby/1.9.1/openssl.rb
/home/ruby/ancdata/lib/ruby/1.9.1/openssl/ssl.rb:17: warning: loading in
progress, circular require considered harmful -
/home/ruby/ancdata/lib/ruby/1.9.1/openssl.rb
/home/ruby/ancdata/lib/ruby/1.9.1/openssl/x509.rb:17: warning: loading
in progress, circular require considered harmful -
/home/ruby/ancdata/lib/ruby/1.9.1/openssl.rb

e$B$3$l$r>C$7$?$$$N$G$9$,!"$I$&$9$k$N$,$$$$$G$7$g$&$+!#e(B

require e$B$9$k$H$-$Oe(B require ‘openssl’ e$B$H$7$J$5$$!"$H$$$&$3$He(B
e$B$K$7$F$7$^$&$N$G$"$l$P!"2<$K$D$1$?%Q%C%A$G2DG=$G$9!#e(B

e$B$?$@!"$3$l$@$He(B require “openssl/ssl” e$B$J$I$H$7$F$$$k$H$3$m$Oe(B
e$B$<$s$V=q$-49$($kI,MW$,$"$j$^$9!#E:IU$5$l$F$$$kCf$K$Oe(B
lib/net/pop.rb e$B$He(B lib/net/imap.rb e$B$,$"$j$^$7$?!#e(B

require e$B$9$k$H$3$m$r=q$-49$($J$/$F$b$$$$$h$&$K$9$k$N$be(B *.rb
e$B$J%U%!%$%k$rG$KA}$d$;$P2DG=$G$O$"$j$^$9$,!"$I$&$9$k$N$,$$$$e(B
e$B$G$9$+$M$’!#e(B

Index: ext/openssl/ossl_digest.c

— ext/openssl/ossl_digest.c (revision 22326)
+++ ext/openssl/ossl_digest.c (working copy)
@@ -233,7 +233,6 @@ ossl_digest_block_length(VALUE self)
void
Init_ossl_digest()
{

  • rb_require(“openssl”);
    rb_require(“digest”);

#if 0 /* let rdoc know about mOSSL */
Index: ext/openssl/lib/openssl/ssl.rb

— ext/openssl/lib/openssl/ssl.rb (revision 22326)
+++ ext/openssl/lib/openssl/ssl.rb (working copy)
@@ -14,7 +14,6 @@
$Id$
=end

-require “openssl”
require “openssl/buffering”
require “fcntl”

Index: ext/openssl/lib/openssl/x509.rb

— ext/openssl/lib/openssl/x509.rb (revision 22326)
+++ ext/openssl/lib/openssl/x509.rb (working copy)
@@ -14,8 +14,6 @@
$Id$
=end

-require “openssl”

module OpenSSL
module X509
class ExtensionFactory
Index: lib/net/pop.rb

— lib/net/pop.rb (revision 22326)
+++ lib/net/pop.rb (working copy)
@@ -25,7 +25,7 @@ require ‘digest/md5’
require ‘timeout’

begin

  • require “openssl/ssl”
  • require “openssl”
    rescue LoadError
    end

Index: lib/net/imap.rb

— lib/net/imap.rb (revision 22326)
+++ lib/net/imap.rb (working copy)
@@ -18,7 +18,7 @@ require “monitor”
require “digest/md5”
require “strscan”
begin

  • require “openssl/ssl”
  • require “openssl”
    rescue LoadError
    end

#2

In article removed_email_address@domain.invalid,
Tanaka A. removed_email_address@domain.invalid writes:

require e$B$9$k$H$3$m$r=q$-49$($J$/$F$b$$$$$h$&$K$9$k$N$be(B *.rb
e$B$J%U%!%$%k$rG$KA}$d$;$P2DG=$G$O$"$j$^$9$,!"$I$&$9$k$N$,$$$$e(B
e$B$G$9$+$M$’!#e(B

e$B$$$d!"G$C$F$N$O8@$$$9$.e(B (e$B0lHL2=$7$9$.e(B) e$B$G$9$M!#e(B

openssl/ssl.rb e$B$He(B openssl/x509.rb e$B$@$1BP=h$9$l$PA}$d$9%U%!%$e(B
e$B%k$Oe(B 2e$B$D$G:Q$_$^$9$+!#e(B


#3

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:38019] Re: circular require in openssl”
on Sun, 15 Feb 2009 18:56:06 +0900, Tanaka A. removed_email_address@domain.invalid
writes:

|> require e$B$9$k$H$3$m$r=q$-49$($J$/$F$b$$$$$h$&$K$9$k$N$be(B *.rb
|> e$B$J%U%!%$%k$rG$KA}$d$;$P2DG=$G$O$"$j$^$9$,!"$I$&$9$k$N$,$$$$e(B
|> e$B$G$9$+$M$’!#e(B
|
|e$B$$$d!"G$C$F$N$O8@$$$9$.e(B (e$B0lHL2=$7$9$.e(B) e$B$G$9$M!#e(B
|
|openssl/ssl.rb e$B$He(B openssl/x509.rb e$B$@$1BP=h$9$l$PA}$d$9%U%!%$e(B
|e$B%k$Oe(B 2e$B$D$G:Q$_$^$9$+!#e(B

e$BFs$D$J$iBE6($G$-$k$h$&$J!#e(B


#4

In article removed_email_address@domain.invalid,
Yukihiro M. removed_email_address@domain.invalid writes:

|openssl/ssl.rb e$B$He(B openssl/x509.rb e$B$@$1BP=h$9$l$PA}$d$9%U%!%$e(B
|e$B%k$Oe(B 2e$B$D$G:Q$_$^$9$+!#e(B

e$BFs$D$J$iBE6($G$-$k$h$&$J!#e(B

e$B$=$C$A$NJ}8~$G$d$k$J$i!"e(B

  • e$B2~L>$9$ke(B
    openssl/ssl.rb -> openssl/ssl-foo.rb e$B$H$+e(B
    openssl/x509.rb -> openssl/x509-foo.rb e$B$H$+e(B
  • require ‘openssl’ e$B$@$1$NFbMF$N%U%!%$%k$r$D$/$ke(B
    openssl/ssl.rb
    openssl/x509.rb
  • openssl e$BFb$Ne(B require e$B$rJQ$($ke(B
    openssl.rb e$B$G$Oe(B openssl/ssl-foo.rb, openssl/x509-foo.rb e$B$re(B
    require e$B$9$ke(B

e$B$H$J$k$s$G$9$,!"L>A0$O2?$,$$$$$G$9$+$M!#e(B
openssl/ssl-internal.rb e$B$H$+e(B?


#5

In article removed_email_address@domain.invalid,
Nobuyoshi N. removed_email_address@domain.invalid writes:

e$BC1$K$=$NFs$D$G$Oe(B require ‘openssl.so’ e$B$K$9$k$@$1$G$OB-$j$J$$$s$Ge(B
e$B$7$g$&$+!#e(B

e$B;n$7$F$^$;$s$,!"$$$^$^$G!"e(Bopenssl/ssl e$B$re(B require
e$B$7$F$$$?%"e(B
e$B%W%j%1!<%7%g%s$,!"e(Bopenssl/digest e$B$J$I$rMxMQ$G$-$J$/$J$C$?$je(B
e$B$7$J$$$G$7$g$&$+!#e(B

openssl.so e$B$@$1$G$J$/!“e(Bopenssl.rb e$BFb$Ne(B require
e$B$9$Y$F$re(B
openssl/ssl.rb e$B$He(B openssl/x509.rb e$B$KE83+$7$F$7$^$&$N$G$”$l$Pe(B
e$B$$$$$+$b$7$l$^$;$s!#e(B


#6

e$B$J$+$@$G$9!#e(B

At Mon, 16 Feb 2009 17:36:32 +0900,
Tanaka A. wrote in [ruby-dev:38027]:

|openssl/ssl.rb e$B$He(B openssl/x509.rb e$B$@$1BP=h$9$l$PA}$d$9%U%!%$e(B
|e$B%k$Oe(B 2e$B$D$G:Q$_$^$9$+!#e(B

e$BFs$D$J$iBE6($G$-$k$h$&$J!#e(B

e$B$=$C$A$NJ}8~$G$d$k$J$i!"e(B

e$BC1$K$=$NFs$D$G$Oe(B require ‘openssl.so’
e$B$K$9$k$@$1$G$OB-$j$J$$$s$Ge(B
e$B$7$g$&$+!#e(B


#7

In article removed_email_address@domain.invalid,
Tanaka A. removed_email_address@domain.invalid writes:

openssl.so e$B$@$1$G$J$/!“e(Bopenssl.rb e$BFb$Ne(B require e$B$9$Y$F$re(B
openssl/ssl.rb e$B$He(B openssl/x509.rb e$B$KE83+$7$F$7$^$&$N$G$”$l$Pe(B
e$B$$$$$+$b$7$l$^$;$s!#e(B

e$B$$$d!"$=$l$@$He(B openssl/ssl e$B$He(B openssl/x509 e$B$,Aj8_$Ke(B
require
e$B$9$k$3$H$K$J$C$A$c$$$^$9$M!#e(B

e$B$d$O$j!“6/O"7k@.J,e(B (e$B:#2s$N>l9ge(B openssl, openssl/ssl,
openssl/x509 e$B$Ne(B 3e$B$De(B) e$B$N$I$l$re(B require
e$B$7$F$b:#$^$G$HF1$8%i%$e(B
e$B%V%i%j$,%m!<%I$5$l$k$h$&$K$9$k$K$O!”$J$K$+$7$i0\F0$9$kI,MW$,e(B
e$B$"$k$h$&$K;W$$$^$9!#e(B


#8

In article removed_email_address@domain.invalid,
Nobuyoshi N. removed_email_address@domain.invalid writes:

e$B$`$7$mMxMQ$G$-$k$[$&$,$*$+$7$$5$$,$7$^$;$s$+!#e(B

e$B$=$&$+$b$7$l$^$;$s$M!#e(B


#9

e$B$J$+$@$G$9!#e(B

At Mon, 16 Feb 2009 17:58:50 +0900,
Tanaka A. wrote in [ruby-dev:38030]:

e$BC1$K$=$NFs$D$G$Oe(B require ‘openssl.so’ e$B$K$9$k$@$1$G$OB-$j$J$$$s$Ge(B
e$B$7$g$&$+!#e(B

e$B;n$7$F$^$;$s$,!"$$$^$^$G!"e(Bopenssl/ssl e$B$re(B require e$B$7$F$$$?%"e(B
e$B%W%j%1!<%7%g%s$,!"e(Bopenssl/digest e$B$J$I$rMxMQ$G$-$J$/$J$C$?$je(B
e$B$7$J$$$G$7$g$&$+!#e(B

e$B$`$7$mMxMQ$G$-$k$[$&$,$*$+$7$$5$$,$7$^$;$s$+!#e(B