feat: Add support for PS256#637
Open
Hectorhammett wants to merge 1 commit into
Open
Conversation
7a42c5e to
bf1a304
Compare
bf1a304 to
7de83ee
Compare
7de83ee to
2180b97
Compare
bshaffer
reviewed
Jun 5, 2026
Collaborator
bshaffer
left a comment
There was a problem hiding this comment.
looks great! some minor suggestions is all I have
Comment on lines
+786
to
+789
| } elseif (!\is_string($key)) { | ||
| throw new DomainException( | ||
| 'The key needs to be an instance of string|OpenSSLAsymmetricKey|OpenSSLCertificate.' | ||
| ); |
Collaborator
There was a problem hiding this comment.
I believe this is unreachable -- the typehints are already defined, so anything that would evaluate true here would already have thrown a TypeError when this function is called.
Suggested change
| } elseif (!\is_string($key)) { | |
| throw new DomainException( | |
| 'The key needs to be an instance of string|OpenSSLAsymmetricKey|OpenSSLCertificate.' | |
| ); |
Comment on lines
+828
to
+831
| } elseif (!\is_string($key)) { | ||
| throw new DomainException( | ||
| 'The key needs to be an instance of string|OpenSSLAsymmetricKey|OpenSSLCertificate.' | ||
| ); |
Collaborator
There was a problem hiding this comment.
Same here - this validation block is unreachable
Suggested change
| } elseif (!\is_string($key)) { | |
| throw new DomainException( | |
| 'The key needs to be an instance of string|OpenSSLAsymmetricKey|OpenSSLCertificate.' | |
| ); |
|
|
||
| ### Note | ||
| PHP's OpenSSL extension does not support RSASSA-PSS signatures (PS256) by default, so we provide support via a soft dependency on the [phpseclib/phpseclib](https://github.com/phpseclib/phpseclib) library. It is necessary to install this library in your project if you plan to use PS256. | ||
|
|
Collaborator
There was a problem hiding this comment.
Suggest adding a fenced codeblock here so it's harder to overlook:
composer install phpseclib/phpseclib:^3.0
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes: #579