Commit 70497bb
fix(ext/node): make
## Summary
- GCM is a stream cipher mode that doesn't use block padding. In
Node.js, `setAutoPadding()` is a no-op for GCM modes, but Deno was
throwing `setAutoPadding(false) not supported for Aes128Gcm/Aes256Gcm
yet` when called on GCM deciphers.
- This broke npm packages like `ssh2` that set auto-padding to false by
default.
- Merges the `auto_pad=false` arms into the existing `auto_pad=true`
arms (using `_` wildcard) for both `Aes128Gcm` and `Aes256Gcm` in
`Decipher::final()`, and removes the now-unused error variants.
Closes #29425
Closes #28589
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>setAutoPadding(false) a no-op for GCM ciphers (#32290)1 parent fd9def3 commit 70497bb
2 files changed
Lines changed: 35 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | 508 | | |
515 | 509 | | |
516 | 510 | | |
| |||
806 | 800 | | |
807 | 801 | | |
808 | 802 | | |
809 | | - | |
| 803 | + | |
810 | 804 | | |
811 | 805 | | |
812 | 806 | | |
| |||
820 | 814 | | |
821 | 815 | | |
822 | 816 | | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
| 817 | + | |
827 | 818 | | |
828 | 819 | | |
829 | 820 | | |
| |||
837 | 828 | | |
838 | 829 | | |
839 | 830 | | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | 831 | | |
844 | 832 | | |
845 | 833 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
149 | 182 | | |
150 | 183 | | |
151 | 184 | | |
| |||
0 commit comments