A function identified as deprecated has been superseded and may become unsupported in the future.
Retrieves a peer certificate. (Deprecated in Mac OS X v10.5.)
OSStatus SSLGetPeerCertificates ( SSLContextRef context, CFArrayRef *certs );
An SSL session context reference.
On return, a pointer to an array of values
of type SecCertificateRef
representing
the peer certificate and the certificate chain used to validate
it. The certificate at index 0 of the returned array is the peer
certificate; the root certificate (or the closest certificate to
it) is at the end of the returned array. The entire array is created
by the Secure Transport library; you must release it when you are
finished with it.
A result code. See “Secure Transport Result Codes.”
This function is valid any time after a handshake attempt.
You can use it to examine a peer certificate, to examine a certificate
chain to determine why a handshake attempt failed, or to retrieve
the certificate chain in order to validate the certificate yourself
(see SSLSetEnableCertVerify
).
SecureTransport.h
Retrieves the current list of trusted root certificates. (Deprecated in Mac OS X v10.5.)
OSStatus SSLGetTrustedRoots ( SSLContextRef context, CFArrayRef *trustedRoots );
An SSL session context reference.
On return, a pointer to a value of type CFArrayRef
.
This array contains values of type SecCertificateRef
representing
the current set of trusted roots.
A result code. See “Secure Transport Result Codes.”
You can use the SSLSetTrustedRoots
function
to replace or add to the set of trusted root certificates. If SSLSetTrustedRoots
has
never been called for this session, the SSLGetTrustedRoots
function
returns the system’s default set of trusted root certificates.
SecureTransport.h
© 2003, 2004 Apple Computer, Inc. All Rights Reserved. (Last updated: 2004-08-31)