Commit f604c04
crypto: allocate more memory for cipher.update()
For key wrapping algorithms, calling EVP_CipherUpdate() with null output
could obtain the size for the ciphertext. Then use the returned size to
allocate output buffer. Also add a test case to verify des3-wrap.
Signed-off-by: Yihong Wang <yh.wang@ibm.com>
PR-URL: #20370
Fixes: #19655
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 17dbf6c commit f604c04Copy full SHA for f604c04
File tree
Expand file treeCollapse file tree
2 files changed
+41
-2
lines changedOpen diff view settings
Filter options
- src
- test/parallel
Expand file treeCollapse file tree
2 files changed
+41
-2
lines changedOpen diff view settings
Collapse file
+16-2Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2987 | 2987 | |
2988 | 2988 | |
2989 | 2989 | |
2990 | | - |
2991 | | - |
| 2990 | + |
| 2991 | + |
| 2992 | + |
| 2993 | + |
| 2994 | + |
| 2995 | + |
| 2996 | + |
| 2997 | + |
| 2998 | + |
| 2999 | + |
| 3000 | + |
| 3001 | + |
| 3002 | + |
| 3003 | + |
2992 | 3004 | |
2993 | 3005 | |
2994 | 3006 | |
2995 | 3007 | |
2996 | 3008 | |
2997 | 3009 | |
| 3010 | + |
| 3011 | + |
2998 | 3012 | |
2999 | 3013 | |
3000 | 3014 | |
|
Collapse file
test/parallel/test-crypto-des3-wrap.js
Copy file name to clipboard+25Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
0 commit comments