Android M Support

Issue #169 resolved
omer levi hevroni created an issue

Hey You library is really great :) The only problem is with the RSASigner, is expect to receive an RSAPrivateKey, but on android M the keys are from the class AndroidKeyStorePrivateKey, which not inherit from RSAPrivateKey. I check this on 2 different phones:

As a temporary solution I copied the RSAJWSSigner and implement it using standard java private key class, but I would like to hear from you about that.

Thanks,

Omer

Comments (11)

  1. omer levi hevroni reporter

    I've just tried that, in android M the

    PrivateKey.getEncoded()
    

    returns null, look like they tried to block export of private key that stored in key store. See this for example: Android key store

  2. Connect2id OSS

    The RP that you submitted - does it work / pass the tests on Android M?

    Preventing key material extraction is good, however, in that case they also need to provide a default RSA signer that can handle their key store.

  3. omer levi hevroni reporter

    I've tested the code manually on my android app, and it is working. Also - all I've changed is the constructor, all the other code worked as expected. And as far as I know you have no way to run the tests on android M.

  4. Connect2id OSS

    Thanks for the feedback! We'll check for any other issues with the API and if all is well and nothing else gets upset, we'll make the change.

  5. Vladimir Dzhuvinov

    Hi Omer,

    Could you please confirm that the native PrivateKey.getAlgorithm() on Android M returns "RSA"?

    We would like to compensate for the missing key type check at construction time, and check the key alg instead.

    Cheers,

  6. Log in to comment