@@ -91,7 +91,7 @@ public void testEncryptionContentCreation() throws Exception {
9191 // Set up the Configuration
9292 XMLSecurityProperties properties = new XMLSecurityProperties ();
9393 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
94- actions .add (XMLSecurityConstants .ENCRYPT );
94+ actions .add (XMLSecurityConstants .ENCRYPTION );
9595 properties .setActions (actions );
9696
9797 // Set the key up
@@ -149,7 +149,7 @@ public void testEncryptRootElementInRequest() throws Exception {
149149 // Set up the Configuration
150150 XMLSecurityProperties properties = new XMLSecurityProperties ();
151151 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
152- actions .add (XMLSecurityConstants .ENCRYPT );
152+ actions .add (XMLSecurityConstants .ENCRYPTION );
153153 properties .setActions (actions );
154154
155155 // Set the key up
@@ -205,7 +205,7 @@ public void testExceptionOnElementToEncryptNotFound() throws Exception {
205205 // Set up the Configuration
206206 XMLSecurityProperties properties = new XMLSecurityProperties ();
207207 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
208- actions .add (XMLSecurityConstants .ENCRYPT );
208+ actions .add (XMLSecurityConstants .ENCRYPTION );
209209 properties .setActions (actions );
210210
211211 // Set the key up
@@ -238,10 +238,19 @@ public void testExceptionOnElementToEncryptNotFound() throws Exception {
238238
239239 @ Test
240240 public void testEncryptionElementCreation () throws Exception {
241+ testEncryptElementCreation (XMLSecurityConstants .ENCRYPTION );
242+ }
243+
244+ @ Test
245+ public void testEncryptBackwardCompatibility () throws Exception {
246+ testEncryptElementCreation (XMLSecurityConstants .ENCRYPT );
247+ }
248+
249+ private void testEncryptElementCreation (XMLSecurityConstants .Action action ) throws Exception {
241250 // Set up the Configuration
242251 XMLSecurityProperties properties = new XMLSecurityProperties ();
243252 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
244- actions .add (XMLSecurityConstants . ENCRYPT );
253+ actions .add (action );
245254 properties .setActions (actions );
246255
247256 // Set the key up
@@ -299,7 +308,7 @@ public void testStrongEncryption() throws Exception {
299308 // Set up the Configuration
300309 XMLSecurityProperties properties = new XMLSecurityProperties ();
301310 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
302- actions .add (XMLSecurityConstants .ENCRYPT );
311+ actions .add (XMLSecurityConstants .ENCRYPTION );
303312 properties .setActions (actions );
304313
305314 // Set the key up
@@ -358,7 +367,7 @@ public void testEncryptionMultipleElements() throws Exception {
358367 // Set up the Configuration
359368 XMLSecurityProperties properties = new XMLSecurityProperties ();
360369 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
361- actions .add (XMLSecurityConstants .ENCRYPT );
370+ actions .add (XMLSecurityConstants .ENCRYPTION );
362371 properties .setActions (actions );
363372
364373 // Set the key up
@@ -412,7 +421,7 @@ public void testAES128ElementAES192KWCipherUsingKEKOutbound() throws Exception {
412421 // Set up the Configuration
413422 XMLSecurityProperties properties = new XMLSecurityProperties ();
414423 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
415- actions .add (XMLSecurityConstants .ENCRYPT );
424+ actions .add (XMLSecurityConstants .ENCRYPTION );
416425 properties .setActions (actions );
417426
418427 // Set the key up
@@ -478,7 +487,7 @@ public void testAES256ElementRSAKWCipherUsingKEKOutbound() throws Exception {
478487 // Set up the Configuration
479488 XMLSecurityProperties properties = new XMLSecurityProperties ();
480489 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
481- actions .add (XMLSecurityConstants .ENCRYPT );
490+ actions .add (XMLSecurityConstants .ENCRYPTION );
482491 properties .setActions (actions );
483492
484493 // Set the key up
@@ -546,7 +555,7 @@ public void testEncryptedKeyKeyValueReference() throws Exception {
546555 // Set up the Configuration
547556 XMLSecurityProperties properties = new XMLSecurityProperties ();
548557 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
549- actions .add (XMLSecurityConstants .ENCRYPT );
558+ actions .add (XMLSecurityConstants .ENCRYPTION );
550559 properties .setActions (actions );
551560
552561 // Set the key up
@@ -615,7 +624,7 @@ public void testEncryptedKeyKeyNameReference() throws Exception {
615624 // Set up the Configuration
616625 XMLSecurityProperties properties = new XMLSecurityProperties ();
617626 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
618- actions .add (XMLSecurityConstants .ENCRYPT );
627+ actions .add (XMLSecurityConstants .ENCRYPTION );
619628 properties .setActions (actions );
620629
621630 // Set the key up
@@ -685,7 +694,7 @@ public void testEncryptedKeyMultipleElements() throws Exception {
685694 // Set up the Configuration
686695 XMLSecurityProperties properties = new XMLSecurityProperties ();
687696 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
688- actions .add (XMLSecurityConstants .ENCRYPT );
697+ actions .add (XMLSecurityConstants .ENCRYPTION );
689698 properties .setActions (actions );
690699
691700 // Set the key up
@@ -749,7 +758,7 @@ public void testEncryptedKeyIssuerSerialReference() throws Exception {
749758 // Set up the Configuration
750759 XMLSecurityProperties properties = new XMLSecurityProperties ();
751760 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
752- actions .add (XMLSecurityConstants .ENCRYPT );
761+ actions .add (XMLSecurityConstants .ENCRYPTION );
753762 properties .setActions (actions );
754763
755764 // Set the key up
@@ -820,7 +829,7 @@ public void testEncryptedKeyX509CertificateReference() throws Exception {
820829 // Set up the Configuration
821830 XMLSecurityProperties properties = new XMLSecurityProperties ();
822831 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
823- actions .add (XMLSecurityConstants .ENCRYPT );
832+ actions .add (XMLSecurityConstants .ENCRYPTION );
824833 properties .setActions (actions );
825834
826835 // Set the key up
@@ -899,7 +908,7 @@ public void testEncryptedKeySKI() throws Exception {
899908 // Set up the Configuration
900909 XMLSecurityProperties properties = new XMLSecurityProperties ();
901910 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
902- actions .add (XMLSecurityConstants .ENCRYPT );
911+ actions .add (XMLSecurityConstants .ENCRYPTION );
903912 properties .setActions (actions );
904913
905914 // Set the key up
@@ -970,7 +979,7 @@ public void testEncryptedKeyX509SubjectName() throws Exception {
970979 // Set up the Configuration
971980 XMLSecurityProperties properties = new XMLSecurityProperties ();
972981 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
973- actions .add (XMLSecurityConstants .ENCRYPT );
982+ actions .add (XMLSecurityConstants .ENCRYPTION );
974983 properties .setActions (actions );
975984
976985 // Set the key up
@@ -1041,7 +1050,7 @@ public void testEncryptedKeyNoKeyInfo() throws Exception {
10411050 // Set up the Configuration
10421051 XMLSecurityProperties properties = new XMLSecurityProperties ();
10431052 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
1044- actions .add (XMLSecurityConstants .ENCRYPT );
1053+ actions .add (XMLSecurityConstants .ENCRYPTION );
10451054 properties .setActions (actions );
10461055
10471056 // Set the key up
@@ -1115,7 +1124,7 @@ public void testAES192Element3DESKWCipher() throws Exception {
11151124 // Set up the Configuration
11161125 XMLSecurityProperties properties = new XMLSecurityProperties ();
11171126 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
1118- actions .add (XMLSecurityConstants .ENCRYPT );
1127+ actions .add (XMLSecurityConstants .ENCRYPTION );
11191128 properties .setActions (actions );
11201129
11211130 // Set the key up
@@ -1179,7 +1188,7 @@ public void testTripleDesElementCipher() throws Exception {
11791188 // Set up the Configuration
11801189 XMLSecurityProperties properties = new XMLSecurityProperties ();
11811190 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
1182- actions .add (XMLSecurityConstants .ENCRYPT );
1191+ actions .add (XMLSecurityConstants .ENCRYPTION );
11831192 properties .setActions (actions );
11841193
11851194 // Set the key up
@@ -1240,7 +1249,7 @@ public void testAes128ElementCipher() throws Exception {
12401249 // Set up the Configuration
12411250 XMLSecurityProperties properties = new XMLSecurityProperties ();
12421251 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
1243- actions .add (XMLSecurityConstants .ENCRYPT );
1252+ actions .add (XMLSecurityConstants .ENCRYPTION );
12441253 properties .setActions (actions );
12451254
12461255 // Set the key up
@@ -1303,7 +1312,7 @@ public void testAes192ElementCipher() throws Exception {
13031312 // Set up the Configuration
13041313 XMLSecurityProperties properties = new XMLSecurityProperties ();
13051314 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
1306- actions .add (XMLSecurityConstants .ENCRYPT );
1315+ actions .add (XMLSecurityConstants .ENCRYPTION );
13071316 properties .setActions (actions );
13081317
13091318 // Set the key up
@@ -1368,7 +1377,7 @@ public void testAes256ElementCipher() throws Exception {
13681377 // Set up the Configuration
13691378 XMLSecurityProperties properties = new XMLSecurityProperties ();
13701379 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
1371- actions .add (XMLSecurityConstants .ENCRYPT );
1380+ actions .add (XMLSecurityConstants .ENCRYPTION );
13721381 properties .setActions (actions );
13731382
13741383 // Set the key up
@@ -1435,7 +1444,7 @@ public void testTripleDesDocumentCipher() throws Exception {
14351444 // Set up the Configuration
14361445 XMLSecurityProperties properties = new XMLSecurityProperties ();
14371446 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
1438- actions .add (XMLSecurityConstants .ENCRYPT );
1447+ actions .add (XMLSecurityConstants .ENCRYPTION );
14391448 properties .setActions (actions );
14401449
14411450 // Set the key up
@@ -1497,7 +1506,7 @@ public void testPhysicalRepresentation1() throws Exception {
14971506 // Set up the Configuration
14981507 XMLSecurityProperties properties = new XMLSecurityProperties ();
14991508 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
1500- actions .add (XMLSecurityConstants .ENCRYPT );
1509+ actions .add (XMLSecurityConstants .ENCRYPTION );
15011510 properties .setActions (actions );
15021511
15031512 // Set the key up
@@ -1560,7 +1569,7 @@ public void testPhysicalRepresentation2() throws Exception {
15601569 // Set up the Configuration
15611570 XMLSecurityProperties properties = new XMLSecurityProperties ();
15621571 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
1563- actions .add (XMLSecurityConstants .ENCRYPT );
1572+ actions .add (XMLSecurityConstants .ENCRYPTION );
15641573 properties .setActions (actions );
15651574
15661575 // Set the key up
@@ -1622,7 +1631,7 @@ public void testTransportKey() throws Exception {
16221631 // Set up the Configuration
16231632 XMLSecurityProperties properties = new XMLSecurityProperties ();
16241633 List <XMLSecurityConstants .Action > actions = new ArrayList <>();
1625- actions .add (XMLSecurityConstants .ENCRYPT );
1634+ actions .add (XMLSecurityConstants .ENCRYPTION );
16261635 properties .setActions (actions );
16271636
16281637 // Set the key up - only specify a transport key, so the session key gets generated
0 commit comments