2

I am trying to use the code from the 'Certificate,Key and trust programming guide'. In the section about extracting and evaluating an identity from a p12 file, I am getting error and warning from using the code given in the guide.

The line

status = extractIdentityAndTrust(inPKCS12Data, &myIdentity, &myTrust);

gives the warning: "Implicit declaration of function extractIdentityAndTrust "

while the function declaration of extractIdentityAndTrust"

OSStatus extractIdentityAndTrust(CFDataRef inPKCS12Data,SecIdentityRef *outIdentity,SecTrustRef *outTrust)

gives me the error:conflicting types for extractIdentityAndTrust.

I am just trying to impement the code sample given in the guide. Please guide me where I am going wrong on this.

Vin
  • 10,517
  • 10
  • 58
  • 71
  • Im having this same problem. I am using code that i have found online. It uses the method "extractIdentityAndTrust(...)" but doesn't give implementation for it. Did you implement this method, or is it part of the framework? – mtmurdock Apr 06 '11 at 17:57
  • If you are following Apple's guide to encryption/decryption, this method's implementation has to be given by you. In my case the error was resolved by declaring OSStatus extractIdentityAndTrust(CFDataRef inPKCS12Data,SecIdentityRef *outIdentity,SecTrustRef *outTrust); in the .h file – Vin Apr 07 '11 at 03:38

1 Answers1

0

My mistake!! didn't declare the method in the header file.

Vin
  • 10,517
  • 10
  • 58
  • 71