ruby/ext/openssl
KJ Tsanaktsidis 63e9eaa5be [ruby/openssl] Fix test_create_with_mac_iter accidently setting keytype not maciter
This test was accidentally passing the value 2048 into the keytype
parameter of PKCS12_create, not the mac_iter parameter (because it had
one too many `nil`s in the call). This value is invalid, and will make
OpenSSL perform an out-of-bounds read which is caught when compiling
with ASAN.

This commit fixes the tests, and also adds some validation to
PKCS12.create to make sure any keytype passed is actually valid. Since
there only two valid keytype constants, and the whole feature is an
export-grade crypto era thing only ever supported by old MSIE, it seems
far more likely that code in the whild is using keytype similarly by
mistake rather than as intended. So this validation might catch that.

47028686d2
2024-06-05 00:45:53 +00:00
..
lib [ruby/openssl] Fix performance regression in do_write(s) 2024-05-02 16:24:36 +09:00
depend ruby tool/update-deps --fix 2024-04-27 21:55:28 +09:00
extconf.rb [ruby/openssl] Revert "Always respect the openssl prefix chosen by truffle/openssl-prefix on TruffleRuby" 2024-03-20 11:44:13 +00:00
History.md [ruby/openssl] History.md: Escape Markdown syntax Italic "*". [ci skip] 2023-11-25 10:05:24 +00:00
openssl.gemspec [ruby/openssl] Ruby/OpenSSL 3.2.0 2023-09-21 20:01:23 +00:00
openssl_missing.c
openssl_missing.h
ossl.c [ruby/openssl] Remove OSSL_DEBUG compile-time option 2023-09-06 19:20:57 +09:00
ossl.h [ruby/openssl] add OpenSSL Provider support 2023-06-19 17:45:51 +09:00
ossl_asn1.c [ruby/openssl] asn1: check error return from i2d_ASN1_TYPE() 2024-05-02 07:17:35 +00:00
ossl_asn1.h
ossl_bio.c
ossl_bio.h
ossl_bn.c [ruby/openssl] Implement Write Barrier for all OpenSSL types 2023-06-19 01:57:09 +09:00
ossl_bn.h
ossl_cipher.c [ruby/openssl] cipher: fix buffer overflow in Cipher#update 2024-05-02 16:26:11 +09:00
ossl_cipher.h
ossl_config.c [ruby/openssl] Implement Write Barrier for all OpenSSL types 2023-06-19 01:57:09 +09:00
ossl_config.h
ossl_digest.c [ruby/openssl] Add OpenSSL::Digest.digests to get a list of available digests 2024-04-30 15:05:50 +00:00
ossl_digest.h
ossl_engine.c [ruby/openssl] Implement Write Barrier for all OpenSSL types 2023-06-19 01:57:09 +09:00
ossl_engine.h
ossl_hmac.c [ruby/openssl] Implement Write Barrier for all OpenSSL types 2023-06-19 01:57:09 +09:00
ossl_hmac.h
ossl_kdf.c Use www.rfc-editor.org for RFC text. 2024-03-28 11:44:45 +09:00
ossl_kdf.h
ossl_ns_spki.c Use www.rfc-editor.org for RFC text. 2024-03-28 11:44:45 +09:00
ossl_ns_spki.h
ossl_ocsp.c [ruby/openssl] Fix OCSP documentation 2023-09-06 19:26:27 +09:00
ossl_ocsp.h
ossl_pkcs7.c [ruby/openssl] Add to_text for PKCS7 and Timestamp::Response 2024-05-08 09:39:13 +00:00
ossl_pkcs7.h
ossl_pkcs12.c [ruby/openssl] Fix test_create_with_mac_iter accidently setting keytype not maciter 2024-06-05 00:45:53 +00:00
ossl_pkcs12.h
ossl_pkey.c [ruby/openssl] ossl_pkey.c: Workaround: Decode with non-zero selections. 2023-08-28 12:05:33 +09:00
ossl_pkey.h [ruby/openssl] Constify when building with OpenSSL 3 2022-12-23 09:39:15 +09:00
ossl_pkey_dh.c [ruby/openssl] [DOC] enhance RDoc for exporting pkeys 2023-08-16 14:48:40 +09:00
ossl_pkey_dsa.c [ruby/openssl] [DOC] enhance RDoc for exporting pkeys 2023-08-16 14:48:40 +09:00
ossl_pkey_ec.c [ruby/openssl] [DOC] enhance RDoc for exporting pkeys 2023-08-16 14:48:40 +09:00
ossl_pkey_rsa.c [ruby/openssl] [DOC] enhance RDoc for exporting pkeys 2023-08-16 14:48:40 +09:00
ossl_provider.c [ruby/openssl] add OpenSSL Provider support 2023-06-19 17:45:51 +09:00
ossl_provider.h [ruby/openssl] add OpenSSL Provider support 2023-06-19 17:45:51 +09:00
ossl_rand.c
ossl_rand.h
ossl_ssl.c [ruby/openssl] read: don't clear buffer when nothing can be read 2024-05-05 08:00:00 +00:00
ossl_ssl.h
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] Add to_text for PKCS7 and Timestamp::Response 2024-05-08 09:39:13 +00:00
ossl_ts.h
ossl_x509.c
ossl_x509.h
ossl_x509attr.c [ruby/openssl] Implement Write Barrier for all OpenSSL types 2023-06-19 01:57:09 +09:00
ossl_x509cert.c [ruby/openssl] Implement Write Barrier for all OpenSSL types 2023-06-19 01:57:09 +09:00
ossl_x509crl.c [ruby/openssl] Implement Write Barrier for all OpenSSL types 2023-06-19 01:57:09 +09:00
ossl_x509ext.c [ruby/openssl] x509ext: let X509::ExtensionFactory#create_ext take a dotted OID string 2023-09-06 19:30:32 +09:00
ossl_x509name.c [ruby/openssl] Implement Write Barrier for all OpenSSL types 2023-06-19 01:57:09 +09:00
ossl_x509req.c [ruby/openssl] Implement Write Barrier for all OpenSSL types 2023-06-19 01:57:09 +09:00
ossl_x509revoked.c [ruby/openssl] Implement Write Barrier for all OpenSSL types 2023-06-19 01:57:09 +09:00
ossl_x509store.c [ruby/openssl] Implement Write Barrier for all OpenSSL types 2023-06-19 01:57:09 +09:00