Skip to content

Allow id-card authentication when Extended Key Usage is not present in certificate #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

svenzik
Copy link
Contributor

@svenzik svenzik commented Mar 26, 2025

  • Allow id-card authentication when Extended Key Usage is not present in certificate
  • Test should fail because key usage is missing

Signed-off-by: Sven Mitt [email protected]

if (in_array($algorithm, self::RSASSA_PSS_ALGORITHMS)) {
$publicKey = openssl_get_publickey($publicKey->withPadding(RSA::SIGNATURE_PSS)->toString('PSS'));
if (!$publicKey) {
throw new AuthTokenParseException();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think exception message is needed here as the context is different than elsewhere.

if (!$usages || empty($usages)) {
// Digital Signature extension present, but Extended Key Usage extension not present,
// assume it is an authentication certificate (e.g. Luxembourg eID).
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 76 has a debug log message, it is needed here as well before return for consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants