@@ -417,6 +417,14 @@ public static TheoryData<CreateTokenTheoryData> RoundTripJWEKeyWrappingTheoryDat
417
417
EncryptingCredentials = new EncryptingCredentials ( KeyingMaterial . RsaSecurityKey_2048 , SecurityAlgorithms . RsaOaepMgf1pKeyWrap , SecurityAlgorithms . Aes128CbcHmacSha256 )
418
418
} ,
419
419
new CreateTokenTheoryData ( )
420
+ {
421
+ TestId = "WrongRsaOaepKeyWrapIdentifier-Aes128CbcHmacSha256" ,
422
+ ValidationParameters = Default . TokenValidationParameters ( KeyingMaterial . RsaSecurityKey_2048 , Default . SymmetricSigningKey256 ) ,
423
+ Payload = Default . PayloadString ,
424
+ SigningCredentials = Default . SymmetricSigningCredentials ,
425
+ EncryptingCredentials = new EncryptingCredentials ( KeyingMaterial . RsaSecurityKey_2048 , SecurityAlgorithms . RsaOaepKeyWrap , SecurityAlgorithms . Aes128CbcHmacSha256 )
426
+ } ,
427
+ new CreateTokenTheoryData ( )
420
428
{
421
429
TestId = "RsaOaepKeyWrap-Aes192CbcHmacSha384" ,
422
430
ValidationParameters = Default . TokenValidationParameters ( KeyingMaterial . RsaSecurityKey_2048 , Default . SymmetricSigningKey256 ) ,
@@ -425,6 +433,14 @@ public static TheoryData<CreateTokenTheoryData> RoundTripJWEKeyWrappingTheoryDat
425
433
EncryptingCredentials = new EncryptingCredentials ( KeyingMaterial . RsaSecurityKey_2048 , SecurityAlgorithms . RsaOaepMgf1pKeyWrap , SecurityAlgorithms . Aes192CbcHmacSha384 )
426
434
} ,
427
435
new CreateTokenTheoryData ( )
436
+ {
437
+ TestId = "WrongRsaOaepKeyWrapIdentifier-Aes192CbcHmacSha384" ,
438
+ ValidationParameters = Default . TokenValidationParameters ( KeyingMaterial . RsaSecurityKey_2048 , Default . SymmetricSigningKey256 ) ,
439
+ Payload = Default . PayloadString ,
440
+ SigningCredentials = Default . SymmetricSigningCredentials ,
441
+ EncryptingCredentials = new EncryptingCredentials ( KeyingMaterial . RsaSecurityKey_2048 , SecurityAlgorithms . RsaOaepKeyWrap , SecurityAlgorithms . Aes192CbcHmacSha384 )
442
+ } ,
443
+ new CreateTokenTheoryData ( )
428
444
{
429
445
TestId = "RsaOaepKeyWrap-Aes256CbcHmacSha512" ,
430
446
ValidationParameters = Default . TokenValidationParameters ( KeyingMaterial . RsaSecurityKey_2048 , Default . SymmetricSigningKey256 ) ,
@@ -433,6 +449,14 @@ public static TheoryData<CreateTokenTheoryData> RoundTripJWEKeyWrappingTheoryDat
433
449
EncryptingCredentials = new EncryptingCredentials ( KeyingMaterial . RsaSecurityKey_2048 , SecurityAlgorithms . RsaOaepMgf1pKeyWrap , SecurityAlgorithms . Aes256CbcHmacSha512 )
434
450
} ,
435
451
new CreateTokenTheoryData ( )
452
+ {
453
+ TestId = "WrongRsaOaepKeyWrapIdentifier-Aes256CbcHmacSha512" ,
454
+ ValidationParameters = Default . TokenValidationParameters ( KeyingMaterial . RsaSecurityKey_2048 , Default . SymmetricSigningKey256 ) ,
455
+ Payload = Default . PayloadString ,
456
+ SigningCredentials = Default . SymmetricSigningCredentials ,
457
+ EncryptingCredentials = new EncryptingCredentials ( KeyingMaterial . RsaSecurityKey_2048 , SecurityAlgorithms . RsaOaepKeyWrap , SecurityAlgorithms . Aes256CbcHmacSha512 )
458
+ } ,
459
+ new CreateTokenTheoryData ( )
436
460
{
437
461
TestId = "SymmetricSecurityKey2_128-Aes128KW-Aes128CbcHmacSha256" ,
438
462
ValidationParameters = Default . TokenValidationParameters ( KeyingMaterial . SymmetricSecurityKey2_128 , Default . SymmetricSigningKey256 ) ,
@@ -455,6 +479,14 @@ public static TheoryData<CreateTokenTheoryData> RoundTripJWEKeyWrappingTheoryDat
455
479
Payload = Default . PayloadString ,
456
480
SigningCredentials = Default . SymmetricSigningCredentials ,
457
481
EncryptingCredentials = new EncryptingCredentials ( KeyingMaterial . RsaSecurityKey_2048 , SecurityAlgorithms . RsaOaepMgf1pKeyWrap , SecurityAlgorithms . Aes192CbcHmacSha384 )
482
+ } ,
483
+ new CreateTokenTheoryData ( )
484
+ {
485
+ TestId = "WrongRsaOaepKeyWrapIdentifier-Aes192CbcHmacSha384" ,
486
+ ValidationParameters = Default . TokenValidationParameters ( KeyingMaterial . RsaSecurityKey_2048 , Default . SymmetricSigningKey256 ) ,
487
+ Payload = Default . PayloadString ,
488
+ SigningCredentials = Default . SymmetricSigningCredentials ,
489
+ EncryptingCredentials = new EncryptingCredentials ( KeyingMaterial . RsaSecurityKey_2048 , SecurityAlgorithms . RsaOaepKeyWrap , SecurityAlgorithms . Aes192CbcHmacSha384 )
458
490
}
459
491
} ;
460
492
}
0 commit comments