@@ -455,7 +455,7 @@ public function testSetBaseURL()
455455 $ this ->assertNull (OneLogin_Saml2_Utils::getSelfPort ());
456456 $ this ->assertNull (OneLogin_Saml2_Utils::getBaseURLPath ());
457457
458- $ this ->assertEquals ($ expectedUrlNQ , OneLogin_Saml2_Utils::getSelfURLNoQuery ());
458+ $ this ->assertEquals ($ expectedUrlNQ , OneLogin_Saml2_Utils::getSelfURLNoQuery ());
459459 $ this ->assertEquals ($ expectedRoutedUrlNQ , OneLogin_Saml2_Utils::getSelfRoutedURLNoQuery ());
460460 $ this ->assertEquals ($ expectedUrl , OneLogin_Saml2_Utils::getSelfURL ());
461461
@@ -469,14 +469,14 @@ public function testSetBaseURL()
469469 $ this ->assertEquals ('81 ' , OneLogin_Saml2_Utils::getSelfPort ());
470470 $ this ->assertEquals ('/example2/ ' , OneLogin_Saml2_Utils::getBaseURLPath ());
471471
472- $ this ->assertEquals ($ expectedUrlNQ2 , OneLogin_Saml2_Utils::getSelfURLNoQuery ());
472+ $ this ->assertEquals ($ expectedUrlNQ2 , OneLogin_Saml2_Utils::getSelfURLNoQuery ());
473473 $ this ->assertEquals ($ expectedRoutedUrlNQ2 , OneLogin_Saml2_Utils::getSelfRoutedURLNoQuery ());
474474 $ this ->assertEquals ($ expectedUrl2 , OneLogin_Saml2_Utils::getSelfURL ());
475475
476476 $ _SERVER ['PATH_INFO ' ] = '/test ' ;
477477 $ expectedUrlNQ2 = 'http://anothersp.example.com:81/example2/route.php/test ' ;
478478
479- $ this ->assertEquals ($ expectedUrlNQ2 , OneLogin_Saml2_Utils::getSelfURLNoQuery ());
479+ $ this ->assertEquals ($ expectedUrlNQ2 , OneLogin_Saml2_Utils::getSelfURLNoQuery ());
480480 $ this ->assertEquals ($ expectedRoutedUrlNQ2 , OneLogin_Saml2_Utils::getSelfRoutedURLNoQuery ());
481481 $ this ->assertEquals ($ expectedUrl2 , OneLogin_Saml2_Utils::getSelfURL ());
482482 }
@@ -929,7 +929,6 @@ public function testDeleteLocalSession()
929929 // Can't test that on TRAVIS
930930 $ this ->markTestSkipped ("Can't test that on TRAVIS " );
931931 } else {
932-
933932 if (!isset ($ _SESSION )) {
934933 $ _SESSION = array ();
935934 }
@@ -964,7 +963,6 @@ public function testisSessionStarted()
964963 // Can't test that on TRAVIS
965964 $ this ->markTestSkipped ("Can't test that on TRAVIS " );
966965 } else {
967-
968966 $ this ->assertFalse (OneLogin_Saml2_Utils::isSessionStarted ());
969967
970968 $ prev = error_reporting (0 );
@@ -994,6 +992,12 @@ public function testCalculateX509Fingerprint()
994992
995993 $ this ->assertNull (OneLogin_Saml2_Utils::calculateX509Fingerprint ($ key ));
996994
995+ $ this ->assertNull (OneLogin_Saml2_Utils::calculateX509Fingerprint ("" ));
996+
997+ $ this ->assertNull (OneLogin_Saml2_Utils::calculateX509Fingerprint ($ settingsInfo ['idp ' ]['x509cert ' ]));
998+
999+ $ this ->assertEquals ('afe71c28ef740bc87425be13a2263d37971da1f9 ' , OneLogin_Saml2_Utils::calculateX509Fingerprint (OneLogin_Saml2_Utils::formatCert ($ settingsInfo ['idp ' ]['x509cert ' ])));
1000+
9971001 $ this ->assertEquals ('afe71c28ef740bc87425be13a2263d37971da1f9 ' , OneLogin_Saml2_Utils::calculateX509Fingerprint ($ cert ));
9981002
9991003 $ this ->assertEquals ('afe71c28ef740bc87425be13a2263d37971da1f9 ' , OneLogin_Saml2_Utils::calculateX509Fingerprint ($ cert , 'sha1 ' ));
0 commit comments