Commit e12ae01
[fix] Cipher#reset when key not set (jruby/jruby#5776)
CRuby's reset calls EVP_CipherInit_ex with NULL key/IV which is a
no-op if no key was set. JRuby was calling doInitCipher unconditionally
which requires a key. Skip doInitCipher when key is null.
Co-Authored-By: Claude Opus 4.6 <[email protected]>1 parent 1a12af3 commit e12ae01
File tree
2 files changed
+24
-1
lines changed- src
- main/java/org/jruby/ext/openssl
- test/ruby
2 files changed
+24
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
942 | 942 | | |
943 | 943 | | |
944 | 944 | | |
945 | | - | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
946 | 948 | | |
947 | 949 | | |
948 | 950 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
140 | 161 | | |
141 | 162 | | |
142 | 163 | | |
| |||
0 commit comments