xcode - Need help in ios 7 Keychain add and retrieve Public Key kSecReturnRef -
in ios7, when add rsa public key in keychain, added if want retrieve "ksecreturnref", nil result, if retrieve "ksecreturnpersistentref" or "ksecreturndata" working fine. problem occurs if add rsa public key via "secitemadd()" method. if generate public key via "seckeygeneratepair()" , retrieve "ksecreturnref".
steps reproduce:
- download sample code "cryptoexercise"
- call method "addpeerpublickey:keybits:"
- pass public key data , name
- above method internally calls "getkeyrefwithpersistentkeyref", , method returns nil value "seckeyref".
this problem in ios 7 whereas same code works fine ios3 ios6.
expected results:
< seckeyref algorithm id: 1, key type: rsapublickey, version: 2, block size: 512 bits, exponent: {hex: 10001, decimal: 65537}, modulus: ae098bc28358d88ae7602e8bb91007239018d40bb1a87f2245199a208ca21b8efcffe2373b470e6075d740ac1a25cd7914a6ba5680701dfb9428e2dd461965b7, addr: 0x9abe600 >
actual results:
< nil>
any appreciated.
Comments
Post a Comment