Deprecated Secure Transport Functions
A function identified as deprecated has been superseded and may become unsupported in the future.
Available in OS X v10.2 through OS X v10.7
SSLGetPeerCertificates
Retrieves a peer certificate. (Available in OS X v10.2 through OS X v10.7. Use SSLCopyPeerCertificates instead.)
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
SecCertificateRefrepresenting 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 subject of the function call—the end certificate in the chain); 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 call theCFReleasefunction for this array and for eachSecCertificateRefvalue in the array when you are finished with them.
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).
Special Considerations
Because this function requires separately releasing each certificate reference returned, it has been deprecated in favor of SSLCopyPeerCertificates, which conforms to standard Core Foundation semantics.
Availability
- Available in OS X v10.2 through OS X v10.7.
- Deprecated in OS X v10.5.
Declared In
SecureTransport.hSSLGetTrustedRoots
Retrieves the current list of trusted root certificates. (Available in OS X v10.2 through OS X v10.7. Use SSLCopyTrustedRoots instead.)
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 typeSecCertificateRefrepresenting the current set of trusted roots. You must call theCFReleasefunction for this array and for eachSecCertificateRefvalue in the array when you are finished with them.
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.
Special Considerations
Because this function requires separately releasing each certificate reference returned, it has been deprecated in favor of SSLCopyTrustedRoots, which conforms to standard Core Foundation semantics.
Availability
- Available in OS X v10.2 through OS X v10.7.
- Deprecated in OS X v10.5.
Declared In
SecureTransport.hDeprecated in OS X v10.8
SSLGetProtocolVersion
Gets the SSL protocol version. This function is deprecated. (Deprecated in OS X v10.8.)
OSStatus SSLGetProtocolVersion ( SSLContextRef context, SSLProtocol *protocol );
Parameters
- context
An SSL session context reference.
- protocol
On return, a pointer to the SSL protocol version.
Return Value
A result code. See “Secure Transport Result Codes.”
Discussion
Use the SSLGetProtocolVersionEnabled function instead.
Availability
- Available in OS X v10.2 and later.
- Deprecated in OS X v10.8.
Declared In
SecureTransport.hSSLSetProtocolVersion
Sets the SSL protocol version. This function is deprecated. (Deprecated in OS X v10.8.)
OSStatus SSLSetProtocolVersion ( SSLContextRef context, SSLProtocol version );
Parameters
- context
An SSL session context reference.
- version
The SSL protocol version to negotiate.
Return Value
A result code. See “Secure Transport Result Codes.”
Discussion
Use the SSLSetProtocolVersionEnabled function instead.
This function cannot be called when a session is active.
Availability
- Available in OS X v10.2 and later.
- Deprecated in OS X v10.8.
Declared In
SecureTransport.h© 2003, 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)