Skip to content

Commit

Permalink
Merge pull request #40 from vippsas/2.4.12
Browse files Browse the repository at this point in the history
2.4.12
  • Loading branch information
voleye authored Jun 23, 2022
2 parents e2c9426 + 0a6e21f commit e9e05b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions Gateway/Command/TokenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
use Vipps\Login\Model\ConfigInterface;
use Psr\Log\LoggerInterface;
use Firebase\JWT\JWT;
use phpseclib\Crypt\RSA;
use phpseclib\Math\BigInteger;
use phpseclib3\Crypt\PublicKeyLoader;
use phpseclib3\Math\BigInteger;

/**
* Class TokenCommand
Expand Down Expand Up @@ -165,14 +165,13 @@ private function getPublicKeys()
array_key_exists('n', $key) &&
array_key_exists('kid', $key)
) {
$rsa = new RSA();
$rsa->loadKey(
$pkey = PublicKeyLoader::load(
[
'e' => new BigInteger(base64_decode($key['e']), 256),
'n' => new BigInteger(base64_decode(strtr($key['n'], '-_', '+/'), true), 256)
]
);
$publicKeys[$key['kid']] = $rsa->getPublicKey();
$publicKeys[$key['kid']] = $pkey->toString('PKCS8');
}
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"psr/log": "~1.0"
},
"type": "magento2-module",
"version": "2.4.11",
"version": "2.4.12",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
-->

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Vipps_Login" setup_version="2.4.11">
<module name="Vipps_Login" setup_version="2.4.12">
<sequence>
<module name="Magento_Customer"/>
<module name="Magento_Checkout"/>
Expand Down

0 comments on commit e9e05b0

Please sign in to comment.