@@ -2514,6 +2514,8 @@ fn kbkdf_additional_keys_counter_mode() -> TestResult {
2514
2514
Attribute :: ValueLen ( ( AES128_BLOCK_SIZE as u64 ) . into( ) ) ,
2515
2515
Attribute :: Sign ( true ) ,
2516
2516
Attribute :: Verify ( true ) ,
2517
+ Attribute :: Encrypt ( false ) ,
2518
+ Attribute :: Decrypt ( false ) ,
2517
2519
] ,
2518
2520
vec ! [
2519
2521
Attribute :: Token ( true ) ,
@@ -2522,6 +2524,8 @@ fn kbkdf_additional_keys_counter_mode() -> TestResult {
2522
2524
Attribute :: KeyType ( KeyType :: GENERIC_SECRET ) ,
2523
2525
Attribute :: ValueLen ( 1 . into( ) ) ,
2524
2526
Attribute :: Derive ( true ) ,
2527
+ Attribute :: Encrypt ( false ) ,
2528
+ Attribute :: Decrypt ( false ) ,
2525
2529
] ,
2526
2530
] ;
2527
2531
@@ -2598,6 +2602,8 @@ fn kbkdf_additional_keys_counter_mode() -> TestResult {
2598
2602
Attribute :: Sign ( true ) ,
2599
2603
Attribute :: Verify ( true ) ,
2600
2604
Attribute :: Derive ( false ) ,
2605
+ Attribute :: Encrypt ( false ) ,
2606
+ Attribute :: Decrypt ( false ) ,
2601
2607
] ,
2602
2608
vec ! [
2603
2609
Attribute :: Class ( ObjectClass :: SECRET_KEY ) ,
@@ -2608,14 +2614,16 @@ fn kbkdf_additional_keys_counter_mode() -> TestResult {
2608
2614
Attribute :: Sign ( false ) ,
2609
2615
Attribute :: Verify ( false ) ,
2610
2616
Attribute :: Derive ( true ) ,
2617
+ Attribute :: Encrypt ( false ) ,
2618
+ Attribute :: Decrypt ( false ) ,
2611
2619
] ,
2612
2620
] ;
2613
2621
2614
2622
for ( key, wanted_attributes) in derived_keys. iter ( ) . zip ( wanted_attributes. iter ( ) . cycle ( ) ) {
2615
2623
let have_attributes = session. get_attributes ( * key, & attributes_to_check) ?;
2616
2624
2617
2625
for ( value_wanted, value_have) in wanted_attributes. iter ( ) . zip ( have_attributes. iter ( ) ) {
2618
- assert_eq ! ( value_wanted, value_have) ;
2626
+ assert_eq ! ( value_wanted, value_have, "The generated key {key} has unexpected attribute value" ) ;
2619
2627
}
2620
2628
}
2621
2629
@@ -2670,6 +2678,8 @@ fn kbkdf_additional_keys_feedback_mode() -> TestResult {
2670
2678
Attribute :: ValueLen ( ( AES128_BLOCK_SIZE as u64 ) . into( ) ) ,
2671
2679
Attribute :: Sign ( true ) ,
2672
2680
Attribute :: Verify ( true ) ,
2681
+ Attribute :: Encrypt ( false ) ,
2682
+ Attribute :: Decrypt ( false ) ,
2673
2683
] ,
2674
2684
vec ! [
2675
2685
Attribute :: Token ( true ) ,
@@ -2678,6 +2688,8 @@ fn kbkdf_additional_keys_feedback_mode() -> TestResult {
2678
2688
Attribute :: KeyType ( KeyType :: GENERIC_SECRET ) ,
2679
2689
Attribute :: ValueLen ( 1 . into( ) ) ,
2680
2690
Attribute :: Derive ( true ) ,
2691
+ Attribute :: Encrypt ( false ) ,
2692
+ Attribute :: Decrypt ( false ) ,
2681
2693
] ,
2682
2694
] ;
2683
2695
0 commit comments