Open
Description
When I ran the encryption code with open jdk 1.8 it is all working fine. But when I am running with sun jdk jdk1.8.0_20, it is trowing following exception
Exception in thread "main" java.security.InvalidKeyException: Not an EC key: ECDH
at sun.security.ec.ECKeyFactory.checkKey(ECKeyFactory.java:121)
at sun.security.ec.ECKeyFactory.toECKey(ECKeyFactory.java:90)
at sun.security.ec.ECDHKeyAgreement.engineInit(ECDHKeyAgreement.java:67)
at javax.crypto.KeyAgreement.implInit(KeyAgreement.java:341)
at javax.crypto.KeyAgreement.chooseProvider(KeyAgreement.java:373)
at javax.crypto.KeyAgreement.init(KeyAgreement.java:465)
at javax.crypto.KeyAgreement.init(KeyAgreement.java:436)
at nl.martijndwars.webpush.HttpEce.deriveDH(HttpEce.java:117)
at nl.martijndwars.webpush.HttpEce.deriveKey(HttpEce.java:54)
at nl.martijndwars.webpush.HttpEce.encrypt(HttpEce.java:166)
at nl.martijndwars.webpush.PushService.encrypt(PushService.java:62)
Metadata
Metadata
Assignees
Labels
No labels