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...) debug("sslHdskState", ## args)
39 /* log handshake and alert messages */
40 #define sslHdskMsgDebug(args...) debug("sslHdskMsg", ## args)
42 /* log negotiated handshake parameters */
43 #define sslLogNegotiateDebug(args...) debug("sslLogNegotiate", ## args)
45 /* log received protocol messsages */
46 #define sslLogRxProtocolDebug(msgType) debug("sslLogRxProtocol", \
47 "---received protoMsg %s", msgType)
49 /* log resumable session info */
50 #define sslLogResumSessDebug(args...) debug("sslResumSession", ## args)
52 /* log low-level session info in appleSession.cpp */
53 #define sslLogSessCacheDebug(args...) debug("sslSessionCache", ## args)
55 /* log record-level I/O (SSLRead, SSLWrite) */
56 #define sslLogRecordIo(args...) debug("sslRecordIo", ## args)
60 #define SSLChangeHdskState(ctx, newState) { ctx->state=newState; }
61 #define SSLLogHdskMsg(msg, sent)
63 /* all errors logged to stdout for DEBUG config only */
64 #define sslErrorLog(args...)
68 #include "sslAlertMessage.h"
70 extern void SSLLogHdskMsg(SSLHandshakeType msg
, char sent
);
71 extern char *hdskStateToStr(SSLHandshakeState state
);
72 extern void SSLChangeHdskState(SSLContext
*ctx
, SSLHandshakeState newState
);
74 /* all errors logged to stdout for DEBUG config only */
75 #define sslErrorLog(args...) printf(args)
79 #endif /* _SSL_DEBUG_H_ */