< Previous PageNext Page > Hide TOC

Deprecated Secure Transport Functions

A function identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in Mac OS X v10.5

SSLGetPeerCertificates

Retrieves a peer certificate. (Deprecated in Mac OS X v10.5.)

OSStatus SSLGetPeerCertificates (
   SSLContextRef context,
   CFArrayRef *certs
);

Parameters
context

An SSL session context reference.

certs

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.

Return Value

A result code. See “Secure Transport Result Codes.”

Discussion

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).

Availability
Related Sample Code
Declared In
SecureTransport.h

SSLGetTrustedRoots

Retrieves the current list of trusted root certificates. (Deprecated in Mac OS X v10.5.)

OSStatus SSLGetTrustedRoots (
   SSLContextRef context,
   CFArrayRef *trustedRoots
);

Parameters
context

An SSL session context reference.

trustedRoots

On return, a pointer to a value of type CFArrayRef. This array contains values of type SecCertificateRef representing the current set of trusted roots.

Return Value

A result code. See “Secure Transport Result Codes.”

Discussion

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.

Availability
Declared In
SecureTransport.h

< Previous PageNext Page > Hide TOC


© 2003, 2004 Apple Computer, Inc. All Rights Reserved. (Last updated: 2004-08-31)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.