File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -363,8 +363,10 @@ fn sign_verify_multipart_already_initialized() -> TestResult {
363
363
Error :: Pkcs11 ( RvError :: OperationActive , Function :: SignInit )
364
364
) ) ;
365
365
366
- // Make sure signing operation is over before trying same with verification
367
- session. sign_final ( ) ?;
366
+ // Make sure signing operation is over before trying same with verification.
367
+ // Some backends will reset the ongoing operation after the failed 2nd call to
368
+ // sign_init(), so we should not unwrap the result of this call.
369
+ let _ = session. sign_final ( ) ;
368
370
369
371
// Initialize verification operation twice in a row
370
372
session. verify_init ( & Mechanism :: Sha256RsaPkcs , pub_key) ?;
@@ -575,8 +577,10 @@ fn encrypt_decrypt_multipart_already_initialized() -> TestResult {
575
577
Error :: Pkcs11 ( RvError :: OperationActive , Function :: EncryptInit )
576
578
) ) ;
577
579
578
- // Make sure encryption operation is over before trying same with decryption
579
- session. encrypt_final ( ) ?;
580
+ // Make sure encryption operation is over before trying same with decryption.
581
+ // Some backends will reset the ongoing operation after the failed 2nd call to
582
+ // encrypt_init(), so we should not unwrap the result of this call.
583
+ let _ = session. encrypt_final ( ) ;
580
584
581
585
// Initialize encryption operation twice in a row
582
586
session. decrypt_init ( & Mechanism :: AesEcb , key) ?;
You can’t perform that action at this time.
0 commit comments