diff --git a/docs/simplesamlphp-changelog.txt b/docs/simplesamlphp-changelog.txt index 1ee2fe9eb961cb18e118718193704e6112103f82..94fe7be478b9ce89a929ed9923be7019c79dbf60 100644 --- a/docs/simplesamlphp-changelog.txt +++ b/docs/simplesamlphp-changelog.txt @@ -22,6 +22,7 @@ See the upgrade notes for specific information about upgrading. * `SimpleSAML_Utilities::getRequestURI` * `SimpleSAML_Utilities::getScriptName` * `SimpleSAML_Utilities::getSelfProtocol` + * `SimpleSAML_Utilities::cert_fingerprint` * `SimpleSAML_Metadata_MetaDataStorageHandlerSAML2Meta` * Moved function from Utilities-class to more appropriate locations. * `getAuthority` to `SimpleSAML_IdP` diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php index 9b937d8855ca13e63707685bb60d3766fa7a11da..20325074815ccc97f1dd4158f3f023de759ad765 100644 --- a/lib/SimpleSAML/Utilities.php +++ b/lib/SimpleSAML/Utilities.php @@ -240,12 +240,8 @@ class SimpleSAML_Utilities { } return TRUE; } - - public static function cert_fingerprint($pem) { - $x509data = base64_decode( $pem ); - return strtolower( sha1( $x509data ) ); - } - + + public static function generateID() { return '_' . self::stringToHex(self::generateRandomBytes(21)); }