17 changes: 13 additions & 4 deletions Helper/lib/XMLSecLibs/XMLSecurityKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* xmlseclibs.php
*
* Copyright (c) 2007-2017, Robert Richards <rrichards@cdatazone.org>.
* Copyright (c) 2007-2019, Robert Richards <rrichards@cdatazone.org>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -40,7 +40,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @author Robert Richards <rrichards@cdatazone.org>
* @copyright 2007-2017 Robert Richards <rrichards@cdatazone.org>
* @copyright 2007-2019 Robert Richards <rrichards@cdatazone.org>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
*/

Expand Down Expand Up @@ -575,17 +575,26 @@ public function decryptData($data)
*/
public function signData($data)
{

switch ($this->cryptParams['library']) {
case 'openssl':
return $this->signOpenSSL($data);
case (self::HMAC_SHA1):

return hash_hmac("sha1", $data, $this->key, true);
}
}

/**
* Verifies the data (string) against the given signature using the extension assigned to the type in the constructor.
*
* Returns in case of openSSL:
* 1 on succesful signature verification,
* 0 when signature verification failed,
* -1 if an error occurred during processing.
*
* NOTE: be very careful when checking the return value, because in PHP,
* -1 will be cast to True when in boolean context. So always check the
* return value in a strictly typed way, e.g. "$obj->verify(...) === 1".
*
* @param string $data
* @param string $signature
* @return bool|int
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'uploadfolder' => 0,
'createDirs' => '',
'clearCacheOnLoad' => 0,
'version' => '1.4.2',
'version' => '1.4.3',
'constraints' => [
'depends' => [
'typo3' => '8.7.0-10.6.0',
Expand Down