diff options
author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-04-08 09:26:54 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-04-08 09:26:54 +0000 |
commit | 0c25a62834bee7ad2e92464f4ac71538cddbe275 (patch) | |
tree | f96428613017306fc8b0e628a7be4b2e2001b438 /ext/openssl/ossl_pkey.h | |
parent | b5c627e2df4db84f9d2dfcf196ee84024b10ff45 (diff) |
* ext/openssl/ossl_ssl.c: add callbacks to OpenSSL::SSL::SSLContexts.
- SSLContext#client_cert_cb=(aProc). it is called when a client
certificate is requested by a server and no certificate was not
set for the SSLContext. it must return an Array which includes
OpenSSL::X509::Certificate and OpenSSL::PKey::RSA/DSA objects.
- SSLContext#tmp_dh_callback=(aProc). it is called in key
exchange with DH algorithm. it must return an OpenSSL::PKey::DH
object.
* ext/openssl/ossl_ssl.c (ossl_sslctx_set_ciphers): ignore the
argument if it's nil.
* ext/openssl/ossl_pkey.c
(GetPrivPKeyPtr, ossl_pkey_sign): should call rb_funcall first.
(DupPrivPKeyPtr): new function.
* ext/openssl/ossl_pkey_dh.c: add default DH parameters.
* ext/openssl/ossl_pkey.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_pkey.h')
-rw-r--r-- | ext/openssl/ossl_pkey.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/openssl/ossl_pkey.h b/ext/openssl/ossl_pkey.h index 189573546e..db4d3cf19d 100644 --- a/ext/openssl/ossl_pkey.h +++ b/ext/openssl/ossl_pkey.h @@ -38,7 +38,7 @@ void ossl_generate_cb(int, int, void *); VALUE ossl_pkey_new(EVP_PKEY *); VALUE ossl_pkey_new_from_file(VALUE); EVP_PKEY *GetPKeyPtr(VALUE); -/*EVP_PKEY *DupPKeyPtr(VALUE);*/ +EVP_PKEY *DupPKeyPtr(VALUE); EVP_PKEY *GetPrivPKeyPtr(VALUE); EVP_PKEY *DupPrivPKeyPtr(VALUE); void Init_ossl_pkey(void); @@ -66,6 +66,8 @@ void Init_ossl_dsa(void); */ extern VALUE cDH; extern VALUE eDHError; +extern DH *OSSL_DEFAULT_DH_512; +extern DH *OSSL_DEFAULT_DH_1024; VALUE ossl_dh_new(EVP_PKEY *); void Init_ossl_dh(void); @@ -104,10 +106,10 @@ static VALUE ossl_##keytype##_set_##name(VALUE self, VALUE bignum) \ return bignum; \ } -#define DEF_OSSL_PKEY_BN(class, keytype, name) \ -do { \ +#define DEF_OSSL_PKEY_BN(class, keytype, name) \ +do { \ rb_define_method(class, #name, ossl_##keytype##_get_##name, 0); \ - rb_define_method(class, #name "=", ossl_##keytype##_set_##name, 1); \ + rb_define_method(class, #name "=", ossl_##keytype##_set_##name, 1);\ } while (0) #endif /* _OSSL_PKEY_H_ */ |