SSL Certificate problem

hello please when i try to authenticate my certificate , when i run SecTrustEvaluateWithError(serverTrust, &error) this line of code sometime it give me true but some time it give me false with error code OSStatus 26276,wich i found that its (An internal error occured in the Security framework) . it is not get false every time , some time is true some time false , so i wont to know whats a reason and what is a solution ?

when i try to authenticate my certificate

Can you supply more context here? Specifically:
  • What platform are you working on?

  • If it’s the Mac, what context is the code running in? App? Daemon? System extension?

  • Where did you get this certificate from?

  • What policies are you apply to the trust evaluation?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
thanks for your replay
i'm working on ios and get my certificate from api
and i will aply this polices
Code Block
# var policies =  SecPolicyCreateSSL(true, host as CFString)
SecTrustSetPolicies(serverTrust, policies)

after that i will run
Code Block
SecTrustEvaluateWithError(serverTrust, &error)

but some time the execution of
Code Block
SecTrustSetPolicies(serverTrust, policies)

will be complete after the execution of
Code Block
SecTrustEvaluateWithError(serverTrust, &error)


so it will give me error because the police didn't applied before evaluation how to fix that

but some time the execution of SecTrustSetPolicies will be complete
after the execution of SecTrustEvaluateWithError

I don’t understand this. Both of these routines are synchronous so, assuming you call SecTrustSetPolicies before you call SecTrustEvaluateWithError, the policies should be in place before you do the trust evaluation. Perhaps you’re calling these on different threads?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
SSL Certificate problem
 
 
Q