File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1501,10 +1501,15 @@ fn session_copy_object() -> TestResult {
1501
1501
let copy = rw_session. copy_object ( object, & copy_template) ?;
1502
1502
rw_session. destroy_object ( copy) ?;
1503
1503
1504
- // try the copy with the insecure template. It should fail. Returning CKR_OK is considered a failure.
1505
- rw_session
1506
- . copy_object ( object, & insecure_copy_template)
1507
- . unwrap_err ( ) ;
1504
+ let res = rw_session. copy_object ( object, & insecure_copy_template) ;
1505
+ if is_softokn ( ) {
1506
+ // Softokn considers all keys nonextractable
1507
+ let copy = res?;
1508
+ rw_session. destroy_object ( copy) ?;
1509
+ } else {
1510
+ // try the copy with the insecure template. It should fail. Returning CKR_OK is considered a failure.
1511
+ res. unwrap_err ( ) ;
1512
+ }
1508
1513
1509
1514
// delete keys
1510
1515
rw_session. destroy_object ( object) ?;
You can’t perform that action at this time.
0 commit comments