@@ -1,10 +1,8 @@ /* * Copyright (C) 1997-2000 Matt Newman * - * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tlsInt.h,v 1.17 2015/06/06 09:07:08 apnadkarni Exp $ - * * TLS (aka SSL) Channel - can be layered on any bi-directional * Tcl_Channel (Note: Requires Trf Core Patch) * * This was built from scratch based upon observation of OpenSSL 0.9.2B * @@ -15,11 +13,11 @@ * Also work done by the follow people provided the impetus to do this "right":- * tclSSL (Colin McCormack, Shared Technology) * SSLtcl (Peter Antman) * */ -#ifndef _TSLINT_H +#ifndef _TLSINT_H #define _TLSINT_H #include "tls.h" #include #include @@ -34,16 +32,18 @@ #ifndef CONST84 #define CONST84 #endif #ifdef NO_PATENTS -#define NO_IDEA -#define NO_RC2 -#define NO_RC4 -#define NO_RC5 -#define NO_RSA -#define NO_SSL2 +# define NO_IDEA +# define NO_RC2 +# define NO_RC4 +# define NO_RC5 +# define NO_RSA +# ifndef NO_SSL2 +# define NO_SSL2 +# endif #endif #ifdef BSAFE #include #include @@ -52,16 +52,20 @@ #include #include #include #endif -#ifndef SSL_OP_NO_TLSv1_1 -#define NO_TLS1_1 +#ifndef NO_TLS1_1 +# ifndef SSL_OP_NO_TLSv1_1 +# define NO_TLS1_1 +# endif #endif -#ifndef SSL_OP_NO_TLSv1_2 -#define NO_TLS1_2 +#ifndef NO_TLS1_2 +# ifndef SSL_OP_NO_TLSv1_2 +# define NO_TLS1_2 +# endif #endif #ifdef TCL_STORAGE_CLASS # undef TCL_STORAGE_CLASS #endif @@ -76,14 +80,14 @@ #endif #ifndef ECONNRESET #define ECONNRESET 131 /* Connection reset by peer */ #endif -#ifdef DEBUG -#define dprintf fprintf +#ifdef TCLEXT_TCLTLS_DEBUG +#define dprintf(...) { fprintf(stderr, "%s:%i:", __func__, __LINE__); fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n"); } #else -#define dprintf if (0) fprintf +#define dprintf(...) if (0) { fprintf(stderr, __VA_ARGS__); } #endif #define SSL_ERROR(ssl,err) \ ((char*)ERR_reason_error_string((unsigned long)SSL_get_error((ssl),(err)))) /* @@ -254,9 +258,8 @@ EXTERN void Tls_Free _ANSI_ARGS_ ((char *blockPtr)); EXTERN void Tls_Clean _ANSI_ARGS_ ((State *statePtr)); EXTERN int Tls_WaitForConnect _ANSI_ARGS_(( State *statePtr, int *errorCodePtr)); -EXTERN BIO_METHOD * BIO_s_tcl _ANSI_ARGS_((void)); EXTERN BIO * BIO_new_tcl _ANSI_ARGS_((State* statePtr, int flags)); #endif /* _TLSINT_H */