File tree Expand file tree Collapse file tree 5 files changed +18
-0
lines changed
Expand file tree Collapse file tree 5 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,16 @@ Notable changes
5050 [[ GitHub #141 ]] ( https://github.com/ruby/openssl/pull/141 )
5151
5252
53+ Version 3.1.3
54+ =============
55+
56+ Bug fixes
57+ ---------
58+
59+ * Fix missing NULL check for ` EVP_PKEY_get0() ` functions with OpenSSL 3.x.
60+ [[ GitHub #957 ]] ( https://github.com/ruby/openssl/pull/957 )
61+
62+
5363Version 3.1.2
5464=============
5565
Original file line number Diff line number Diff line change 2121 EVP_PKEY *_pkey; \
2222 GetPKeyDH((obj), _pkey); \
2323 (dh) = EVP_PKEY_get0_DH(_pkey); \
24+ if ((dh) == NULL) \
25+ ossl_raise(eDHError, "failed to get DH from EVP_PKEY"); \
2426} while (0)
2527
2628/*
Original file line number Diff line number Diff line change 2121 EVP_PKEY *_pkey; \
2222 GetPKeyDSA((obj), _pkey); \
2323 (dsa) = EVP_PKEY_get0_DSA(_pkey); \
24+ if ((dsa) == NULL) \
25+ ossl_raise(eDSAError, "failed to get DSA from EVP_PKEY"); \
2426} while (0)
2527
2628static inline int
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ static const rb_data_type_t ossl_ec_point_type;
2222 EVP_PKEY *_pkey; \
2323 GetPKeyEC(obj, _pkey); \
2424 (key) = EVP_PKEY_get0_EC_KEY(_pkey); \
25+ if ((key) == NULL) \
26+ ossl_raise(eECError, "failed to get EC_KEY from EVP_PKEY"); \
2527} while (0)
2628
2729#define GetECGroup (obj , group ) do { \
Original file line number Diff line number Diff line change 2121 EVP_PKEY *_pkey; \
2222 GetPKeyRSA((obj), _pkey); \
2323 (rsa) = EVP_PKEY_get0_RSA(_pkey); \
24+ if ((rsa) == NULL) \
25+ ossl_raise(eRSAError, "failed to get RSA from EVP_PKEY"); \
2426} while (0)
2527
2628static inline int
You can’t perform that action at this time.
0 commit comments