mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/openssl/ossl_pkey_dh.c (ossl_create_dh): fix typo.
patch from IWATSUKI Hiroyuki. [ruby-dev:25867] * ext/openssl/ossl_ssl.c (ossl_tmp_dh_callback): ditto. (ossl_call_tmp_dh_callback): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
726624affd
commit
0d23cc25c2
3 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
|||
Sun Mar 13 02:09:03 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||
|
||||
* ext/openssl/ossl_pkey_dh.c (ossl_create_dh): fix typo.
|
||||
patch from IWATSUKI Hiroyuki. [ruby-dev:25867]
|
||||
|
||||
* ext/openssl/ossl_ssl.c (ossl_tmp_dh_callback): ditto.
|
||||
(ossl_call_tmp_dh_callback): ditto
|
||||
|
||||
Thu Mar 10 19:10:29 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* ext/tk/tcltklib.c (lib_eventloop_ensure): mis-delete a timer handler
|
||||
|
|
|
@ -401,12 +401,12 @@ ossl_create_dh(unsigned char *p, size_t plen, unsigned char *g, size_t glen)
|
|||
{
|
||||
DH *dh;
|
||||
|
||||
if ((dh = DH_new()) == NULL) ossl_irase(eDHError, NULL);
|
||||
if ((dh = DH_new()) == NULL) ossl_raise(eDHError, NULL);
|
||||
dh->p = BN_bin2bn(p, plen, NULL);
|
||||
dh->g = BN_bin2bn(g, glen, NULL);
|
||||
if (dh->p == NULL || dh->g == NULL){
|
||||
DH_free(dh);
|
||||
ossl_irase(eDHError, NULL);
|
||||
ossl_raise(eDHError, NULL);
|
||||
}
|
||||
|
||||
return dh;
|
||||
|
|
|
@ -223,7 +223,7 @@ ossl_call_tmp_dh_callback(VALUE *args)
|
|||
dh = rb_funcall(cb, rb_intern("call"), 3, args[0], args[1], args[2]);
|
||||
pkey = GetPKeyPtr(dh);
|
||||
if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DH) return Qfalse;
|
||||
ossl_ssl_set_tmp_dh_key(args[0], dh);
|
||||
ossl_ssl_set_tmp_dh(args[0], dh);
|
||||
|
||||
return Qtrue;
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ ossl_tmp_dh_callback(SSL *ssl, int is_export, int keylength)
|
|||
(VALUE)args, &status);
|
||||
if (status || !success) return NULL;
|
||||
|
||||
return GetPKeyPtr(ossl_ssl_get_dh(obj))->pkey.dh;
|
||||
return GetPKeyPtr(ossl_ssl_get_tmp_dh(obj))->pkey.dh;
|
||||
}
|
||||
|
||||
static DH*
|
||||
|
|
Loading…
Reference in a new issue