Skip to content

Commit aeb0f42

Browse files
committed
Minor correction
1 parent b34d18b commit aeb0f42

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/SignatureAlgorithm/RSA/RSA.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,20 @@
1717
use Jose\Component\Core\JWK;
1818
use Jose\Component\Core\Util\RSAKey;
1919
use Jose\Component\Signature\Algorithm\Util\RSA as JoseRSA;
20+
use RuntimeException;
2021

2122
/**
2223
* @deprecated Please use either RSAPSS or RSAPKCS1 depending on the padding mode
2324
*/
2425
abstract class RSA implements SignatureAlgorithm
2526
{
27+
public function __construct()
28+
{
29+
if (!\extension_loaded('gmp')) {
30+
throw new RuntimeException(static::class.' requires gmp extension');
31+
}
32+
}
33+
2634
public function allowedKeyTypes(): array
2735
{
2836
return ['RSA'];

0 commit comments

Comments
 (0)