2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
22 Contains: Debugging macros.
24 Written by: Doug Mitchell
26 Copyright: (c) 1998, 1999 by Apple Computer, Inc., all rights reserved.
32 #include "sslContext.h"
33 #include <Security/debugging.h>
36 /* log changes in handshake state */
37 #define sslHdskStateDebug(args...) secdebug("sslHdskState", ## args)
39 /* log handshake and alert messages */
40 #define sslHdskMsgDebug(args...) secdebug("sslHdskMsg", ## args)
42 /* log negotiated handshake parameters */
43 #define sslLogNegotiateDebug(args...) secdebug("sslLogNegotiate", ## args)
45 /* log received protocol messsages */
46 #define sslLogRxProtocolDebug(msgType) secdebug("sslLogRxProtocol", \
47 "---received protoMsg %s", msgType)
49 /* log resumable session info */
50 #define sslLogResumSessDebug(args...) secdebug("sslResumSession", ## args)
52 /* log low-level session info in appleSession.cpp */
53 #define sslLogSessCacheDebug(args...) secdebug("sslSessionCache", ## args)
55 /* log record-level I/O (SSLRead, SSLWrite) */
56 #define sslLogRecordIo(args...) secdebug("sslRecordIo", ## args)
58 /* cert-related info */
59 #define sslCertDebug(args...) secdebug("sslCert", ## args)
62 #define sslDhDebug(args...) secdebug("sslDh", ## args)
66 #define SSLChangeHdskState(ctx, newState) { ctx->state=newState; }
67 #define SSLLogHdskMsg(msg, sent)
69 /* all errors logged to stdout for DEBUG config only */
70 #define sslErrorLog(args...)
74 #include "sslAlertMessage.h"
76 extern void SSLLogHdskMsg(SSLHandshakeType msg
, char sent
);
77 extern char *hdskStateToStr(SSLHandshakeState state
);
78 extern void SSLChangeHdskState(SSLContext
*ctx
, SSLHandshakeState newState
);
80 /* all errors logged to stdout for DEBUG config only */
81 #define sslErrorLog(args...) printf(args)
85 #endif /* _SSL_DEBUG_H_ */