Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

Getting error while authenticating U2F token with com.yubico 0.18.1 #39

Closed
amitnaik opened this issue Apr 19, 2019 · 6 comments
Closed
Assignees
Labels

Comments

@amitnaik
Copy link

Hello, we have Yubico tokens but recently we are not able to login to our application. This is the java exception we are getting when we are trying to login with Yubico key. Please help us resolving this problem. I have attached error logs for the same while user attempts to login.
blackice.log

@emlun emlun self-assigned this Apr 23, 2019
@emlun
Copy link
Member

emlun commented Apr 23, 2019

Hi!

Looks like KeyFactory doesn't have access to a BouncyCastleProvider security provider. This should be set up by the static initializer in BouncyCastleCrypto, but I suspect that's a bit fragile.

Is this an existing system or a new one in development?

@emlun
Copy link
Member

emlun commented Apr 23, 2019

I pushed an attempt to fix this on branch issue-39-ecdsa-keyfactory-not-available, you're welcome to test if that works for you.

@emlun emlun added the bug label Apr 23, 2019
@amitnaik
Copy link
Author

Thank you for this fix! Could you please tell me the version for u2flib-server-core version.
Currently we are using 0.18.1

@emlun
Copy link
Member

emlun commented Apr 25, 2019

I haven't released the prototype as a versioned release yet. Are you able to try to build branch issue-39-ecdsa-keyfactory-not-available and test if the fix works?

@amitnaik
Copy link
Author

amitnaik commented Apr 25, 2019

I have tested this with main method

public static void main(String[] args) throws Exception {
Provider provider = new BouncyCastleProvider();
Signature ecdsaSignature = Signature.getInstance("SHA256withECDSA", provider);

    X9ECParameters curve = SECNamedCurves.getByName("secp256r1");
    ECPoint point = null;

    KeyFactory.getInstance("ECDSA", provider).generatePublic(
            new ECPublicKeySpec(point,
                    new ECParameterSpec(
                            curve.getCurve(),
                            curve.getG(),
                            curve.getN(),
                            curve.getH())));
}

It is now working fine and its not throwing any exceptions

Requesting you to release this one!

@emlun
Copy link
Member

emlun commented Apr 28, 2019

Great, thanks! I just pushed version 0.19.3-RC1 into the relase pipeline, it should show up on Maven Central soon. If nothing else comes up in a week I'll promote it to a proper 0.19.3 release.

@emlun emlun closed this as completed Apr 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants