forked from I2P_Developers/i2p.i2p
SelfSignedGenerator: improve previous fix
This commit is contained in:
@ -249,7 +249,8 @@ public final class SelfSignedGenerator {
|
|||||||
cert.verify(cpub);
|
cert.verify(cpub);
|
||||||
if (!cpub.equals(jpub)) {
|
if (!cpub.equals(jpub)) {
|
||||||
boolean ok = false;
|
boolean ok = false;
|
||||||
if (cpub.getClass().getName().equals("sun.security.x509.X509Key")) {
|
if ((jpub instanceof EdDSAPublicKey) &&
|
||||||
|
cpub.getClass().getName().equals("sun.security.x509.X509Key")) {
|
||||||
// X509Certificate will sometimes contain an X509Key rather than the EdDSAPublicKey itself; the contained
|
// X509Certificate will sometimes contain an X509Key rather than the EdDSAPublicKey itself; the contained
|
||||||
// key is valid but needs to be instanced as an EdDSAPublicKey before it can be used.
|
// key is valid but needs to be instanced as an EdDSAPublicKey before it can be used.
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user