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

openssl: fix acesssor functions for RSA and DH in openssl_missing.h

* ext/openssl/openssl_missing.h (DH_set0_pqg, RSA_set0_key):
  DH_set0_pqg() allows 'q' to be NULL. Fix a typo in RSA_set0_key().
  Fixes r55285.  [ruby-core:75225] [Feature #12324]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
rhe 2016-06-14 12:35:28 +00:00
parent 1bec294ba7
commit 8dd0a046a9
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,9 @@
Tue Jun 14 21:35:00 2016 Kazuki Yamaguchi <k@rhe.jp>
* ext/openssl/openssl_missing.h (DH_set0_pqg, RSA_set0_key):
DH_set0_pqg() allows 'q' to be NULL. Fix a typo in RSA_set0_key().
Fixes r55285. [ruby-core:75225] [Feature #12324]
Mon Jun 14 10:19:00 2016 Kenta Murata <mrkn@mrkn.jp>
* NEWS: describe Integer#digits.

View file

@ -201,7 +201,7 @@ static inline int _type##_set0_##_group(_type *obj, BIGNUM *a1, BIGNUM *a2, BIGN
#if !defined(OPENSSL_NO_RSA)
IMPL_PKEY_GETTER(RSA, rsa)
IMPL_KEY_ACCESSOR3(RSA, key, n, e, d, (n == obj->n || e == obj->e || (obj->d && e == obj->d)))
IMPL_KEY_ACCESSOR3(RSA, key, n, e, d, (n == obj->n || e == obj->e || (obj->d && d == obj->d)))
IMPL_KEY_ACCESSOR2(RSA, factors, p, q, (p == obj->p || q == obj->q))
IMPL_KEY_ACCESSOR3(RSA, crt_params, dmp1, dmq1, iqmp, (dmp1 == obj->dmp1 || dmq1 == obj->dmq1 || iqmp == obj->iqmp))
#endif
@ -215,7 +215,7 @@ IMPL_KEY_ACCESSOR3(DSA, pqg, p, q, g, (p == obj->p || q == obj->q || g == obj->g
#if !defined(OPENSSL_NO_DH)
IMPL_PKEY_GETTER(DH, dh)
IMPL_KEY_ACCESSOR2(DH, key, pub_key, priv_key, (pub_key == obj->pub_key || (obj->priv_key && priv_key == obj->priv_key)))
IMPL_KEY_ACCESSOR3(DH, pqg, p, q, g, (p == obj->p || q == obj->q || g == obj->g))
IMPL_KEY_ACCESSOR3(DH, pqg, p, q, g, (p == obj->p || obj->q && q == obj->q || g == obj->g))
static inline ENGINE *DH_get0_engine(DH *dh) { return dh->engine; }
#endif