How to programatically access System Root certificates from non admin account ?

How to programatically access System Root certificates from non admin account ? The below code throws -25300 error.

NSDictionary *query = @{
            (__bridge id)kSecClass: (__bridge id)kSecClassCertificate,
            (__bridge id)kSecAttrLabel: @"somelabel",
            (__bridge id)kSecMatchLimit: (__bridge id)kSecMatchLimitAll,
            (__bridge id)kSecReturnRef: @YES
        };

         CFArrayRef result = NULL;
        OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, (CFTypeRef *)&result);

Replies

I used this command - security list-keychains I have access to the keychain