Actions
Bug #19828
closedSegfault when `OpenSSL::X509::Certificate#public_key=` is given a `OpenSSL::PKey::DH` object
Description
The OpenSSL bindings cause a SegFault when creating a new OpenSSL::X509::Certificate object and setting it's public_key
to the public_key
of a new OpenSSL::PKey::DH
key-pair.
Steps To Reproduce¶
#!/usr/bin/env ruby
require 'openssl'
cert = OpenSSL::X509::Certificate.new
key = OpenSSL::PKey::DH.generate(1024)
cert.public_key = key.public_key
Expected Results¶
Sets the public key.
Actual Results¶
test.rb:8: [BUG] Segmentation fault at 0x0000000000000010
ruby 3.3.0dev (2023-08-02T18:35:08Z master 32e828bb4a) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0003 p:---- s:0014 e:000013 CFUNC :public_key=
c:0002 p:0031 s:0009 E:001850 EVAL test.rb:8 [FINISH]
c:0001 p:0000 s:0003 E:002540 DUMMY [FINISH]
-- Ruby level backtrace information ----------------------------------------
test.rb:8:in `<main>'
test.rb:8:in `public_key='
-- Threading information ---------------------------------------------------
Total ractor count: 1
Ruby thread count for this ractor: 1
-- Machine register context ------------------------------------------------
RIP: 0x00007fb3144e4c24 RBP: 0x00007ffd6dbb6bb0 RSP: 0x00007ffd6dbb6b88
RAX: 0x00005599fe68ed00 RBX: 0x00005599fe68ec40 RCX: 0x00005599fe68ed00
RDX: 0x0000000000000018 RDI: 0x0000000000000000 RSI: 0x0000000000000000
R8: 0x00005599fe68ed10 R9: 0x00007fb324a59ce0 R10: 0x0000000000000040
R11: 0x0000000000000000 R12: 0x0000000000000000 R13: 0x00005599fe68ed00
R14: 0x0000000000000000 R15: 0x0000000000000001 EFL: 0x0000000000010206
-- C level backtrace information -------------------------------------------
/home/postmodern/.rubies/ruby-trunk/bin/ruby(rb_vm_bugreport+0x5c7) [0x5599fce806a7] /home/postmodern/src/ruby/vm_dump.c:772
/home/postmodern/.rubies/ruby-trunk/bin/ruby(rb_bug_for_fatal_signal+0xe8) [0x5599fcf2a4b8] /home/postmodern/src/ruby/error.c:820
/home/postmodern/.rubies/ruby-trunk/bin/ruby(sigsegv+0x4b) [0x5599fcdcdccb] /home/postmodern/src/ruby/signal.c:920
/lib64/libc.so.6(__restore_rt+0x0) [0x7fb3248c2b70]
/lib64/libcrypto.so.3(BN_is_negative+0x4) [0x7fb3144e4c24]
/lib64/libcrypto.so.3(0x7fb3144b8d08) [0x7fb3144b8d08]
/lib64/libcrypto.so.3(0x7fb31452514a) [0x7fb31452514a]
/lib64/libcrypto.so.3(X509_PUBKEY_set+0x6f) [0x7fb31464134f]
/home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/openssl.so(ossl_x509_set_public_key+0x39) [0x7fb314ac1a29] /home/postmodern/src/ruby/ext/openssl/ossl_x509cert.c:525
/home/postmodern/.rubies/ruby-trunk/bin/ruby(vm_call_cfunc_other+0x169) [0x5599fce558b9] /home/postmodern/src/ruby/vm_insnhelper.c:3462
/home/postmodern/.rubies/ruby-trunk/bin/ruby(vm_exec_core+0x117) [0x5599fce72a37] /home/postmodern/src/ruby/vm_insnhelper.c:5534
/home/postmodern/.rubies/ruby-trunk/bin/ruby(rb_vm_exec+0x344) [0x5599fce636c4] /home/postmodern/src/ruby/vm.c:2390
/home/postmodern/.rubies/ruby-trunk/bin/ruby(rb_ec_exec_node+0xa5) [0x5599fcc77785] /home/postmodern/src/ruby/eval.c:287
/home/postmodern/.rubies/ruby-trunk/bin/ruby(ruby_run_node+0x8b) [0x5599fcc7ca5b] /home/postmodern/src/ruby/eval.c:328
/home/postmodern/.rubies/ruby-trunk/bin/ruby(main+0x62) [0x5599fcc77242] ./main.c:39
-- Other runtime information -----------------------------------------------
* Loaded script: test.rb
* Loaded features:
0 enumerator.so
1 thread.rb
2 fiber.so
3 rational.so
4 complex.so
5 ruby2_keywords.rb
6 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/enc/encdb.so
7 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/enc/trans/transdb.so
8 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/rbconfig.rb
9 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/compatibility.rb
10 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/defaults.rb
11 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/deprecate.rb
12 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/errors.rb
13 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/unknown_command_spell_checker.rb
14 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/exceptions.rb
15 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/basic_specification.rb
16 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/stub_specification.rb
17 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/platform.rb
18 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/util/list.rb
19 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/version.rb
20 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/requirement.rb
21 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/specification.rb
22 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/util.rb
23 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/dependency.rb
24 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/core_ext/kernel_gem.rb
25 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/monitor.so
26 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/monitor.rb
27 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems.rb
28 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/bundled_gems.rb
29 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/rubygems/path_support.rb
30 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/error_highlight/version.rb
31 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/error_highlight/base.rb
32 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/error_highlight/formatter.rb
33 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/error_highlight/core_ext.rb
34 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/error_highlight.rb
35 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/version.rb
36 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/core_ext/name_error.rb
37 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/levenshtein.rb
38 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/jaro_winkler.rb
39 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/spell_checker.rb
40 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
41 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
42 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/spell_checkers/name_error_checkers.rb
43 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/spell_checkers/method_name_checker.rb
44 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/spell_checkers/key_error_checker.rb
45 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/spell_checkers/null_checker.rb
46 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/tree_spell_checker.rb
47 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/spell_checkers/require_path_checker.rb
48 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/spell_checkers/pattern_key_name_checker.rb
49 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean/formatter.rb
50 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/did_you_mean.rb
51 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/syntax_suggest/core_ext.rb
52 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/digest/version.rb
53 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/digest.so
54 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/digest/loader.rb
55 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/digest.rb
56 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/openssl.so
57 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/openssl/bn.rb
58 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/openssl/marshal.rb
59 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/openssl/pkey.rb
60 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/openssl/cipher.rb
61 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/openssl/digest.rb
62 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/openssl/hmac.rb
63 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/openssl/x509.rb
64 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/openssl/buffering.rb
65 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/io/nonblock.so
66 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/socket.so
67 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/socket.rb
68 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/ipaddr.rb
69 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/openssl/ssl.rb
70 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/openssl/pkcs5.rb
71 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/openssl/version.rb
72 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/openssl.rb
* Process memory map:
5599fcc41000-5599fcc72000 r--p 00000000 00:23 554309 /home/postmodern/.rubies/ruby-trunk/bin/ruby
5599fcc72000-5599fcf6f000 r-xp 00031000 00:23 554309 /home/postmodern/.rubies/ruby-trunk/bin/ruby
5599fcf6f000-5599fd0b4000 r--p 0032e000 00:23 554309 /home/postmodern/.rubies/ruby-trunk/bin/ruby
5599fd0b4000-5599fd0bf000 r--p 00473000 00:23 554309 /home/postmodern/.rubies/ruby-trunk/bin/ruby
5599fd0bf000-5599fd0c5000 rw-p 0047e000 00:23 554309 /home/postmodern/.rubies/ruby-trunk/bin/ruby
5599fd0c5000-5599fd0d9000 rw-p 00000000 00:00 0
5599fe223000-5599fe6bd000 rw-p 00000000 00:00 0 [heap]
7fb30da00000-7fb30de3d000 r--s 00000000 00:23 1740382 /usr/lib64/libcrypto.so.3.0.9
7fb30e000000-7fb30e222000 r--s 00000000 00:23 157485 /usr/lib64/libc.so.6
7fb30e400000-7fb30ffdf000 r--s 00000000 00:23 554309 /home/postmodern/.rubies/ruby-trunk/bin/ruby
7fb310000000-7fb310021000 rw-p 00000000 00:00 0
7fb310021000-7fb314000000 ---p 00000000 00:00 0
7fb3141ff000-7fb314200000 ---p 00000000 00:00 0
7fb314200000-7fb314400000 rw-p 00000000 00:00 0
7fb314400000-7fb3144ad000 r--p 00000000 00:23 1740382 /usr/lib64/libcrypto.so.3.0.9
7fb3144ad000-7fb314711000 r-xp 000ad000 00:23 1740382 /usr/lib64/libcrypto.so.3.0.9
7fb314711000-7fb3147ca000 r--p 00311000 00:23 1740382 /usr/lib64/libcrypto.so.3.0.9
7fb3147ca000-7fb314821000 r--p 003ca000 00:23 1740382 /usr/lib64/libcrypto.so.3.0.9
7fb314821000-7fb314824000 rw-p 00421000 00:23 1740382 /usr/lib64/libcrypto.so.3.0.9
7fb314824000-7fb314827000 rw-p 00000000 00:00 0
7fb314958000-7fb31495b000 r--p 00000000 00:23 1753127 /usr/lib64/libgcc_s-13-20230728.so.1
7fb31495b000-7fb314976000 r-xp 00003000 00:23 1753127 /usr/lib64/libgcc_s-13-20230728.so.1
7fb314976000-7fb31497a000 r--p 0001e000 00:23 1753127 /usr/lib64/libgcc_s-13-20230728.so.1
7fb31497a000-7fb31497b000 r--p 00021000 00:23 1753127 /usr/lib64/libgcc_s-13-20230728.so.1
7fb31497b000-7fb31497c000 rw-p 00000000 00:00 0
7fb314990000-7fb3149a0000 rw-p 00000000 00:00 0
7fb3149a1000-7fb3149a7000 r--p 00000000 00:23 554354 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/socket.so
7fb3149a7000-7fb3149c6000 r-xp 00006000 00:23 554354 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/socket.so
7fb3149c6000-7fb3149ce000 r--p 00025000 00:23 554354 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/socket.so
7fb3149ce000-7fb3149cf000 r--p 0002c000 00:23 554354 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/socket.so
7fb3149cf000-7fb3149d0000 rw-p 0002d000 00:23 554354 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/socket.so
7fb3149d0000-7fb3149e0000 rw-p 00000000 00:00 0
7fb3149e0000-7fb3149fe000 r--p 00000000 00:23 1740384 /usr/lib64/libssl.so.3.0.9
7fb3149fe000-7fb314a5b000 r-xp 0001e000 00:23 1740384 /usr/lib64/libssl.so.3.0.9
7fb314a5b000-7fb314a75000 r--p 0007b000 00:23 1740384 /usr/lib64/libssl.so.3.0.9
7fb314a75000-7fb314a7f000 r--p 00094000 00:23 1740384 /usr/lib64/libssl.so.3.0.9
7fb314a7f000-7fb314a83000 rw-p 0009e000 00:23 1740384 /usr/lib64/libssl.so.3.0.9
7fb314a83000-7fb314a98000 r--p 00000000 00:23 554347 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/openssl.so
7fb314a98000-7fb314ac9000 r-xp 00015000 00:23 554347 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/openssl.so
7fb314ac9000-7fb314adb000 r--p 00046000 00:23 554347 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/openssl.so
7fb314adb000-7fb314add000 r--p 00058000 00:23 554347 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/openssl.so
7fb314add000-7fb314adf000 rw-p 0005a000 00:23 554347 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/openssl.so
7fb314adf000-7fb314b80000 rw-p 00000000 00:00 0
7fb314b90000-7fb314c60000 rw-p 00000000 00:00 0
7fb314c60000-7fb314c61000 ---p 00000000 00:00 0
7fb314c61000-7fb314d02000 rw-p 00000000 00:00 0
7fb314d02000-7fb314d03000 ---p 00000000 00:00 0
7fb314d03000-7fb314da4000 rw-p 00000000 00:00 0
7fb314da4000-7fb314da5000 ---p 00000000 00:00 0
7fb314da5000-7fb314e46000 rw-p 00000000 00:00 0
7fb314e46000-7fb314e47000 ---p 00000000 00:00 0
7fb314e47000-7fb314ee8000 rw-p 00000000 00:00 0
7fb314ee8000-7fb314ee9000 ---p 00000000 00:00 0
7fb314ee9000-7fb314f8a000 rw-p 00000000 00:00 0
7fb314f8a000-7fb314f8b000 ---p 00000000 00:00 0
7fb314f8b000-7fb31502c000 rw-p 00000000 00:00 0
7fb31502c000-7fb31502d000 ---p 00000000 00:00 0
7fb31502d000-7fb3150ce000 rw-p 00000000 00:00 0
7fb3150ce000-7fb3150cf000 ---p 00000000 00:00 0
7fb3150cf000-7fb315170000 rw-p 00000000 00:00 0
7fb315170000-7fb315171000 ---p 00000000 00:00 0
7fb315171000-7fb315212000 rw-p 00000000 00:00 0
7fb315212000-7fb315213000 ---p 00000000 00:00 0
7fb315213000-7fb3152b4000 rw-p 00000000 00:00 0
7fb3152b4000-7fb3152b5000 ---p 00000000 00:00 0
7fb3152b5000-7fb315356000 rw-p 00000000 00:00 0
7fb315356000-7fb315357000 ---p 00000000 00:00 0
7fb315357000-7fb3153f8000 rw-p 00000000 00:00 0
7fb3153f8000-7fb3153f9000 ---p 00000000 00:00 0
7fb3153f9000-7fb31549a000 rw-p 00000000 00:00 0
7fb31549a000-7fb31549b000 ---p 00000000 00:00 0
7fb31549b000-7fb31553c000 rw-p 00000000 00:00 0
7fb31553c000-7fb31553d000 ---p 00000000 00:00 0
7fb31553d000-7fb3155de000 rw-p 00000000 00:00 0
7fb3155de000-7fb3155df000 ---p 00000000 00:00 0
7fb3155df000-7fb315680000 rw-p 00000000 00:00 0
7fb315680000-7fb315681000 ---p 00000000 00:00 0
7fb315681000-7fb315722000 rw-p 00000000 00:00 0
7fb315722000-7fb315723000 ---p 00000000 00:00 0
7fb315723000-7fb3157c4000 rw-p 00000000 00:00 0
7fb3157c4000-7fb3157c5000 ---p 00000000 00:00 0
7fb3157c5000-7fb315866000 rw-p 00000000 00:00 0
7fb315866000-7fb315867000 ---p 00000000 00:00 0
7fb315867000-7fb315908000 rw-p 00000000 00:00 0
7fb315908000-7fb315909000 ---p 00000000 00:00 0
7fb315909000-7fb3159aa000 rw-p 00000000 00:00 0
7fb3159aa000-7fb3159ab000 ---p 00000000 00:00 0
7fb3159ab000-7fb315a4c000 rw-p 00000000 00:00 0
7fb315a4c000-7fb315a4d000 ---p 00000000 00:00 0
7fb315a4d000-7fb315aee000 rw-p 00000000 00:00 0
7fb315aee000-7fb315aef000 ---p 00000000 00:00 0
7fb315aef000-7fb315b90000 rw-p 00000000 00:00 0
7fb315b90000-7fb315b91000 ---p 00000000 00:00 0
7fb315b91000-7fb315c32000 rw-p 00000000 00:00 0
7fb315c32000-7fb315c33000 ---p 00000000 00:00 0
7fb315c33000-7fb315cd4000 rw-p 00000000 00:00 0
7fb315cd4000-7fb315cd5000 ---p 00000000 00:00 0
7fb315cd5000-7fb315d76000 rw-p 00000000 00:00 0
7fb315d76000-7fb315d77000 ---p 00000000 00:00 0
7fb315d77000-7fb315e18000 rw-p 00000000 00:00 0
7fb315e18000-7fb315e19000 ---p 00000000 00:00 0
7fb315e19000-7fb315eba000 rw-p 00000000 00:00 0
7fb315eba000-7fb315ebb000 ---p 00000000 00:00 0
7fb315ebb000-7fb315f5c000 rw-p 00000000 00:00 0
7fb315f5c000-7fb315f5d000 ---p 00000000 00:00 0
7fb315f5d000-7fb315ffe000 rw-p 00000000 00:00 0
7fb315ffe000-7fb315fff000 ---p 00000000 00:00 0
7fb315fff000-7fb3160f0000 rw-p 00000000 00:00 0
7fb3160ff000-7fb317200000 rw-p 00000000 00:00 0
7fb317200000-7fb3247f9000 r--p 00000000 00:23 156716 /usr/lib/locale/locale-archive
7fb324808000-7fb32480a000 r--p 00000000 00:23 554324 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/digest.so
7fb32480a000-7fb32480c000 r-xp 00002000 00:23 554324 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/digest.so
7fb32480c000-7fb32480d000 r--p 00004000 00:23 554324 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/digest.so
7fb32480d000-7fb32480e000 r--p 00004000 00:23 554324 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/digest.so
7fb32480e000-7fb32480f000 rw-p 00005000 00:23 554324 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/digest.so
7fb32480f000-7fb324880000 rw-p 00000000 00:00 0
7fb324881000-7fb324885000 rw-p 00000000 00:00 0
7fb324885000-7fb3248ab000 r--p 00000000 00:23 157485 /usr/lib64/libc.so.6
7fb3248ab000-7fb324a08000 r-xp 00026000 00:23 157485 /usr/lib64/libc.so.6
7fb324a08000-7fb324a55000 r--p 00183000 00:23 157485 /usr/lib64/libc.so.6
7fb324a55000-7fb324a59000 r--p 001d0000 00:23 157485 /usr/lib64/libc.so.6
7fb324a59000-7fb324a5b000 rw-p 001d4000 00:23 157485 /usr/lib64/libc.so.6
7fb324a5b000-7fb324a63000 rw-p 00000000 00:00 0
7fb324a63000-7fb324a73000 r--p 00000000 00:23 157488 /usr/lib64/libm.so.6
7fb324a73000-7fb324ae8000 r-xp 00010000 00:23 157488 /usr/lib64/libm.so.6
7fb324ae8000-7fb324b42000 r--p 00085000 00:23 157488 /usr/lib64/libm.so.6
7fb324b42000-7fb324b43000 r--p 000de000 00:23 157488 /usr/lib64/libm.so.6
7fb324b43000-7fb324b44000 rw-p 000df000 00:23 157488 /usr/lib64/libm.so.6
7fb324b44000-7fb324b46000 r--p 00000000 00:23 1208073 /usr/lib64/libcrypt.so.2.0.0
7fb324b46000-7fb324b5a000 r-xp 00002000 00:23 1208073 /usr/lib64/libcrypt.so.2.0.0
7fb324b5a000-7fb324b73000 r--p 00016000 00:23 1208073 /usr/lib64/libcrypt.so.2.0.0
7fb324b73000-7fb324b74000 r--p 0002e000 00:23 1208073 /usr/lib64/libcrypt.so.2.0.0
7fb324b74000-7fb324b7d000 rw-p 00000000 00:00 0
7fb324b7d000-7fb324b8e000 r--p 00000000 00:23 32293 /usr/lib64/libgmp.so.10.4.1
7fb324b8e000-7fb324c0a000 r-xp 00011000 00:23 32293 /usr/lib64/libgmp.so.10.4.1
7fb324c0a000-7fb324c1f000 r--p 0008d000 00:23 32293 /usr/lib64/libgmp.so.10.4.1
7fb324c1f000-7fb324c21000 r--p 000a1000 00:23 32293 /usr/lib64/libgmp.so.10.4.1
7fb324c21000-7fb324c22000 rw-p 000a3000 00:23 32293 /usr/lib64/libgmp.so.10.4.1
7fb324c22000-7fb324c25000 r--p 00000000 00:23 33100 /usr/lib64/libz.so.1.2.13
7fb324c25000-7fb324c34000 r-xp 00003000 00:23 33100 /usr/lib64/libz.so.1.2.13
7fb324c34000-7fb324c3a000 r--p 00012000 00:23 33100 /usr/lib64/libz.so.1.2.13
7fb324c3a000-7fb324c3b000 r--p 00018000 00:23 33100 /usr/lib64/libz.so.1.2.13
7fb324c3b000-7fb324c3c000 rw-p 00000000 00:00 0
7fb324c3c000-7fb324c3d000 r--p 00000000 00:23 554338 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/io/nonblock.so
7fb324c3d000-7fb324c3e000 r-xp 00001000 00:23 554338 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/io/nonblock.so
7fb324c3e000-7fb324c3f000 r--p 00002000 00:23 554338 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/io/nonblock.so
7fb324c3f000-7fb324c40000 r--p 00002000 00:23 554338 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/io/nonblock.so
7fb324c40000-7fb324c41000 rw-p 00003000 00:23 554338 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/io/nonblock.so
7fb324c41000-7fb324c42000 r--p 00000000 00:23 554344 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/monitor.so
7fb324c42000-7fb324c43000 r-xp 00001000 00:23 554344 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/monitor.so
7fb324c43000-7fb324c44000 r--p 00002000 00:23 554344 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/monitor.so
7fb324c44000-7fb324c45000 r--p 00002000 00:23 554344 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/monitor.so
7fb324c45000-7fb324c46000 rw-p 00003000 00:23 554344 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/monitor.so
7fb324c46000-7fb324c47000 r--p 00000000 00:23 554361 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/enc/trans/transdb.so
7fb324c47000-7fb324c48000 r-xp 00001000 00:23 554361 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/enc/trans/transdb.so
7fb324c48000-7fb324c49000 r--p 00002000 00:23 554361 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/enc/trans/transdb.so
7fb324c49000-7fb324c4a000 r--p 00002000 00:23 554361 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/enc/trans/transdb.so
7fb324c4a000-7fb324c4b000 rw-p 00003000 00:23 554361 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/enc/trans/transdb.so
7fb324c4b000-7fb324c4c000 r--p 00000000 00:23 554382 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/enc/encdb.so
7fb324c4c000-7fb324c4d000 r-xp 00001000 00:23 554382 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/enc/encdb.so
7fb324c4d000-7fb324c4e000 r--p 00002000 00:23 554382 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/enc/encdb.so
7fb324c4e000-7fb324c4f000 r--p 00002000 00:23 554382 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/enc/encdb.so
7fb324c4f000-7fb324c50000 rw-p 00003000 00:23 554382 /home/postmodern/.rubies/ruby-trunk/lib/ruby/3.3.0+0/x86_64-linux/enc/encdb.so
7fb324c50000-7fb324c52000 rw-p 00000000 00:00 0
7fb324c52000-7fb324c53000 r--p 00000000 00:23 157482 /usr/lib64/ld-linux-x86-64.so.2
7fb324c53000-7fb324c79000 r-xp 00001000 00:23 157482 /usr/lib64/ld-linux-x86-64.so.2
7fb324c79000-7fb324c83000 r--p 00027000 00:23 157482 /usr/lib64/ld-linux-x86-64.so.2
7fb324c83000-7fb324c85000 r--p 00030000 00:23 157482 /usr/lib64/ld-linux-x86-64.so.2
7fb324c85000-7fb324c87000 rw-p 00032000 00:23 157482 /usr/lib64/ld-linux-x86-64.so.2
7ffd6d3bb000-7ffd6dbba000 rw-p 00000000 00:00 0 [stack]
7ffd6dbdf000-7ffd6dbe3000 r--p 00000000 00:00 0 [vvar]
7ffd6dbe3000-7ffd6dbe5000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0 [vsyscall]
Aborted (core dumped)
Versions¶
- ruby 3.3.0dev (2023-08-02T18:35:08Z master 32e828bb4a) [x86_64-linux]
- ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
- ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]
- OpenSSL 3.0.9 30 May 2023 (Library: OpenSSL 3.0.9 30 May 2023)
GDB Backtrace¶
(gdb) bt -full
#0 BN_is_negative (a=0x0) at crypto/bn/bn_lib.c:945
No locals.
#1 0x00007fffe78b8d08 in bn_to_asn1_string (bn=0x0, ai=0x0, atype=<optimized out>)
at crypto/asn1/a_int.c:479
ret = 0x555555e57570
len = <optimized out>
__func__ = "bn_to_asn1_string"
#2 0x00007fffe792514a in dh_pub_encode (pk=0x555555e580e0, pkey=0x555555e224b0)
at crypto/dh/dh_ameth.c:134
dh = 0x555555e572e0
ptype = 16
penc = 0x0
penclen = <optimized out>
str = 0x555555e574b0
pub_key = 0x0
__func__ = "dh_pub_encode"
#3 0x00007fffe7a4134f in X509_PUBKEY_set (x=0x555555e2d440, pkey=0x555555e224b0)
at crypto/x509/x_pubkey.c:332
pk = 0x555555e580e0
__func__ = "X509_PUBKEY_set"
#4 0x00007fffe7e31a29 in ossl_x509_set_public_key (self=<optimized out>,
key=140737082617600) at ossl_x509cert.c:525
x509 = 0x555555e2d3f0
pkey = 0x555555e224b0
#5 0x00005555557688b9 in vm_call_cfunc_with_frame_ (stack_bottom=<optimized out>,
argv=<optimized out>, argc=<optimized out>, calling=<optimized out>,
reg_cfp=<optimized out>, ec=<optimized out>)
at /home/postmodern/src/ruby/vm_insnhelper.c:3462
ci = <optimized out>
cc = <optimized out>
val = <optimized out>
me = <optimized out>
cfunc = <optimized out>
recv = <optimized out>
frame_type = <optimized out>
len = <optimized out>
block_handler = <optimized out>
ci = <optimized out>
cc = <optimized out>
val = <optimized out>
me = <optimized out>
cfunc = <optimized out>
recv = <optimized out>
block_handler = <optimized out>
frame_type = <optimized out>
len = <optimized out>
args = <optimized out>
flag_arg_ = <optimized out>
hooks_arg_ = <optimized out>
flag_arg_ = <optimized out>
hooks_arg_ = <optimized out>
args = <optimized out>
#6 vm_call_cfunc_with_frame (calling=<optimized out>, reg_cfp=<optimized out>,
ec=<optimized out>) at /home/postmodern/src/ruby/vm_insnhelper.c:3490
argc = <optimized out>
stack_bottom = <optimized out>
argv = <optimized out>
argc = <optimized out>
stack_bottom = <optimized out>
argv = <optimized out>
#7 vm_call_cfunc_other (ec=0x5555559f1080, reg_cfp=0x7ffff7bf1fa0,
calling=<optimized out>) at /home/postmodern/src/ruby/vm_insnhelper.c:3516
ci = <optimized out>
argv_ary = <optimized out>
#8 0x0000555555785a37 in vm_sendish (method_explorer=<optimized out>,
block_handler=<optimized out>, cd=<optimized out>, reg_cfp=<optimized out>,
ec=<optimized out>) at /home/postmodern/src/ruby/vm_callinfo.h:403
val = 93824999513184
ci = 0x18
cc = <optimized out>
recv = 0
argc = <optimized out>
calling = {cd = 0x555555c45c60, cc = 0x7fffe7d0eed8, block_handler = 0,
recv = 140737082618600, argc = 1, kw_splat = false, heap_argv = 0}
val = <optimized out>
ci = <optimized out>
cc = <optimized out>
argc = <optimized out>
recv = <optimized out>
calling = <optimized out>
#9 vm_exec_core (ec=0x0, ec@entry=0x5555559f1080)
at /home/postmodern/src/ruby/insns.def:835
bh = <optimized out>
cd = 0x555555c45c60
leaf = <optimized out>
val = 93824999513184
reg_pc = 0x555555b3aef8
reg_cfp = 0x7ffff7bf1fa0
insns_address_table = {0x555555788b24 <vm_exec_core+12804>,
0x55555578789f <vm_exec_core+8063>, 0x55555578783b <vm_exec_core+7963>,
0x5555557877c9 <vm_exec_core+7849>, 0x55555578775c <vm_exec_core+7740>,
0x5555557876f0 <vm_exec_core+7632>, 0x555555787624 <vm_exec_core+7428>,
0x555555787a0c <vm_exec_core+8428>, 0x555555787901 <vm_exec_core+8161>,
0x555555787958 <vm_exec_core+8248>, 0x555555787509 <vm_exec_core+7145>,
0x555555787395 <vm_exec_core+6773>, 0x555555787244 <vm_exec_core+6436>,
0x5555557871f2 <vm_exec_core+6354>, 0x5555557871a4 <vm_exec_core+6276>,
0x555555787170 <vm_exec_core+6224>, 0x555555787141 <vm_exec_core+6177>,
0x555555787115 <vm_exec_core+6133>, 0x5555557870e9 <vm_exec_core+6089>,
0x5555557870bd <vm_exec_core+6045>, 0x55555578702a <vm_exec_core+5898>,
0x555555786ff5 <vm_exec_core+5845>, 0x555555786fa6 <vm_exec_core+5766>,
0x555555786f69 <vm_exec_core+5705>, 0x555555786ef3 <vm_exec_core+5587>,
0x555555786ec5 <vm_exec_core+5541>, 0x555555786e70 <vm_exec_core+5456>,
0x555555786e02 <vm_exec_core+5346>, 0x555555786dd1 <vm_exec_core+5297>,
0x555555786da0 <vm_exec_core+5248>, 0x555555786c02 <vm_exec_core+4834>,
0x555555786ae4 <vm_exec_core+4548>, 0x555555786a93 <vm_exec_core+4467>,
0x555555786a46 <vm_exec_core+4390>, 0x555555786a05 <vm_exec_core+4325>,
0x555555786b98 <vm_exec_core+4728>, 0x555555786b66 <vm_exec_core+4678>,
0x555555786bb6 <vm_exec_core+4758>, 0x5555557869da <vm_exec_core+4282>,
0x555555786938 <vm_exec_core+4120>, 0x5555557868fa <vm_exec_core+4058>,
0x5555557868bb <vm_exec_core+3995>, 0x555555786892 <vm_exec_core+3954>,
0x55555578682d <vm_exec_core+3853>, 0x5555557867d5 <vm_exec_core+3765>,
0x55555578673a <vm_exec_core+3610>, 0x5555557866d4 <vm_exec_core+3508>,
0x555555786660 <vm_exec_core+3392>, 0x5555557865c5 <vm_exec_core+3237>,
0x555555786593 <vm_exec_core+3187>, 0x555555786556 <vm_exec_core+3126>,
0x5555557864f7 <vm_exec_core+3031>, 0x555555785980 <vm_exec_core+96>,
0x55555578645c <vm_exec_core+2876>, 0x555555786419 <vm_exec_core+2809>,
0x555555788971 <vm_exec_core+12369>, 0x5555557862ef <vm_exec_core+2511>,
0x55555578625e <vm_exec_core+2366>, 0x555555786332 <vm_exec_core+2578>,
0x555555786147 <vm_exec_core+2087>, 0x555555786091 <vm_exec_core+1905>,
0x555555787be1 <vm_exec_core+8897>, 0x55555578605a <vm_exec_core+1850>,
0x555555786004 <vm_exec_core+1764>, 0x555555787a97 <vm_exec_core+8567>,
0x555555787a64 <vm_exec_core+8516>, 0x555555787aed <vm_exec_core+8653>,
0x555555785f28 <vm_exec_core+1544>, 0x55555578890e <vm_exec_core+12270>,
0x555555788a31 <vm_exec_core+12561>, 0x555555788879 <vm_exec_core+12121>,
0x555555788a93 <vm_exec_core+12659>, 0x5555557885b4 <vm_exec_core+11412>,
0x55555578865d <vm_exec_core+11581>, 0x5555557886b3 <vm_exec_core+11667>,
0x555555788721 <vm_exec_core+11777>, 0x555555788777 <vm_exec_core+11863>,
0x5555557887cd <vm_exec_core+11949>, 0x555555788823 <vm_exec_core+12035>,
0x5555557889b8 <vm_exec_core+12440>, 0x5555557883ac <vm_exec_core+10892>,
0x5555557883f3 <vm_exec_core+10963>, 0x555555788445 <vm_exec_core+11045>,
0x5555557884a6 <vm_exec_core+11142>, 0x555555785e90 <vm_exec_core+1392>,
0x555555785e4f <vm_exec_core+1327>, 0x555555788526 <vm_exec_core+11270>,
0x55555578856d <vm_exec_core+11341>, 0x555555788277 <vm_exec_core+10583>,
0x5555557882a0 <vm_exec_core+10624>, 0x5555557882fe <vm_exec_core+10718>,
0x55555578835e <vm_exec_core+10814>, 0x555555785de8 <vm_exec_core+1224>,
0x555555785d72 <vm_exec_core+1106>, 0x555555785cc6 <vm_exec_core+934>,
0x555555785c88 <vm_exec_core+872>, 0x555555785c42 <vm_exec_core+802>,
0x555555785bfc <vm_exec_core+732>, 0x555555785bae <vm_exec_core+654>,
0x555555785b82 <vm_exec_core+610>, 0x555555785b56 <vm_exec_core+566>,
0x555555788393 <vm_exec_core+10867>, 0x555555787893 <vm_exec_core+8051>,
0x55555578782f <vm_exec_core+7951>, 0x5555557877bd <vm_exec_core+7837>,
0x555555787750 <vm_exec_core+7728>, 0x5555557876e4 <vm_exec_core+7620>,
0x555555787618 <vm_exec_core+7416>, 0x555555787a00 <vm_exec_core+8416>,
0x5555557878f5 <vm_exec_core+8149>, 0x55555578794c <vm_exec_core+8236>,
0x5555557874fd <vm_exec_core+7133>, 0x555555787389 <vm_exec_core+6761>,
0x555555787238 <vm_exec_core+6424>, 0x5555557871e6 <vm_exec_core+6342>,
0x555555787198 <vm_exec_core+6264>, 0x555555787164 <vm_exec_core+6212>,
0x555555787135 <vm_exec_core+6165>, 0x555555787109 <vm_exec_core+6121>,
0x5555557870dd <vm_exec_core+6077>, 0x5555557870b1 <vm_exec_core+6033>,
0x55555578701e <vm_exec_core+5886>, 0x555555786fe9 <vm_exec_core+5833>,
0x555555786f9a <vm_exec_core+5754>, 0x555555786f5d <vm_exec_core+5693>,
0x555555786ee7 <vm_exec_core+5575>, 0x555555786eb9 <vm_exec_core+5529>,
0x555555786e64 <vm_exec_core+5444>, 0x555555786df6 <vm_exec_core+5334>,
0x555555786dc5 <vm_exec_core+5285>, 0x555555786d94 <vm_exec_core+5236>,
0x555555786bf6 <vm_exec_core+4822>, 0x555555786ad8 <vm_exec_core+4536>,
0x555555786a87 <vm_exec_core+4455>, 0x555555786a3a <vm_exec_core+4378>,
0x5555557869f9 <vm_exec_core+4313>, 0x555555786b8c <vm_exec_core+4716>,
0x555555786b5a <vm_exec_core+4666>, 0x555555786baa <vm_exec_core+4746>,
0x5555557869ce <vm_exec_core+4270>, 0x55555578692c <vm_exec_core+4108>,
0x5555557868ee <vm_exec_core+4046>, 0x5555557868af <vm_exec_core+3983>,
0x555555786886 <vm_exec_core+3942>, 0x555555786821 <vm_exec_core+3841>,
0x5555557867c9 <vm_exec_core+3753>, 0x55555578672e <vm_exec_core+3598>,
0x5555557866c8 <vm_exec_core+3496>, 0x555555786654 <vm_exec_core+3380>,
0x5555557865b9 <vm_exec_core+3225>, 0x555555786587 <vm_exec_core+3175>,
0x55555578654a <vm_exec_core+3114>, 0x5555557864eb <vm_exec_core+3019>,
0x5555557880fa <vm_exec_core+10202>, 0x555555786450 <vm_exec_core+2864>,
0x55555578640d <vm_exec_core+2797>, 0x55555578810b <vm_exec_core+10219>,
0x5555557862e3 <vm_exec_core+2499>, 0x555555786252 <vm_exec_core+2354>,
0x555555786326 <vm_exec_core+2566>, 0x55555578613b <vm_exec_core+2075>,
0x555555786085 <vm_exec_core+1893>, 0x555555787bd5 <vm_exec_core+8885>,
0x55555578604e <vm_exec_core+1838>, 0x555555785ff8 <vm_exec_core+1752>,
0x555555787a8b <vm_exec_core+8555>, 0x555555787a58 <vm_exec_core+8504>,
0x555555787ae1 <vm_exec_core+8641>, 0x555555785f1c <vm_exec_core+1532>,
0x55555578811c <vm_exec_core+10236>, 0x55555578812d <vm_exec_core+10253>,
0x55555578813e <vm_exec_core+10270>, 0x55555578814f <vm_exec_core+10287>,
0x555555788160 <vm_exec_core+10304>, 0x555555788171 <vm_exec_core+10321>,
0x555555788182 <vm_exec_core+10338>, 0x55555578819a <vm_exec_core+10362>,
0x5555557881ab <vm_exec_core+10379>, 0x5555557881bc <vm_exec_core+10396>,
0x5555557881cd <vm_exec_core+10413>, 0x5555557881de <vm_exec_core+10430>,
0x5555557881ef <vm_exec_core+10447>, 0x555555788200 <vm_exec_core+10464>,
0x555555788211 <vm_exec_core+10481>, 0x555555788222 <vm_exec_core+10498>,
0x555555785e84 <vm_exec_core+1380>, 0x555555785e43 <vm_exec_core+1315>,
0x555555788233 <vm_exec_core+10515>, 0x555555788244 <vm_exec_core+10532>,
0x555555788255 <vm_exec_core+10549>, 0x555555788266 <vm_exec_core+10566>,
0x55555578596e <vm_exec_core+78>, 0x55555578596e <vm_exec_core+78>,
0x555555785ddc <vm_exec_core+1212>, 0x555555785d66 <vm_exec_core+1094>,
0x555555785cba <vm_exec_core+922>, 0x555555785c7c <vm_exec_core+860>,
0x555555785c36 <vm_exec_core+790>, 0x555555785bf0 <vm_exec_core+720>,
0x555555785ba2 <vm_exec_core+642>...}
#10 0x00005555557766c4 in rb_vm_exec (ec=0x5555559f1080) at vm.c:2390
_ec = 0x5555559f1080
_tag = {tag = 36, retval = 4, buf = {0x7fffffffda20,
0x5555557764d0 <rb_vm_exec+336>, 0x7fffffffd8e0, 0x14da16a575657c00,
0x7ffff7a2a6f8}, prev = 0x7fffffffda60, state = RUBY_TAG_NONE, lock_rec = 0}
state = <optimized out>
result = <optimized out>
#11 0x000055555578cc98 in rb_iseq_eval_main (iseq=<optimized out>) at vm.c:2640
ec = <optimized out>
val = <optimized out>
#12 0x000055555558a785 in rb_ec_exec_node (ec=ec@entry=0x5555559f1080,
n=n@entry=0x7fffe7ea0aa8) at eval.c:287
th = <optimized out>
_ec = <optimized out>
_tag = {tag = 36, retval = 93824994127712, buf = {0x5555559f1080,
0x55555558a7da <rb_ec_exec_node+250>, 0x7fffffffda30, 0x7fffe7ea0aa8, 0x24},
prev = 0x0, state = RUBY_TAG_NONE, lock_rec = 0}
state = 0
iseq = 0x7fffe7ea0aa8
#13 0x000055555558fa5b in ruby_run_node (n=0x7fffe7ea0aa8) at eval.c:328
ec = 0x5555559f1080
status = 32767
#14 0x000055555558a242 in rb_main (argv=0x7fffffffdc78, argc=2) at ./main.c:39
variable_in_this_stack_frame = 0
#15 main (argc=<optimized out>, argv=<optimized out>) at ./main.c:58
Updated by postmodern (Hal Brodigan) over 1 year ago
- Subject changed from Segfault when `OpenSSL::X509::Certificate#public_key=` is given a `OpenSS::PKey::DH` object to Segfault when `OpenSSL::X509::Certificate#public_key=` is given a `OpenSSL::PKey::DH` object
Updated by mame (Yusuke Endoh) about 1 year ago
- Assignee set to rhenium (Kazuki Yamaguchi)
Updated by jeremyevans0 (Jeremy Evans) about 1 year ago
- Status changed from Open to Closed
In Ruby 3.3.0-preview2, the example code now raises OpenSSL::PKey::PKeyError: public key missing
. That doesn't appear to meet @postmodern (Hal Brodigan) 's expectation, but I think the behavior is expected. If you read the OpenSSL::PKey::DH#public_key
documentation, it's clear that it doesn't actually return the public key. You can make it work with OpenSSL::PKey::DH
if you use generate_key!
as described in the OpenSSL::PKey::DH
documentation:
require 'openssl'
cert = OpenSSL::X509::Certificate.new
key = OpenSSL::PKey::DH.generate(1024).public_key
key.generate_key!
cert.public_key = key
Actions
Like0
Like0Like0Like0