Skip to content
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

Invalid certificate chain error using Neowave Winkeo key #582

Open
Florent-Coudrier opened this issue Dec 5, 2024 · 3 comments
Open

Invalid certificate chain error using Neowave Winkeo key #582

Florent-Coudrier opened this issue Dec 5, 2024 · 3 comments
Assignees

Comments

@Florent-Coudrier
Copy link

Hello,

I'm currently performing some tests with different Fido2 keys and have an issue with one of the them: Neowave Winkeo model.
(https://neowave.fr/fr/produits/gamme-fido-2/winkeo-c-fido-2/)

When I try to register the key, I receive this error from the library:

Fido2NetLib.Fido2VerificationException: Invalid certificate chain
at Fido2NetLib.AuthenticatorAttestationResponse.VerifyAsync(CredentialCreateOptions originalOptions, Fido2Configuration config, IsCredentialIdUniqueToUserAsyncDelegate isCredentialIdUniqueToUser, IMetadataService metadataService, Byte[] requestTokenBindingId, CancellationToken cancellationToken)
at Fido2NetLib.Fido2.MakeNewCredentialAsync(AuthenticatorAttestationRawResponse attestationResponse, CredentialCreateOptions origChallenge, IsCredentialIdUniqueToUserAsyncDelegate isCredentialIdUniqueToUser, Byte[] requestTokenBindingId, CancellationToken cancellationToken)
at TB.Fido.Server.Api.Impl.Login.Current.Registration.MakeCredentialCommandHandler.Handle(MakeCredentialCommand request, CancellationToken cancellationToken)

After investigation, it appears that disabling the online revocation check make the registration works. (CRLDP extension is present in the attestation certificate)
To make it work, I basically commented this line like this:

// if the attestation cert has a CDP extension, go ahead and turn on online revocation checking if (!string.IsNullOrEmpty(CDPFromCertificateExts(trustPath[0].Extensions)) && validationMode != FidoValidationMode.FidoConformance2024) //chain.ChainPolicy.RevocationMode = X509RevocationMode.Online;

I've seen some similar issues regarding the trust path chain validation, but it looks like this issue is different.

If you have any idea or solution about that, I would love it.

Thank you

@aseigler
Copy link
Collaborator

aseigler commented Dec 5, 2024

If you can please provide a sample registration output, I would like try to get all the trust path issues put to bed prior to the next release.

@Florent-Coudrier
Copy link
Author

Hello,

Here is a sample registration output from WebAuthn.

{ "id": "fkZPgHmaGs0RnxzAw5zMmzFlQPtNTNj7_6dwV-Rey8M", "rawId": "fkZPgHmaGs0RnxzAw5zMmzFlQPtNTNj7_6dwV-Rey8M", "type": "public-key", "extensions": {}, "response": { "attestationObject": "o2NmbXRmcGFja2VkZ2F0dFN0bXSjY2FsZyZjc2lnWEcwRQIgf-TKwKP3NRNIOMrkXEcUAomS4sjeyOJ_rR6kB7jFqKoCIQCZIUB1GvU9jqgVevgoLuo0OTRaToXU7vQ7m-8M7748-2N4NWOBWQSdMIIEmTCCBD-gAwIBAgIQZoGUWqM7jnhW2nmV4EZW1jAKBggqhkjOPQQDAjB0MQswCQYDVQQGEwJGUjETMBEGA1UEChMKQ2VydEV1cm9wZTEXMBUGA1UECxMOMDAwMiA0MzQyMDIxODAxHTAbBgNVBAMTFENlcnRFdXJvcGUgSWRlY3lzIENBMRgwFgYDVQRhEw9OVFJGUi00MzQyMDIxODAwHhcNMjAwNjIyMTIzMjIzWhcNMjgwMTIxMjMwMDAwWjCBsDELMAkGA1UEBhMCRlIxEDAOBgNVBAoTB05FT1dBVkUxIjAgBgNVBAsTGUF1dGhlbnRpY2F0b3IgQXR0ZXN0YXRpb24xJjAkBgNVBAMTHUZJRE8yIEF0dGVzdGF0aW9uIENlcnRpZmljYXRlMREwDwYDVQQHEwhHYXJkYW5uZTEhMB8GCSqGSIb3DQEJARYSY29udGFjdEBuZW93YXZlLmZyMQ0wCwYDVQQIEwRQQUNBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE64J-F8-nXNC8pToUHRksVq2b5RFvr5lOOlK6zpj1y0GHgOITTS7DiVd6cN_GtQr2e78HS0NIi7Aw_1AuPs7kh6OCAnQwggJwMBMGA1UdJQQMMAoGCCsGAQUFBwMCMBMGA1UdIwQMMAqACENpBuFMW2NyMEwGCCsGAQUFBwEBBEAwPjA8BggrBgEF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YIJJlXkO7AuG4IMM9lOir_eP_ZtjHbZYfaRnBDLtQswfN", "clientDataJSON": "eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiRUdiUElHMGdwa2VtXzRnX0tNTjRPZyIsIm9yaWdpbiI6Imh0dHA6Ly9sb2NhbGhvc3Q6NTE4NSIsImNyb3NzT3JpZ2luIjpmYWxzZX0" } }

Thanks for your help.

When do you plan to perform the next library release ?

@aseigler aseigler self-assigned this Dec 10, 2024
@aseigler
Copy link
Collaborator

The CDP is at http://www.certeurope.fr/reference/certeurope_ec_idecys.crl, it's empty and there are no obvious issues with it. Does your server lack outbound internet access or name resolution to get to the CRL file? That would certainly cause this sort of problem. I could not reproduce the problem you describe from my end.

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

No branches or pull requests

2 participants