-
-
Notifications
You must be signed in to change notification settings - Fork 600
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #855 from Slamdunk/openssl_key_requirements
Require minimum key size for OpenSSL keys
- Loading branch information
Showing
52 changed files
with
1,211 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Lcobucci\JWT\Signer\Ecdsa; | ||
|
||
use Lcobucci\JWT\Signer\UnsafeEcdsa; | ||
|
||
use const OPENSSL_ALGO_SHA256; | ||
|
||
/** @deprecated Deprecated since v4.2 */ | ||
final class UnsafeSha256 extends UnsafeEcdsa | ||
{ | ||
public function algorithmId(): string | ||
{ | ||
return 'ES256'; | ||
} | ||
|
||
public function algorithm(): int | ||
{ | ||
return OPENSSL_ALGO_SHA256; | ||
} | ||
|
||
public function keyLength(): int | ||
{ | ||
return 64; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Lcobucci\JWT\Signer\Ecdsa; | ||
|
||
use Lcobucci\JWT\Signer\UnsafeEcdsa; | ||
|
||
use const OPENSSL_ALGO_SHA384; | ||
|
||
/** @deprecated Deprecated since v4.2 */ | ||
final class UnsafeSha384 extends UnsafeEcdsa | ||
{ | ||
public function algorithmId(): string | ||
{ | ||
return 'ES384'; | ||
} | ||
|
||
public function algorithm(): int | ||
{ | ||
return OPENSSL_ALGO_SHA384; | ||
} | ||
|
||
public function keyLength(): int | ||
{ | ||
return 96; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Lcobucci\JWT\Signer\Ecdsa; | ||
|
||
use Lcobucci\JWT\Signer\UnsafeEcdsa; | ||
|
||
use const OPENSSL_ALGO_SHA512; | ||
|
||
/** @deprecated Deprecated since v4.2 */ | ||
final class UnsafeSha512 extends UnsafeEcdsa | ||
{ | ||
public function algorithmId(): string | ||
{ | ||
return 'ES512'; | ||
} | ||
|
||
public function algorithm(): int | ||
{ | ||
return OPENSSL_ALGO_SHA512; | ||
} | ||
|
||
public function keyLength(): int | ||
{ | ||
return 132; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Lcobucci\JWT\Signer\Rsa; | ||
|
||
use Lcobucci\JWT\Signer\UnsafeRsa; | ||
|
||
use const OPENSSL_ALGO_SHA256; | ||
|
||
/** @deprecated Deprecated since v4.2 */ | ||
final class UnsafeSha256 extends UnsafeRsa | ||
{ | ||
public function algorithmId(): string | ||
{ | ||
return 'RS256'; | ||
} | ||
|
||
public function algorithm(): int | ||
{ | ||
return OPENSSL_ALGO_SHA256; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Lcobucci\JWT\Signer\Rsa; | ||
|
||
use Lcobucci\JWT\Signer\UnsafeRsa; | ||
|
||
use const OPENSSL_ALGO_SHA384; | ||
|
||
/** @deprecated Deprecated since v4.2 */ | ||
final class UnsafeSha384 extends UnsafeRsa | ||
{ | ||
public function algorithmId(): string | ||
{ | ||
return 'RS384'; | ||
} | ||
|
||
public function algorithm(): int | ||
{ | ||
return OPENSSL_ALGO_SHA384; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Lcobucci\JWT\Signer\Rsa; | ||
|
||
use Lcobucci\JWT\Signer\UnsafeRsa; | ||
|
||
use const OPENSSL_ALGO_SHA512; | ||
|
||
/** @deprecated Deprecated since v4.2 */ | ||
final class UnsafeSha512 extends UnsafeRsa | ||
{ | ||
public function algorithmId(): string | ||
{ | ||
return 'RS512'; | ||
} | ||
|
||
public function algorithm(): int | ||
{ | ||
return OPENSSL_ALGO_SHA512; | ||
} | ||
} |
Oops, something went wrong.