X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/c38e3ce98599a410a47dc10253faa4d5830f13b2..427c49bcad63d042b29ada2ac27e3dfc4845c779:/libsecurity_ssl/lib/SSLRecordInternal.h?ds=inline diff --git a/libsecurity_ssl/lib/SSLRecordInternal.h b/libsecurity_ssl/lib/SSLRecordInternal.h new file mode 100644 index 00000000..4e9082c5 --- /dev/null +++ b/libsecurity_ssl/lib/SSLRecordInternal.h @@ -0,0 +1,57 @@ +// +// SSLRecordInternal.h +// Security +// +// Created by Fabrice Gautier on 10/25/11. +// Copyright (c) 2011 Apple, Inc. All rights reserved. +// + + +/* This header should be kernel compatible */ + +#ifndef _SSLRECORDINTERNAL_H_ +#define _SSLRECORDINTERNAL_H_ 1 + +#include +#include +#include + +#include "sslTypes.h" + +typedef void * SSLIOConnectionRef; + +typedef int +(*SSLIOReadFunc) (SSLIOConnectionRef connection, + void *data, /* owned by + * caller, data + * RETURNED */ + size_t *dataLength); /* IN/OUT */ +typedef int +(*SSLIOWriteFunc) (SSLIOConnectionRef connection, + const void *data, + size_t *dataLength); /* IN/OUT */ + + +/* Record layer creation functions, called from the SSLContext layer */ + +SSLRecordContextRef +SSLCreateInternalRecordLayer(bool dtls); + +int +SSLSetInternalRecordLayerIOFuncs( + SSLRecordContextRef ctx, + SSLIOReadFunc readFunc, + SSLIOWriteFunc writeFunc); + +int +SSLSetInternalRecordLayerConnection( + SSLRecordContextRef ctx, + SSLIOConnectionRef ioRef); + +void +SSLDestroyInternalRecordLayer(SSLRecordContextRef ctx); + + +extern struct SSLRecordFuncs SSLRecordLayerInternal; + +#endif