Index: tls.c
==================================================================
--- tls.c
+++ tls.c
@@ -514,46 +514,46 @@
 	return TCL_ERROR;
     }
     switch ((enum protocol)index) {
     case TLS_SSL2:
 #if defined(NO_SSL2)
-		Tcl_AppendResult(interp, "protocol not supported", NULL);
+		Tcl_AppendResult(interp, "protocol not supported", (char *)NULL);
 		return TCL_ERROR;
 #else
 		ctx = SSL_CTX_new(SSLv2_method()); break;
 #endif
     case TLS_SSL3:
 #if defined(NO_SSL3)
-		Tcl_AppendResult(interp, "protocol not supported", NULL);
+		Tcl_AppendResult(interp, "protocol not supported", (char *)NULL);
 		return TCL_ERROR;
 #else
 		ctx = SSL_CTX_new(SSLv3_method()); break;
 #endif
     case TLS_TLS1:
 #if defined(NO_TLS1)
-		Tcl_AppendResult(interp, "protocol not supported", NULL);
+		Tcl_AppendResult(interp, "protocol not supported", (char *)NULL);
 		return TCL_ERROR;
 #else
 		ctx = SSL_CTX_new(TLSv1_method()); break;
 #endif
     case TLS_TLS1_1:
 #if defined(NO_TLS1_1)
-		Tcl_AppendResult(interp, "protocol not supported", NULL);
+		Tcl_AppendResult(interp, "protocol not supported", (char *)NULL);
 		return TCL_ERROR;
 #else
 		ctx = SSL_CTX_new(TLSv1_1_method()); break;
 #endif
     case TLS_TLS1_2:
 #if defined(NO_TLS1_2)
-		Tcl_AppendResult(interp, "protocol not supported", NULL);
+		Tcl_AppendResult(interp, "protocol not supported", (char *)NULL);
 		return TCL_ERROR;
 #else
 		ctx = SSL_CTX_new(TLSv1_2_method()); break;
 #endif
     case TLS_TLS1_3:
 #if defined(NO_TLS1_3)
-		Tcl_AppendResult(interp, "protocol not supported", NULL);
+		Tcl_AppendResult(interp, "protocol not supported", (char *)NULL);
 		return TCL_ERROR;
 #else
 		ctx = SSL_CTX_new(TLS_method()); break;
                 SSL_CTX_set_min_proto_version (ctx, TLS1_3_VERSION);
                 SSL_CTX_set_max_proto_version (ctx, TLS1_3_VERSION);
@@ -650,11 +650,11 @@
 	/*
 	 * Make sure to operate on the topmost channel
 	 */
 	chan = Tcl_GetTopChannel(chan);
 	if (Tcl_GetChannelType(chan) != Tls_ChannelType()) {
-		Tcl_AppendResult(interp, "bad channel \"", Tcl_GetChannelName(chan), "\": not a TLS channel", NULL);
+		Tcl_AppendResult(interp, "bad channel \"", Tcl_GetChannelName(chan), "\": not a TLS channel", (char *)NULL);
 		return(TCL_ERROR);
 	}
 	statePtr = (State *)Tcl_GetChannelInstanceData(chan);
 
 	dprintf("Calling Tls_WaitForConnect");
@@ -878,11 +878,11 @@
          * Make sure to operate on the topmost channel
          */
         chan = Tcl_GetTopChannel(chan);
 	if (Tcl_GetChannelType(chan) != Tls_ChannelType()) {
 	    Tcl_AppendResult(interp, "bad channel \"",
-		    Tcl_GetChannelName(chan), "\": not a TLS channel", NULL);
+		    Tcl_GetChannelName(chan), "\": not a TLS channel", (char *)NULL);
 	    Tls_Free((void *)statePtr);
 	    return TCL_ERROR;
 	}
 	ctx = ((State *)Tcl_GetChannelInstanceData(chan))->ctx;
     } else {
@@ -1026,11 +1026,11 @@
      */
     chan = Tcl_GetTopChannel(chan);
 
     if (Tcl_GetChannelType(chan) != Tls_ChannelType()) {
 	Tcl_AppendResult(interp, "bad channel \"", Tcl_GetChannelName(chan),
-		"\": not a TLS channel", NULL);
+		"\": not a TLS channel", (char *)NULL);
 	return TCL_ERROR;
     }
 
     if (Tcl_UnstackChannel(interp, chan) == TCL_ERROR) {
 	return TCL_ERROR;
@@ -1078,48 +1078,48 @@
     const SSL_METHOD *method;
 
     dprintf("Called");
 
     if (!proto) {
-	Tcl_AppendResult(interp, "no valid protocol selected", NULL);
+	Tcl_AppendResult(interp, "no valid protocol selected", (char *)NULL);
 	return (SSL_CTX *)0;
     }
 
     /* create SSL context */
 #if defined(NO_SSL2)
     if (ENABLED(proto, TLS_PROTO_SSL2)) {
-	Tcl_AppendResult(interp, "protocol not supported", NULL);
+	Tcl_AppendResult(interp, "protocol not supported", (char *)NULL);
 	return (SSL_CTX *)0;
     }
 #endif
 #if defined(NO_SSL3)
     if (ENABLED(proto, TLS_PROTO_SSL3)) {
-	Tcl_AppendResult(interp, "protocol not supported", NULL);
+	Tcl_AppendResult(interp, "protocol not supported", (char *)NULL);
 	return (SSL_CTX *)0;
     }
 #endif
 #if defined(NO_TLS1)
     if (ENABLED(proto, TLS_PROTO_TLS1)) {
-	Tcl_AppendResult(interp, "protocol not supported", NULL);
+	Tcl_AppendResult(interp, "protocol not supported", (char *)NULL);
 	return (SSL_CTX *)0;
     }
 #endif
 #if defined(NO_TLS1_1)
     if (ENABLED(proto, TLS_PROTO_TLS1_1)) {
-	Tcl_AppendResult(interp, "protocol not supported", NULL);
+	Tcl_AppendResult(interp, "protocol not supported", (char *)NULL);
 	return (SSL_CTX *)0;
     }
 #endif
 #if defined(NO_TLS1_2)
     if (ENABLED(proto, TLS_PROTO_TLS1_2)) {
-	Tcl_AppendResult(interp, "protocol not supported", NULL);
+	Tcl_AppendResult(interp, "protocol not supported", (char *)NULL);
 	return (SSL_CTX *)0;
     }
 #endif
 #if defined(NO_TLS1_3)
     if (ENABLED(proto, TLS_PROTO_TLS1_3)) {
-	Tcl_AppendResult(interp, "protocol not supported", NULL);
+	Tcl_AppendResult(interp, "protocol not supported", (char *)NULL);
 	return (SSL_CTX *)0;
     }
 #endif
 
     switch (proto) {
@@ -1425,11 +1425,11 @@
      * Make sure to operate on the topmost channel
      */
     chan = Tcl_GetTopChannel(chan);
     if (Tcl_GetChannelType(chan) != Tls_ChannelType()) {
 	Tcl_AppendResult(interp, "bad channel \"", Tcl_GetChannelName(chan),
-		"\": not a TLS channel", NULL);
+		"\": not a TLS channel", (char *)NULL);
 	return TCL_ERROR;
     }
     statePtr = (State *) Tcl_GetChannelInstanceData(chan);
     if (objc == 2) {
 	peer = SSL_get_peer_certificate(statePtr->ssl);
@@ -1782,11 +1782,11 @@
 	     == NULL) {
 		return TCL_ERROR;
 	}
 
 	if (TlsLibInit(0) != TCL_OK) {
-		Tcl_AppendResult(interp, "could not initialize SSL library", NULL);
+		Tcl_AppendResult(interp, "could not initialize SSL library", (char *)NULL);
 		return TCL_ERROR;
 	}
 
 	Tcl_CreateObjCommand(interp, "tls::ciphers", CiphersObjCmd, (ClientData) 0, (Tcl_CmdDeleteProc *) NULL);
 	Tcl_CreateObjCommand(interp, "tls::handshake", HandshakeObjCmd, (ClientData) 0, (Tcl_CmdDeleteProc *) NULL);