Commit 1cf64c6
committed
Fix [Dev] intermittent SSL alert received: HANDSHAKE_FAILURE - error 552 - phase 2
This JSS code workaround takes steps to make sure ONLY SSL Server Cert private keys are marked
as NOT temporary. We have a case on a certain HSM where NSS makes a copy of the SSL Server private key on the token and
hands it to our JSS SSLEngine implementation. After serveral separate incoming SSL connections, the Java GC
attempts to clean up the private key references periodically. Since the SSL Server private key copy is marked as temporary,
the normal call to clean up a private key reference has been known to delete the key from the token. Since NSS uses this copy
over a long perid of time, any early deletion of this key will make subsequent SSL connections to fail, until the server is reset.
This fix makes sure the private key refernces kept inour java objects are NOT set to temporary. When the GC runs all calls to clean
up the private key reference will not accidentally remove the key from the token.
Fixed to adust to the fact that JSSEngineImpl no longer has a cert and key object, instead some ArrayList.1 parent c5566fc commit 1cf64c6
4 files changed
Lines changed: 42 additions & 1 deletion
File tree
- base/src/main/java/org/mozilla/jss
- pkcs11
- ssl/javax
- lib
- native/src/main/native/org/mozilla/jss/pkcs11
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
79 | 85 | | |
80 | 86 | | |
81 | 87 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
420 | 429 | | |
421 | | - | |
| 430 | + | |
422 | 431 | | |
423 | 432 | | |
424 | 433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
| 532 | + | |
532 | 533 | | |
533 | 534 | | |
534 | 535 | | |
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
756 | 756 | | |
757 | 757 | | |
758 | 758 | | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
0 commit comments