ruby/ext/openssl
Kazuki Yamaguchi 1b731c1f43 [ruby/openssl] pkey: avoid calling i2d_PUBKEY family on an incomplete key
Call ossl_pkey_check_public_key() to ensure that
EVP_PKEY_missing_parameters() passes. This check should be cheap.

DSA#{to_der,to_pem,export,to_s} and PKey#{public_to_der,public_to_pem}
cause a segfault if the receiver is an empty DSA instance with no
parameters set.

Fixes <https://github.com/ruby/openssl/issues/845>.

5aeed935e5
2025-01-29 17:14:41 +00:00
..
lib [ruby/openssl] pkey: change PKey::{RSA,DSA,DH}#params to use nil for missing parameters 2025-01-23 01:45:52 +09:00
depend Update ext/openssl/depend 2024-11-06 21:59:38 +09:00
extconf.rb [ruby/openssl] ts: use TS_VERIFY_CTX_set0_{store,certs}() on OpenSSL 3.4 2025-01-23 01:45:52 +09:00
History.md [ruby/openssl] Ruby/OpenSSL 3.3.0 2024-12-22 03:33:03 +09:00
openssl.gemspec [ruby/openssl] Ruby/OpenSSL 3.3.0 2024-12-22 03:33:03 +09:00
openssl_missing.h [ruby/openssl] ts: use TS_VERIFY_CTX_set0_{store,certs}() on OpenSSL 3.4 2025-01-23 01:45:52 +09:00
ossl.c [ruby/openssl] Require OpenSSL 1.1.0 or later 2025-01-20 17:12:57 +00:00
ossl.h [ruby/openssl] Call Init_ossl_*() functions in alphabetical order 2024-12-07 07:55:47 +00:00
ossl_asn1.c [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_asn1.h [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_bio.c [ruby/openssl] Fix references to the license text 2024-06-08 10:59:17 +00:00
ossl_bio.h [ruby/openssl] Fix references to the license text 2024-06-08 10:59:17 +00:00
ossl_bn.c [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_bn.h [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_cipher.c [ruby/openssl] cipher: make output buffer String independent 2024-12-22 03:33:03 +09:00
ossl_cipher.h [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_config.c [ruby/openssl] make configs shareable when frozen 2024-12-07 07:52:02 +00:00
ossl_config.h [ruby/openssl] Fix references to the license text 2024-06-08 10:59:17 +00:00
ossl_digest.c [ruby/openssl] digest: remove optional parameter from OpenSSL::Digest#finish 2024-12-22 03:33:03 +09:00
ossl_digest.h [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_engine.c [ruby/openssl] Require OpenSSL 1.1.0 or later 2025-01-20 17:12:57 +00:00
ossl_engine.h [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_hmac.c [ruby/openssl] Require OpenSSL 1.1.1 or later 2025-01-21 18:14:14 +00:00
ossl_hmac.h [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_kdf.c [ruby/openssl] Require OpenSSL 1.1.0 or later 2025-01-20 17:12:57 +00:00
ossl_kdf.h
ossl_ns_spki.c [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_ns_spki.h [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_ocsp.c [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_ocsp.h [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_pkcs7.c [ruby/openssl] pkcs7: remove unnecessary const cast 2025-01-20 17:12:55 +00:00
ossl_pkcs7.h [ruby/openssl] ts: avoid using OpenSSL::PKCS7's internals 2024-12-07 07:55:46 +00:00
ossl_pkcs12.c [ruby/openssl] Require OpenSSL 1.1.0 or later 2025-01-20 17:12:57 +00:00
ossl_pkcs12.h [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_pkey.c [ruby/openssl] pkey: avoid calling i2d_PUBKEY family on an incomplete key 2025-01-29 17:14:41 +00:00
ossl_pkey.h [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_pkey_dh.c [ruby/openssl] pkey: implement PKey::{RSA,DSA,DH}#params in Ruby 2025-01-23 01:45:51 +09:00
ossl_pkey_dsa.c [ruby/openssl] pkey: implement PKey::{RSA,DSA,DH}#params in Ruby 2025-01-23 01:45:51 +09:00
ossl_pkey_ec.c [ruby/openssl] Require OpenSSL 1.1.0 or later 2025-01-20 17:12:57 +00:00
ossl_pkey_rsa.c [ruby/openssl] pkey: implement PKey::{RSA,DSA,DH}#params in Ruby 2025-01-23 01:45:51 +09:00
ossl_provider.c [ruby/openssl] Fix references to the license text 2024-06-08 10:59:17 +00:00
ossl_provider.h [ruby/openssl] add OpenSSL Provider support 2023-06-19 17:45:51 +09:00
ossl_rand.c [ruby/openssl] Require OpenSSL 1.1.1 or later 2025-01-21 18:14:14 +00:00
ossl_rand.h [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_ssl.c [ruby/openssl] ssl: fix SSLSocket#sysread leaking locktmp String on timeout 2025-01-22 16:45:19 +00:00
ossl_ssl.h [ruby/openssl] Fix references to the license text 2024-06-08 10:59:17 +00:00
ossl_ssl_session.c [ruby/openssl] Implement Write Barrier for all OpenSSL types 2023-06-19 01:57:09 +09:00
ossl_ts.c [ruby/openssl] ts: use TS_VERIFY_CTX_set0_{store,certs}() on OpenSSL 3.4 2025-01-23 01:45:52 +09:00
ossl_ts.h [ruby/openssl] Fix references to the license text 2024-06-08 10:59:17 +00:00
ossl_x509.c [ruby/openssl] Require OpenSSL 1.1.1 or later 2025-01-21 18:14:14 +00:00
ossl_x509.h [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_x509attr.c [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_x509cert.c [ruby/openssl] Use X509_ALGOR_get0() accessor for X509_ALGOR 2025-01-21 18:17:06 +00:00
ossl_x509crl.c [ruby/openssl] Use X509_ALGOR_get0() accessor for X509_ALGOR 2025-01-21 18:17:06 +00:00
ossl_x509ext.c [ruby/openssl] Require OpenSSL 1.1.0 or later 2025-01-20 17:12:57 +00:00
ossl_x509name.c [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_x509req.c [ruby/openssl] Use X509_ALGOR_get0() accessor for X509_ALGOR 2025-01-21 18:17:06 +00:00
ossl_x509revoked.c [ruby/openssl] Mark variables and functions as static whenever possible 2024-12-07 07:55:47 +00:00
ossl_x509store.c [ruby/openssl] Require OpenSSL 1.1.1 or later 2025-01-21 18:14:14 +00:00