]> git.saurik.com Git - apple/security.git/blob - libsecurity_ssl/lib/SSLRecordInternal.h
Security-55471.14.tar.gz
[apple/security.git] / libsecurity_ssl / lib / SSLRecordInternal.h
1 //
2 // SSLRecordInternal.h
3 // Security
4 //
5 // Created by Fabrice Gautier on 10/25/11.
6 // Copyright (c) 2011 Apple, Inc. All rights reserved.
7 //
8
9
10 /* This header should be kernel compatible */
11
12 #ifndef _SSLRECORDINTERNAL_H_
13 #define _SSLRECORDINTERNAL_H_ 1
14
15 #include <sys/types.h>
16 #include <stdint.h>
17 #include <stdbool.h>
18
19 #include "sslTypes.h"
20
21 typedef void * SSLIOConnectionRef;
22
23 typedef int
24 (*SSLIOReadFunc) (SSLIOConnectionRef connection,
25 void *data, /* owned by
26 * caller, data
27 * RETURNED */
28 size_t *dataLength); /* IN/OUT */
29 typedef int
30 (*SSLIOWriteFunc) (SSLIOConnectionRef connection,
31 const void *data,
32 size_t *dataLength); /* IN/OUT */
33
34
35 /* Record layer creation functions, called from the SSLContext layer */
36
37 SSLRecordContextRef
38 SSLCreateInternalRecordLayer(bool dtls);
39
40 int
41 SSLSetInternalRecordLayerIOFuncs(
42 SSLRecordContextRef ctx,
43 SSLIOReadFunc readFunc,
44 SSLIOWriteFunc writeFunc);
45
46 int
47 SSLSetInternalRecordLayerConnection(
48 SSLRecordContextRef ctx,
49 SSLIOConnectionRef ioRef);
50
51 void
52 SSLDestroyInternalRecordLayer(SSLRecordContextRef ctx);
53
54
55 extern struct SSLRecordFuncs SSLRecordLayerInternal;
56
57 #endif