Commit 624e516
crypto: fix edge case in authenticated encryption
Restricting the authentication tag length and calling update or
setAAD before setAuthTag caused an incorrect authentication tag to
be passed to OpenSSL: The auth_tag_len_ field was already set, so
the implementation assumed that the tag itself was known as well.
PR-URL: #22828
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>1 parent 329ac60 commit 624e516Copy full SHA for 624e516
File tree
Expand file treeCollapse file tree
3 files changed
+38
-20
lines changedOpen diff view settings
Filter options
- src
- test/parallel
Expand file treeCollapse file tree
3 files changed
+38
-20
lines changedOpen diff view settings
Collapse file
+7-2Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2891 | 2891 | |
2892 | 2892 | |
2893 | 2893 | |
| 2894 | + |
| 2895 | + |
| 2896 | + |
| 2897 | + |
2894 | 2898 | |
2895 | 2899 | |
2896 | 2900 | |
| ||
2923 | 2927 | |
2924 | 2928 | |
2925 | 2929 | |
| 2930 | + |
2926 | 2931 | |
2927 | 2932 | |
2928 | 2933 | |
| ||
2934 | 2939 | |
2935 | 2940 | |
2936 | 2941 | |
2937 | | - |
| 2942 | + |
2938 | 2943 | |
2939 | 2944 | |
2940 | 2945 | |
2941 | 2946 | |
2942 | 2947 | |
2943 | 2948 | |
2944 | | - |
| 2949 | + |
2945 | 2950 | |
2946 | 2951 | |
2947 | 2952 | |
|
Collapse file
+7-2Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
363 | 363 | |
364 | 364 | |
365 | 365 | |
| 366 | + |
| 367 | + |
| 368 | + |
| 369 | + |
| 370 | + |
366 | 371 | |
367 | 372 | |
368 | 373 | |
| ||
404 | 409 | |
405 | 410 | |
406 | 411 | |
407 | | - |
| 412 | + |
408 | 413 | |
409 | 414 | |
410 | 415 | |
| ||
413 | 418 | |
414 | 419 | |
415 | 420 | |
416 | | - |
| 421 | + |
417 | 422 | |
418 | 423 | |
419 | 424 | |
|
Collapse file
test/parallel/test-crypto-authenticated.js
Copy file name to clipboardExpand all lines: test/parallel/test-crypto-authenticated.js+24-16Lines changed: 24 additions & 16 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
579 | 579 | |
580 | 580 | |
581 | 581 | |
582 | | - |
| 582 | + |
583 | 583 | |
584 | 584 | |
585 | 585 | |
586 | 586 | |
587 | 587 | |
588 | | - |
589 | | - |
590 | | - |
591 | | - |
592 | | - |
593 | | - |
594 | | - |
595 | | - |
596 | | - |
597 | | - |
598 | | - |
599 | | - |
| 588 | + |
| 589 | + |
| 590 | + |
| 591 | + |
| 592 | + |
| 593 | + |
| 594 | + |
| 595 | + |
| 596 | + |
| 597 | + |
| 598 | + |
| 599 | + |
| 600 | + |
| 601 | + |
| 602 | + |
| 603 | + |
| 604 | + |
| 605 | + |
| 606 | + |
| 607 | + |
| 608 | + |
| 609 | + |
| 610 | + |
600 | 611 | |
601 | | - |
602 | | - |
603 | | - |
604 | 612 | |
605 | 613 | |
0 commit comments