#include <Security/SecureTransport.h>
+#include <Security/Security.h>
+
#ifdef __cplusplus
extern "C" {
#endif
void *out, // mallocd by caller, length >= outLen
size_t outLen);
+/*
+ * Obtain a SecTrustRef representing peer certificates. Valid anytime,
+ * subsequent to a handshake attempt. The returned SecTrustRef is valid
+ * only as long as the SSLContextRef is.
+ */
+OSStatus
+SSLGetPeerSecTrust (SSLContextRef context,
+ SecTrustRef *secTrust); /* RETURNED */
+
+/*
+ * Obtain resumable session info. Can be called anytime subsequent to
+ * handshake attempt.
+ *
+ * if sessionWasResumed is True on return, the session is indeed a
+ * resumed session; the sessionID (an opaque blob generated by the
+ * server) is returned in *sessionID. The length of the sessionID
+ * is returned in *sessionIDLength. Caller must allocate the
+ * sessionID buffer; it max size is MAX_SESSION_ID_LENGTH bytes.
+ */
+#define MAX_SESSION_ID_LENGTH 32
+
+OSStatus
+SSLGetResumableSessionInfo (
+ SSLContextRef context,
+ Boolean *sessionWasResumed, // RETURNED
+ void *sessionID, // RETURNED, mallocd by caller
+ size_t *sessionIDLength); // IN/OUT
+
#ifdef __cplusplus
}
#endif