Получение ключевой ошибки при анализе сертификата x509 на Android - PullRequest
0 голосов
/ 07 мая 2019

Когда я пытаюсь проанализировать свой сертификат x509 для Android, я получаю сообщение об ошибке фабричного ключа

Я сгенерировал свои сертификаты x509 из https://github.com/Azure/azure-iot-sdk-java/tree/master/provisioning/provisioning-tools/provisioning-x509-cert-generator

ProvisioningX509Sample.main(response.getString("Leaf_Public_Pem"),response.getString("Leaf_Private_Key"),response.getString("Ca_Signer"), response.getString("IoThub_url"), response.getString("Device_Id"));

ошибка

com.microsoft.azure.sdk.iot.provisioning.security.exceptions.SecurityProviderException: java.security.cert.CertificateException: org.bouncycastle.openssl.PEMException: unable to convert key pair: ECDSA KeyFactory not available
        at com.microsoft.azure.sdk.iot.provisioning.security.hsm.SecurityProviderX509Cert.<init>(SecurityProviderX509Cert.java:76)
        at com.example.httpreqapp.ProvisioningX509Sample.main(ProvisioningX509Sample.java:104)
        at com.example.httpreqapp.MainActivity$1.onResponse(MainActivity.java:53)
        at com.example.httpreqapp.MainActivity$1.onResponse(MainActivity.java:42)
        at com.android.volley.toolbox.JsonRequest.deliverResponse(JsonRequest.java:90)
        at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:102)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6077)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
    Caused by: java.security.cert.CertificateException: org.bouncycastle.openssl.PEMException: unable to convert key pair: ECDSA KeyFactory not available
        at com.microsoft.azure.sdk.iot.provisioning.security.hsm.SecurityProviderX509Cert.parsePrivateKey(SecurityProviderX509Cert.java:188)
        at com.microsoft.azure.sdk.iot.provisioning.security.hsm.SecurityProviderX509Cert.<init>(SecurityProviderX509Cert.java:67)
        ... 12 more
    Caused by: org.bouncycastle.openssl.PEMException: unable to convert key pair: ECDSA KeyFactory not available
        at org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter.getPrivateKey(Unknown Source)
        at com.microsoft.azure.sdk.iot.provisioning.security.hsm.SecurityProviderX509Cert.getPrivateKey(SecurityProviderX509Cert.java:219)
        at com.microsoft.azure.sdk.iot.provisioning.security.hsm.SecurityProviderX509Cert.parsePrivateKey(SecurityProviderX509Cert.java:183)
        ... 13 more W/System.err: Caused by: java.security.NoSuchAlgorithmException: ECDSA KeyFactory not available W/System.err:     at java.security.KeyFactory.<init>(KeyFactory.java:161)
        at java.security.KeyFactory.getInstance(KeyFactory.java:195)
        at org.bouncycastle.jcajce.util.DefaultJcaJceHelper.createKeyFactory(Unknown Source)
        at org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter.getKeyFactory(Unknown Source)
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...