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

Public keys downloaded through web UI demo are not usable #575

Closed
sbernard31 opened this issue Sep 28, 2018 · 1 comment
Closed

Public keys downloaded through web UI demo are not usable #575

sbernard31 opened this issue Sep 28, 2018 · 1 comment
Labels
bsserver Impact LWM2M bootstrap server bug Dysfunctionnal behavior demo Impact our demo (not libraries) server Impact LWM2M server

Comments

@sbernard31
Copy link
Contributor

If you are using public key downloaded through web UI demo with leshan-client-demo, you will face :

Unable to load RPK files : java.security.InvalidKeyException: invalid key format
java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: invalid key format
	at sun.security.ec.ECKeyFactory.engineGeneratePublic(ECKeyFactory.java:157)
	at java.security.KeyFactory.generatePublic(KeyFactory.java:334)
	at org.eclipse.leshan.util.SecurityUtil.extractPublicKey(SecurityUtil.java:59)
	at org.eclipse.leshan.util.SecurityUtil.extractPublicKey(SecurityUtil.java:49)
	at org.eclipse.leshan.client.demo.LeshanClientDemo.main(LeshanClientDemo.java:197)
Caused by: java.security.InvalidKeyException: invalid key format
	at sun.security.x509.X509Key.decode(X509Key.java:387)
	at sun.security.x509.X509Key.decode(X509Key.java:403)
	at sun.security.ec.ECPublicKeyImpl.<init>(ECPublicKeyImpl.java:69)
	at sun.security.ec.ECKeyFactory.implGeneratePublic(ECKeyFactory.java:219)
	at sun.security.ec.ECKeyFactory.engineGeneratePublic(ECKeyFactory.java:153)
	... 4 more

This is a bug in the javascript at web ui side which generate "bad" files.

Waiting the correct files for bsserver-demo and server-demo are available here :
serverPubKeys.zip

@sbernard31 sbernard31 added bug Dysfunctionnal behavior server Impact LWM2M server demo Impact our demo (not libraries) bsserver Impact LWM2M bootstrap server labels Sep 28, 2018
@sbernard31 sbernard31 changed the title PublicKey downloaded through web UI demo is not usable Public keys downloaded through web UI demo are not usable Sep 28, 2018
@sbernard31
Copy link
Contributor Author

Fixed by fbc01b8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bsserver Impact LWM2M bootstrap server bug Dysfunctionnal behavior demo Impact our demo (not libraries) server Impact LWM2M server
Projects
None yet
Development

No branches or pull requests

1 participant