Index: ChangeLog ================================================================== --- ChangeLog +++ ChangeLog @@ -1,5 +1,11 @@ +2004-03-23 Dan Razzell + * tls.c: + * tlsBIO.c: + * tlsIO.c: + * tlsInt.h: Fixed type match warnings. + 2004-03-19 Jeff Hobbs * tls.c (Tls_Init): replaced older TEA config with newer * config/* (removed): * pkgIndex.tcl.in, strncasecmp.c (removed): Index: tls.c ================================================================== --- tls.c +++ tls.c @@ -3,11 +3,11 @@ * some modifications: * Copyright (C) 2000 Ajuba Solutions * Copyright (C) 2002 ActiveState Corporation * Copyright (C) 2004 Starfish Systems * - * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tls.c,v 1.21 2004/03/19 21:05:16 hobbs Exp $ + * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tls.c,v 1.22 2004/03/24 05:22:53 razzell Exp $ * * TLS (aka SSL) Channel - can be layered on any bi-directional * Tcl_Channel (Note: Requires Trf Core Patch) * * This was built (almost) from scratch based upon observation of @@ -397,11 +397,11 @@ int result; if (statePtr->password == NULL) { if (Tcl_Eval(interp, "tls::password") == TCL_OK) { char *ret = (char *) Tcl_GetStringResult(interp); - strncpy(buf, ret, size); + strncpy(buf, ret, (size_t) size); return strlen(ret); } else { return -1; } } @@ -421,11 +421,11 @@ Tcl_Release((ClientData) statePtr); Tcl_Release((ClientData) statePtr->interp); if (result == TCL_OK) { char *ret = (char *) Tcl_GetStringResult(interp); - strncpy(buf, ret, size); + strncpy(buf, ret, (size_t) size); return strlen(ret); } else { return -1; } } @@ -499,10 +499,12 @@ Tcl_AppendResult(interp, "protocol not supported", NULL); return TCL_ERROR; #else ctx = SSL_CTX_new(TLSv1_method()); break; #endif + default: + break; } if (ctx == NULL) { Tcl_AppendResult(interp, REASON(), (char *) NULL); return TCL_ERROR; } @@ -1299,10 +1301,12 @@ } else { Tcl_SetResult(interp,"Error generating private key",NULL); return TCL_ERROR; } } + break; + default: break; } return TCL_OK; } Index: tlsBIO.c ================================================================== --- tlsBIO.c +++ tlsBIO.c @@ -1,9 +1,9 @@ /* * Copyright (C) 1997-2000 Matt Newman * - * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tlsBIO.c,v 1.7 2004/02/04 04:02:19 razzell Exp $ + * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tlsBIO.c,v 1.8 2004/03/24 05:22:53 razzell Exp $ * * Provides BIO layer to interface openssl to Tcl. */ #include "tlsInt.h" @@ -127,11 +127,11 @@ static int BioPuts (bio, str) BIO *bio; CONST char *str; { - return BioWrite(bio, str, strlen(str)); + return BioWrite(bio, str, (int) strlen(str)); } static long BioCtrl (bio, cmd, num, ptr) BIO *bio; Index: tlsIO.c ================================================================== --- tlsIO.c +++ tlsIO.c @@ -1,10 +1,10 @@ /* * Copyright (C) 1997-2000 Matt Newman * Copyright (C) 2000 Ajuba Solutions * - * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tlsIO.c,v 1.13 2002/02/04 22:46:31 hobbs Exp $ + * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tlsIO.c,v 1.14 2004/03/24 05:22:53 razzell 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 @@ -120,11 +120,11 @@ * (2) With stubs we just determine the difference between the older * and modern variant and overallocate accordingly if compiled * against an older variant. */ - int size = sizeof(Tcl_ChannelType); /* Base size */ + unsigned int size = sizeof(Tcl_ChannelType); /* Base size */ /* * Size of a procedure pointer. We assume that all procedure * pointers are of the same size, regardless of exact type * (arguments and return values). Index: tlsInt.h ================================================================== --- tlsInt.h +++ tlsInt.h @@ -1,9 +1,9 @@ /* * Copyright (C) 1997-2000 Matt Newman * - * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tlsInt.h,v 1.11 2004/02/04 04:02:19 razzell Exp $ + * $Header: /home/rkeene/tmp/cvs2fossil/../tcltls/tls/tls/tlsInt.h,v 1.12 2004/03/24 05:22:53 razzell 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 @@ -64,11 +64,11 @@ #else #define dprintf if (0) fprintf #endif #define SSL_ERROR(ssl,err) \ - ((char*)ERR_reason_error_string(SSL_get_error((ssl),(err)))) + ((char*)ERR_reason_error_string((unsigned long)SSL_get_error((ssl),(err)))) /* * OpenSSL BIO Routines */ #define BIO_TYPE_TCL (19|0x0400)