Commit 78a71aa
crypto: fix error of createCipher in wrap mode
EVP_CIPHER_CTX_FLAG_WRAP_ALLOW flag needs to be set in using wrap mode
ciphers. In `crypto.createCipher()`, AES key wrap mode does not use a
default IV defined in RFC3394 but a generated IV with
`EVP_BytesToKey()` to be consistent API behaviors with other ciphers.
The built-in AES wrap mode in OpenSSL is not supported in FIPS mode as
http://openssl.6102.n7.nabble.com/AES-Key-Wrap-in-FIPS-Mode-td50238.html
so its tests in FIPS mode are skipped.
Fixes: #15009
PR-URL: #15037
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>1 parent 41bf40e commit 78a71aa
File tree
3 files changed
+54
-1
lines changed- src
- test/parallel
3 files changed
+54
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3349 | 3349 | | |
3350 | 3350 | | |
3351 | 3351 | | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
3352 | 3355 | | |
3353 | 3356 | | |
3354 | 3357 | | |
| |||
3396 | 3399 | | |
3397 | 3400 | | |
3398 | 3401 | | |
3399 | | - | |
| 3402 | + | |
| 3403 | + | |
3400 | 3404 | | |
3401 | 3405 | | |
3402 | 3406 | | |
3403 | 3407 | | |
3404 | 3408 | | |
3405 | 3409 | | |
| 3410 | + | |
| 3411 | + | |
| 3412 | + | |
| 3413 | + | |
3406 | 3414 | | |
3407 | 3415 | | |
3408 | 3416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
533 | 552 | | |
534 | 553 | | |
535 | 554 | | |
536 | 555 | | |
537 | 556 | | |
538 | 557 | | |
| 558 | + | |
| 559 | + | |
539 | 560 | | |
540 | 561 | | |
541 | 562 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
58 | 77 | | |
59 | 78 | | |
60 | 79 | | |
61 | 80 | | |
62 | 81 | | |
63 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
64 | 88 | | |
65 | 89 | | |
66 | 90 | | |
| |||
0 commit comments