wultra / ssl-pinning-android

Android SDK for our dynamic SSL pinning
Apache License 2.0
60 stars 8 forks source link

Failed resolution of KeychainFactory #68

Closed ardagoc closed 1 year ago

ardagoc commented 1 year ago
    val publicKey: ByteArray = Base64.decode(Keys.readPublicKey(), Base64.NO_WRAP)

    val fingerprint = Base64.decode(Keys.readFingerprint(), Base64.NO_WRAP)

    val configuration = CertStoreConfiguration.Builder(
        serviceUrl = URL(BASE_URL_SSL),
        publicKey = publicKey
    )
        .useChallenge(false)
        .fallbackCertificates(getFallbackData(fingerprint))
        .build()

    val certStore = CertStore.powerAuthCertStore(configuration = configuration, context)

it throws the following error on the last line.

    java.lang.NoClassDefFoundError: Failed resolution of: Lio/getlime/security/powerauth/keychain/KeychainFactory;
        at com.wultra.android.sslpinning.integration.powerauth.PowerAuthSecureDataStore.<init>(PowerAuthSecureDataStore.kt:45)
        at com.wultra.android.sslpinning.integration.powerauth.PowerAuthSecureDataStore.<init>(PowerAuthSecureDataStore.kt:36)
        at com.wultra.android.sslpinning.integration.powerauth.PowerAuthIntegrationKt.powerAuthCertStore(PowerAuthIntegration.kt:40)
        at com.wultra.android.sslpinning.integration.powerauth.PowerAuthIntegrationKt.powerAuthCertStore$default(PowerAuthIntegration.kt:36)
ardagoc commented 1 year ago

adding powerauth-sdk explicitly resolved the issue:

implementation 'com.wultra.android.powerauth:powerauth-sdk:1.7.0'

petrdvorak commented 1 year ago

@ardagoc Thank you for the update! :) Btw I will be happy to hear more about your project - if you are open to sharing more details, just drop me a line at petr@wultra.com...