@@ -158,6 +158,7 @@ public void testLoadFromFileEmpty() throws IOException, CertificateException, UR
158158 assertEquals ("exact" , setting .getRequestedAuthnContextComparison ());
159159 assertTrue (setting .getWantXMLValidation ());
160160 assertEquals (Constants .RSA_SHA1 , setting .getSignatureAlgorithm ());
161+ assertEquals (Constants .SHA1 , setting .getDigestAlgorithm ());
161162 assertFalse (setting .getSignMetadata ());
162163
163164 assertNull (setting .getOrganization ());
@@ -213,6 +214,7 @@ public void testLoadFromFileMinProp() throws IOException, CertificateException,
213214 assertEquals ("exact" , setting .getRequestedAuthnContextComparison ());
214215 assertTrue (setting .getWantXMLValidation ());
215216 assertEquals (Constants .RSA_SHA1 , setting .getSignatureAlgorithm ());
217+ assertEquals (Constants .SHA1 , setting .getDigestAlgorithm ());
216218 assertFalse (setting .getSignMetadata ());
217219
218220 assertNull (setting .getOrganization ());
@@ -273,6 +275,7 @@ public void testLoadFromFileAllProp() throws IOException, CertificateException,
273275 assertEquals ("exact" , setting .getRequestedAuthnContextComparison ());
274276 assertTrue (setting .getWantXMLValidation ());
275277 assertEquals (Constants .RSA_SHA512 , setting .getSignatureAlgorithm ());
278+ assertEquals (Constants .SHA512 , setting .getDigestAlgorithm ());
276279 assertTrue (setting .getSignMetadata ());
277280
278281 Organization org = new Organization ("SP Java" , "SP Java Example" , "http://sp.example.com" );
@@ -338,6 +341,7 @@ public void testLoadFromFileCertString() throws IOException, CertificateExceptio
338341 assertEquals ("exact" , setting .getRequestedAuthnContextComparison ());
339342 assertTrue (setting .getWantXMLValidation ());
340343 assertEquals (Constants .RSA_SHA1 , setting .getSignatureAlgorithm ());
344+ assertEquals (Constants .SHA1 , setting .getDigestAlgorithm ());
341345 assertFalse (setting .getSignMetadata ());
342346
343347 Organization org = new Organization ("SP Java" , "SP Java Example" , "http://sp.example.com" );
@@ -392,6 +396,7 @@ public void testLoadFromFileContactString() throws IOException, CertificateExcep
392396 assertEquals ("exact" , setting .getRequestedAuthnContextComparison ());
393397 assertTrue (setting .getWantXMLValidation ());
394398 assertEquals (Constants .RSA_SHA1 , setting .getSignatureAlgorithm ());
399+ assertEquals (Constants .SHA1 , setting .getDigestAlgorithm ());
395400 assertFalse (setting .getSignMetadata ());
396401
397402 Organization org = new Organization ("SP Java" , "SP Java Example" , "http://sp.example.com" );
@@ -504,6 +509,7 @@ public void testLoadFromFileSomeEmptyProp() throws IOException, CertificateExcep
504509 assertEquals ("exact" , setting .getRequestedAuthnContextComparison ());
505510 assertTrue (setting .getWantXMLValidation ());
506511 assertEquals (Constants .RSA_SHA1 , setting .getSignatureAlgorithm ());
512+ assertEquals (Constants .SHA1 , setting .getDigestAlgorithm ());
507513 assertTrue (setting .getSignMetadata ());
508514
509515 assertNull (setting .getOrganization ());
@@ -560,6 +566,7 @@ public void testLoadFromFileDifferentProp() throws IOException, CertificateExcep
560566 assertEquals ("minimum" , setting .getRequestedAuthnContextComparison ());
561567 assertTrue (setting .getWantXMLValidation ());
562568 assertEquals (Constants .RSA_SHA512 , setting .getSignatureAlgorithm ());
569+ assertEquals (Constants .SHA512 , setting .getDigestAlgorithm ());
563570 assertTrue (setting .getSignMetadata ());
564571
565572 Organization org = new Organization ("SP Java" , "" , "" );
@@ -652,6 +659,7 @@ public void testFromProperties() throws IOException, Error, CertificateException
652659 assertEquals ("exact" , setting2 .getRequestedAuthnContextComparison ());
653660 assertTrue (setting2 .getWantXMLValidation ());
654661 assertEquals (Constants .RSA_SHA1 , setting2 .getSignatureAlgorithm ());
662+ assertEquals (Constants .SHA1 , setting2 .getDigestAlgorithm ());
655663 assertFalse (setting2 .getSignMetadata ());
656664
657665 assertNull (setting2 .getOrganization ());
@@ -713,6 +721,7 @@ public void testLoadFromValues() throws Exception {
713721 samlData .put (SECURITY_REQUESTED_AUTHNCONTEXTCOMPARISON , "exact" );
714722 samlData .put (SECURITY_WANT_XML_VALIDATION , "true" );
715723 samlData .put (SECURITY_SIGNATURE_ALGORITHM , "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512" );
724+ samlData .put (SECURITY_DIGEST_ALGORITHM , "http://www.w3.org/2001/04/xmlenc#sha512" );
716725
717726 // Compress
718727 samlData .put (COMPRESS_REQUEST , "false" );
@@ -777,6 +786,7 @@ public void testLoadFromValues() throws Exception {
777786 assertEquals ("exact" , setting .getRequestedAuthnContextComparison ());
778787 assertTrue (setting .getWantXMLValidation ());
779788 assertEquals (Constants .RSA_SHA512 , setting .getSignatureAlgorithm ());
789+ assertEquals (Constants .SHA512 , setting .getDigestAlgorithm ());
780790 assertTrue (setting .getSignMetadata ());
781791 assertFalse (setting .getWantNameId ());
782792
@@ -868,6 +878,7 @@ public void testLoadFromValuesWithObjects() throws Exception {
868878 samlData .put (SECURITY_REQUESTED_AUTHNCONTEXTCOMPARISON , "exact" );
869879 samlData .put (SECURITY_WANT_XML_VALIDATION , true );
870880 samlData .put (SECURITY_SIGNATURE_ALGORITHM , "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512" );
881+ samlData .put (SECURITY_DIGEST_ALGORITHM , "http://www.w3.org/2001/04/xmlenc#sha512" );
871882
872883 // Compress
873884 samlData .put (COMPRESS_REQUEST , "false" );
@@ -924,6 +935,7 @@ public void testLoadFromValuesWithObjects() throws Exception {
924935 assertEquals ("exact" , setting .getRequestedAuthnContextComparison ());
925936 assertTrue (setting .getWantXMLValidation ());
926937 assertEquals (Constants .RSA_SHA512 , setting .getSignatureAlgorithm ());
938+ assertEquals (Constants .SHA512 , setting .getDigestAlgorithm ());
927939 assertTrue (setting .getSignMetadata ());
928940 assertFalse (setting .getWantNameId ());
929941
0 commit comments