#ifndef _SSLUTILS_H_
#define _SSLUTILS_H_ 1
#include "SecureTransport.h"
#include "sslPriv.h"
#ifdef __cplusplus
extern "C" {
#endif
UInt32 SSLDecodeInt(
const unsigned char *p,
int length);
unsigned char *SSLEncodeInt(
unsigned char *p,
UInt32 value,
int length);
UInt8* SSLEncodeUInt64(
UInt8 *p,
sslUint64 value);
void IncrementUInt64(
sslUint64 *v);
UInt32 SSLGetCertificateChainLength(
const SSLCertificate *c);
Boolean sslIsSessionActive(
const SSLContext *ctx);
OSStatus sslDeleteCertificateChain(
SSLCertificate *certs,
SSLContext *ctx);
OSStatus sslTime(
UInt32 *tim);
#if SSL_DEBUG
extern const char *protocolVersStr(
SSLProtocolVersion prot);
#endif
OSStatus sslIoRead(
SSLBuffer buf,
UInt32 *actualLength,
SSLContext *ctx);
OSStatus sslIoWrite(
SSLBuffer buf,
UInt32 *actualLength,
SSLContext *ctx);
OSStatus sslRand(
SSLContext *ctx,
SSLBuffer *buf);
OSStatus sslVerifyProtVersion(
SSLContext *ctx,
SSLProtocolVersion peerVersion,
SSLProtocolVersion *negVersion);
OSStatus sslGetMaxProtVersion(
SSLContext *ctx,
SSLProtocolVersion *version);
#define SET_SSL_BUFFER(buf, d, l) do { (buf).data = (d); (buf).length = (l); } while (0)
#ifdef __cplusplus
}
#endif
#endif