PeculiarVentures / pvpkcs11

pvpkcs11 consists of a input validation library and a set of PKCS#11 implementations that wrap operating system and browser cryptographic implementations.
MIT License
32 stars 7 forks source link

Don't show approval window for each keychain key #23

Open microshine opened 7 years ago

microshine commented 7 years ago

image

microshine commented 7 years ago

This window is showed when I'm trying to get info about SecKeyRef with SecKeyCopyAttributes function.

I found that there is a SecAccess which is used for key creation and determines the initial access rights to the key.

SekKey.h doesn't have function to get SecAccess for key. We can be sure that only keys created with our app doesn't show Access dialog

There is deprecated function SecKeyGetCredentials which allows to get a CSSM_ACCESS_CREDENTIALS structure which will allow the key to be used