1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

11 commits

Author SHA1 Message Date
matz
25c50cd193 * ruby.h (struct RString): embed small strings.
(RSTRING_LEN): defined for accessing string members.
  (RSTRING_PTR): ditto.

* string.c: use RSTRING_LEN and RSTRING_PTR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 10:30:33 +00:00
gotoyuzo
246f5cfe67 * ext/openssl/ossl_pkey.h, ossl_pkey_rsa.c, ossl_pkey_dsa.c:
an instance variable "private" is added to OpenSSL::PKey class.
  this ivar is a flag that shows whether there is a private key
  in the instance.

* ext/openssl/ossl_engine.c: (ossl_engine_load_privkey): set private
  key flag.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-18 22:56:11 +00:00
gotoyuzo
c4b83bb93f * ext/openssl/ossl_engine.c (ossl_engine_s_by_id):
OpenSSL::Engine.by_id calls given block before calling ENGINE_init
  (block parameter is the return value of this method itself).
  this functionality is useful to load dynamic shared engines.

        require "openssl"
        pkcs11 = OpenSSL::Engine.by_id("dynamic"){|e|
          e.ctrl_cmd("SO_PATH", "/usr/lib/opensc/engine_pkcs11.so")
          e.ctrl_cmd("LIST_ADD", "1")
          e.ctrl_cmd("LOAD")
        }
        pkcs11.ctrl_cmd("PIN", "secret")
        key = pkcs11.load_private_key

* ext/openssl/ossl_engine.c (ossl_engine_ctrl_cmd): new method
  OpenSSL::Engine#ctrl_cmd. it wraps ENGINE_ctrl_cmd_string.

* ext/openssl/ossl_engine.c (ossl_engine_get_cmds): new method
  OpenSSL::Engine#cmds. it returms engine command definitions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-07 08:29:47 +00:00
gotoyuzo
b502b16eb6 * ext/openssl/ossl_engine.c (ossl_engine_s_load): should check
OPENSSL_NO_STATIC_ENGINE.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-23 07:50:17 +00:00
gotoyuzo
0a57886cca * ext/openssl/ossl_engine.c (ossl_engine_s_load): should return
value. [ruby-dev:25971]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-31 05:09:24 +00:00
gotoyuzo
fc3e402dde * ext/openssl/ossl_engine.c (ossl_engine_s_load): should not raise
error even if the specified engine could not be loaded. (Dynamic
  engines don't have fixed name to load.)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-30 21:01:04 +00:00
matz
2edbb9d0f8 * lib/set.rb (Set#==): [ruby-dev:25206]
* ext/openssl/ossl_digest.c (ossl_digest_initialize): [ruby-dev:25198]

* utf8.c (utf8_is_mbc_ambiguous): [ruby-talk:123561]

* utf8.c (utf8_mbc_to_normalize): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-15 06:35:55 +00:00
gotoyuzo
f58812a7e2 * lib/ext/openssl/extconf.rb: add check for some engine functions
unavailable in OpenSSL-0.9.6.

* lib/ext/openssl/ossl_engine.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-05 13:58:02 +00:00
gotoyuzo
56db4c8fb0 ENGINE_load_public_key takes four arguments since OpenSSL-0.9.7
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02 14:26:43 +00:00
gotoyuzo
08ba967d26 ENGINE_load_private_key takes four arguments since OpenSSL-0.9.7
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02 13:56:05 +00:00
gotoyuzo
d77b606edd * ext/openssl/ossl_engine.c: add a new module OpenSSL::Engine.
it supports OpenSSL hardware cryptographic engine interface.

* ext/openssl/ossl_engine.h: ditto.

* ext/openssl/MANIFEST: add ossl_engine.c and ossl_engine.h.

* ext/openssl/extconf.rb: add check for openssl/engine.h.

* ext/openssl/ossl.c: call Init_ossl_engine().

* ext/openssl/ossl.h: include openssl/engine.h.

* ext/openssl/ossl_pkey_{rsa,dsa,dh}.c: check if underlying
  EVP_PKEY referes engine.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-02 08:47:11 +00:00