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
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
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