Я получаю исключение "неизвестный тип ключа передан в RSA" при попытке расшифровать сообщение SMIME на Android 28 с помощью Bouncy Castle 1.6.0.Я вижу, что закрытый ключ имеет тип AndroidKeyStoreRSAPrivateKey.Это исключение, потому что BC не может работать с этим типом ключа?Есть ли обходной путь?Спасибо.
Трассировка стека:
org.bouncycastle.operator.OperatorException: key invalid: unknown key type passed to RSA
at org.bouncycastle.operator.jcajce.JceAsymmetricKeyUnwrapper.generateUnwrappedKey(Unknown Source:187)
at org.bouncycastle.cms.jcajce.JceKeyTransRecipient.extractSecretKey(Unknown Source:230)
at org.bouncycastle.cms.jcajce.JceKeyTransEnvelopedRecipient.getRecipientOperator(Unknown Source:0)
at org.bouncycastle.cms.KeyTransRecipientInformation.getRecipientOperator(Unknown Source:16)
at org.bouncycastle.cms.RecipientInformation.getContentStream(Unknown Source:0)
at org.bouncycastle.cms.RecipientInformation.getContent(Unknown Source:0)
Caused by: java.security.InvalidKeyException: unknown key type passed to RSA
at org.bouncycastle.jcajce.provider.asymmetric.rsa.CipherSpi.engineInit(Unknown Source:331)
at org.bouncycastle.jcajce.provider.asymmetric.rsa.CipherSpi.engineInit(Unknown Source:3)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2877)