5 // Created by Fabrice Gautier on 1/6/12.
6 // Copyright (c) 2012 Apple, Inc. All rights reserved.
9 #ifndef __TLSSOCKET_H__
10 #define __TLSSOCKET_H__
12 #include <Security/SecureTransportPriv.h>
15 Attach the TLS socket filter.
17 This makes a socket a TLS socket by attaching the TLS socket filter to that socket.
18 Return a positive TLS handle or a negative error.
19 The return TLS handle can be used to route VPN data directly through this TLS
22 int TLSSocket_Attach(int socket
);
25 Detach the TLS socket filter.
27 Return 0 or negative error.
28 If the TLS Socket is used with SecureTransport, one should make sure
29 to tear down the SecureTransport session before calling this.
30 It is not required to use this, as closing the socket would have the same effect.
32 int TLSSocket_Detach(int socket
);
35 Secure Transport Record Layer functions for TLS Sockets.
37 To use SecureTransport with a TLS kernel socket, pass this to SSLSetRecordFuncs and
38 the socket descriptor to SSLSetRecordContext
40 const struct SSLRecordFuncs TLSSocket_Funcs
;