Yubico Forum

...visit our web-store at store.yubico.com
It is currently Fri Feb 23, 2018 9:41 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Dec 04, 2017 2:27 pm 
Offline

Joined: Mon Dec 04, 2017 2:18 pm
Posts: 3
Hello
I'm trying to integrate U2F authentication in our web application using the sample code you provide.
Both on our application than with your u2flib-server-demo application when I try to perform a registration I get following error message:

Code:
{"errorCode":1,"errorMessage":"device status code: -200"}


What could be its reason?

I'm performing the tests on Ubuntu 14.04 using Chrome version 63.0.3239.59 and a Yubikey NEO

Thanks a lot for your support and best regards

Patrick


Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

PostPosted: Tue Dec 05, 2017 4:50 pm 
Offline

Joined: Mon Dec 04, 2017 2:18 pm
Posts: 3
Hello,
the problem I had yesterday was probably related to my Ubuntu PC.
I've tried now using a MacOS and it works fine.
However when I try to register in my application (where for the moment I've simply used the sample code provided in your example) I get a "Bad signature" error message during the finishRegistration method:

Code:
com.yubico.u2f.exceptions.U2fBadInputException: Bad signature
   at com.yubico.u2f.crypto.BouncyCastleCrypto.checkSignature(BouncyCastleCrypto.java:45)
   at com.yubico.u2f.crypto.BouncyCastleCrypto.checkSignature(BouncyCastleCrypto.java:31)
   at com.yubico.u2f.data.messages.key.RawRegisterResponse.checkSignature(RawRegisterResponse.java:97)
   at com.yubico.u2f.U2fPrimitives.finishRegistration(U2fPrimitives.java:89)
   at com.yubico.u2f.U2F.finishRegistration(U2F.java:81)
   at com.yubico.u2f.U2F.finishRegistration(U2F.java:67)
   at U2FManager.finishRegistration(U2FManager.java:82)


The RegisterResponse and RegisterRequestData seem correct...

What could be the cause of this problem?

Thanks and best regards


Top
 Profile  
Reply with quote  
PostPosted: Thu Dec 07, 2017 9:34 am 
Offline

Joined: Mon Dec 04, 2017 2:18 pm
Posts: 3
Thanks to the support of the Yubico team I could solve this problem:

Debugging the class BouncyCastleCrypto I could find out the source of the problem. The following exception was thrown at the line "ecdsaSignature.initVerify(publicKey);":

java.security.InvalidKeyException: No installed provider supports this key: org.bouncycastle.jce.provider.JCEECPublicKey

The source of it was a conflict in the version of BouncyCastle used inside the application (we had a dependent library which depended on an older version of BC). Fixing the dependencies solved the problem.

Thanks a lot for your precious help and best regards.
Patrick


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group