X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/b1ab9ed8d0e0f1c3b66d7daa8fd5564444c56195..e3d3b979fd185d8303f28a937baa53a187fb8c7d:/libsecurity_ssl/lib/sslDebug.h?ds=inline diff --git a/libsecurity_ssl/lib/sslDebug.h b/libsecurity_ssl/lib/sslDebug.h index 75629a1a..4923eec2 100644 --- a/libsecurity_ssl/lib/sslDebug.h +++ b/libsecurity_ssl/lib/sslDebug.h @@ -28,34 +28,19 @@ #ifndef _SSL_DEBUG_H_ #define _SSL_DEBUG_H_ -#include "sslContext.h" -#include -#include +#ifdef KERNEL +/* TODO: support secdebug in the kernel */ +#define secdebug(x...) +#else /* KERNEL */ +#include +#endif #ifndef NDEBUG -#include +#include #endif -/* If SSL_USE_SYSLOG is defined and not 0, use syslog() for debug - * logging in addition to invoking the secdebug macro (which, as of - * Snow Leopard, emits a static dtrace probe instead of an actual - * log message.) - */ -#ifndef SSL_USE_SYSLOG -#define SSL_USE_SYSLOG 0 -#endif -#if SSL_USE_SYSLOG -#include -#define ssl_secdebug(scope, format...) \ -{ \ - syslog(LOG_NOTICE, format); \ - secdebug(scope, format); \ -} -#else -#define ssl_secdebug(scope, format...) \ - secdebug(scope, format) -#endif +#define ssl_secdebug secdebug #ifndef NDEBUG @@ -113,9 +98,6 @@ NDEBUG */ #ifdef NDEBUG -#define SSLChangeHdskState(ctx, newState) { ctx->state=newState; } -#define SSLLogHdskMsg(msg, sent) - /* all errors logged to stdout for DEBUG config only */ #define sslErrorLog(args...) #define sslDebugLog(args...) @@ -123,11 +105,6 @@ NDEBUG */ #else -#include "sslAlertMessage.h" - -extern void SSLLogHdskMsg(SSLHandshakeType msg, char sent); -extern char *hdskStateToStr(SSLHandshakeState state); -extern void SSLChangeHdskState(SSLContext *ctx, SSLHandshakeState newState); extern void SSLDump(const unsigned char *data, unsigned long len); /* extra debug logging of non-error conditions, if SSL_DEBUG is defined */ @@ -148,7 +125,7 @@ extern void SSLDump(const unsigned char *data, unsigned long len); #ifdef NDEBUG #define ASSERT(s) #else -#define ASSERT(s) assert(s) +#define ASSERT(s) check(s) #endif #endif /* _SSL_DEBUG_H_ */