Index: head/devel/tcltls/Makefile =================================================================== --- head/devel/tcltls/Makefile (revision 382281) +++ head/devel/tcltls/Makefile (revision 382282) @@ -1,55 +1,55 @@ # Created by: mi@aldan.algebra.com # $FreeBSD$ PORTNAME= tcltls PORTVERSION= 1.6.4 CATEGORIES= devel tcl MASTER_SITES= SF/tls/tls/${PORTVERSION} DISTNAME= tls${PORTVERSION}-src MAINTAINER= mi@aldan.algebra.com COMMENT= SSL extensions for TCL; dynamicly loadable LICENSE= TclTk LICENSE_NAME= Tcl/Tk License LICENSE_FILE= ${WRKSRC}/license.terms LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept OPTIONS_DEFINE= DOCS USES+= tcl USE_OPENSSL= yes GNU_CONFIGURE= yes CONFIGURE_ARGS+=--exec-prefix=${PREFIX} \ --with-tcl=${TCL_LIBDIR} \ --with-ssl-dir=${OPENSSLBASE} TCLPKG= tls${PORTVERSION} WRKSRC= ${WRKDIR}/${TCLPKG} PLIST_FILES= include/tls.h \ lib/${TCLPKG}/libtls.so.1 \ lib/${TCLPKG}/pkgIndex.tcl \ lib/${TCLPKG}/tls.tcl PORTDOCS= * .include post-patch: ${REINPLACE_CMD} -e \ - 's,package require tls.*,load ${WRKSRC}/lib${TCLPKG}.so;\ + 's,package require tls.*,load ${WRKSRC}/libtls.so.1;\ source ${WRKSRC}/tls.tcl,' \ ${WRKSRC}/tests/*.test # The tests in ciphers.test are meaningless so far: ${MV} ${WRKSRC}/tests/ciphers.test ${WRKSRC}/tests/ciphers.test.broken .if ${PORT_OPTIONS:MDOCS} post-install: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/tls.htm ${STAGEDIR}${DOCSDIR} .endif -regression-test: +xregression-test test check: build cd ${WRKSRC}/tests && ${SETENV} TCL_LIBRARY="${WRKSRC}" \ tclsh${TCL_VER} all.tcl .include Index: head/devel/tcltls/files/patch-protocols =================================================================== --- head/devel/tcltls/files/patch-protocols (nonexistent) +++ head/devel/tcltls/files/patch-protocols (revision 382282) @@ -0,0 +1,130 @@ +--- tls.c 2014-12-08 14:10:28.000000000 -0500 ++++ tls.c 2015-03-25 19:37:53.000000000 -0400 +@@ -64,6 +64,6 @@ + Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); + +-static SSL_CTX *CTX_Init _ANSI_ARGS_((State *statePtr, int proto, char *key, +- char *cert, char *CAdir, char *CAfile, char *ciphers)); ++static SSL_CTX *CTX_Init _ANSI_ARGS_((State *statePtr, int proto, const char *key, ++ const char *cert, const char *CAdir, const char *CAfile, const char *ciphers)); + + static int TlsLibInit _ANSI_ARGS_ (()) ; +@@ -538,5 +538,5 @@ + case TLS_SSL2: + #if defined(NO_SSL2) +- Tcl_AppendResult(interp, "protocol not supported", NULL); ++ Tcl_AppendResult(interp, protocols[index], ": protocol not supported", NULL); + return TCL_ERROR; + #else +@@ -545,5 +545,5 @@ + case TLS_SSL3: + #if defined(NO_SSL3) +- Tcl_AppendResult(interp, "protocol not supported", NULL); ++ Tcl_AppendResult(interp, protocols[index], ": protocol not supported", NULL); + return TCL_ERROR; + #else +@@ -552,5 +552,5 @@ + case TLS_TLS1: + #if defined(NO_TLS1) +- Tcl_AppendResult(interp, "protocol not supported", NULL); ++ Tcl_AppendResult(interp, protocols[index], ": protocol not supported", NULL); + return TCL_ERROR; + #else +@@ -559,5 +559,5 @@ + case TLS_TLS1_1: + #if defined(NO_TLS1_1) +- Tcl_AppendResult(interp, "protocol not supported", NULL); ++ Tcl_AppendResult(interp, protocols[index], ": protocol not supported", NULL); + return TCL_ERROR; + #else +@@ -566,5 +566,5 @@ + case TLS_TLS1_2: + #if defined(NO_TLS1_2) +- Tcl_AppendResult(interp, "protocol not supported", NULL); ++ Tcl_AppendResult(interp, protocols[index], ": protocol not supported", NULL); + return TCL_ERROR; + #else +@@ -575,10 +575,10 @@ + } + if (ctx == NULL) { +- Tcl_AppendResult(interp, REASON(), (char *) NULL); ++ Tcl_AppendResult(interp, REASON(), NULL); + return TCL_ERROR; + } + ssl = SSL_new(ctx); + if (ssl == NULL) { +- Tcl_AppendResult(interp, REASON(), (char *) NULL); ++ Tcl_AppendResult(interp, REASON(), NULL); + SSL_CTX_free(ctx); + return TCL_ERROR; +@@ -747,6 +747,18 @@ + #endif + int tls1 = 1; +- int tls1_1 = 1; +- int tls1_2 = 1; ++ int tls1_1 = ++#if defined(NO_TLS1_1) ++ 0 ++#else ++ 1 ++#endif ++ ; ++ int tls1_2 = ++#if defined(NO_TLS1_2) ++ 0 ++#else ++ 1 ++#endif ++ ; + int proto = 0; + int verify = 0, require = 0, request = 1; +@@ -1029,9 +1029,9 @@ + State *statePtr; + int proto; +- char *key; +- char *cert; +- char *CAdir; +- char *CAfile; +- char *ciphers; ++ const char *key; ++ const char *cert; ++ const char *CAdir; ++ const char *CAfile; ++ const char *ciphers; + { + Tcl_Interp *interp = statePtr->interp; +@@ -1050,5 +1050,5 @@ + #if defined(NO_SSL2) + if (ENABLED(proto, TLS_PROTO_SSL2)) { +- Tcl_AppendResult(interp, "protocol not supported", NULL); ++ Tcl_AppendResult(interp, "protocol SSL2 not supported", NULL); + return (SSL_CTX *)0; + } +@@ -1056,5 +1056,5 @@ + #if defined(NO_SSL3) + if (ENABLED(proto, TLS_PROTO_SSL3)) { +- Tcl_AppendResult(interp, "protocol not supported", NULL); ++ Tcl_AppendResult(interp, "protocol SSL3 not supported", NULL); + return (SSL_CTX *)0; + } +@@ -1062,5 +1062,5 @@ + #if defined(NO_TLS1) + if (ENABLED(proto, TLS_PROTO_TLS1)) { +- Tcl_AppendResult(interp, "protocol not supported", NULL); ++ Tcl_AppendResult(interp, "protocol TLS1 not supported", NULL); + return (SSL_CTX *)0; + } +@@ -1068,5 +1068,5 @@ + #if defined(NO_TLS1_1) + if (ENABLED(proto, TLS_PROTO_TLS1_1)) { +- Tcl_AppendResult(interp, "protocol not supported", NULL); ++ Tcl_AppendResult(interp, "protocol TLS1.1 not supported", NULL); + return (SSL_CTX *)0; + } +@@ -1074,5 +1074,5 @@ + #if defined(NO_TLS1_2) + if (ENABLED(proto, TLS_PROTO_TLS1_2)) { +- Tcl_AppendResult(interp, "protocol not supported", NULL); ++ Tcl_AppendResult(interp, "protocol TLS1.2 not supported", NULL); + return (SSL_CTX *)0; + } Property changes on: head/devel/tcltls/files/patch-protocols ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/tcltls/files/patch-warnings =================================================================== --- head/devel/tcltls/files/patch-warnings (revision 382281) +++ head/devel/tcltls/files/patch-warnings (revision 382282) @@ -1,131 +1,138 @@ --- tlsBIO.c Tue Feb 3 23:02:19 2004 +++ tlsBIO.c Mon Jun 20 10:18:45 2005 @@ -30,4 +30,5 @@ BioNew, BioFree, + NULL }; @@ -62,6 +63,6 @@ int ret; - dprintf(stderr,"\nBioWrite(0x%x, , %d) [0x%x]", - (unsigned int) bio, bufLen, (unsigned int) chan); + dprintf(stderr,"\nBioWrite(%p, , %d) [%p]", + (void *)bio, bufLen, (void *)chan); if (channelTypeVersion == TLS_CHANNEL_VERSION_2) { @@ -71,6 +72,6 @@ } - dprintf(stderr,"\n[0x%x] BioWrite(%d) -> %d [%d.%d]", - (unsigned int) chan, bufLen, ret, Tcl_Eof(chan), Tcl_GetErrno()); + dprintf(stderr,"\n[%p] BioWrite(%d) -> %d [%d.%d]", + (void *) chan, bufLen, ret, Tcl_Eof(chan), Tcl_GetErrno()); BIO_clear_flags(bio, BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY); @@ -97,6 +98,6 @@ int ret = 0; - dprintf(stderr,"\nBioRead(0x%x, , %d) [0x%x]", - (unsigned int) bio, bufLen, (unsigned int) chan); + dprintf(stderr,"\nBioRead(%p, , %d) [%p]", + (void *)bio, bufLen, (void *)chan); if (buf == NULL) return 0; @@ -108,6 +109,6 @@ } - dprintf(stderr,"\n[0x%x] BioRead(%d) -> %d [%d.%d]", - (unsigned int) chan, bufLen, ret, Tcl_Eof(chan), Tcl_GetErrno()); + dprintf(stderr,"\n[%p] BioRead(%d) -> %d [%d.%d]", + (void *) chan, bufLen, ret, Tcl_Eof(chan), Tcl_GetErrno()); BIO_clear_flags(bio, BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY); @@ -144,7 +145,6 @@ int *ip; - dprintf(stderr,"\nBioCtrl(0x%x, 0x%x, 0x%x, 0x%x)", - (unsigned int) bio, (unsigned int) cmd, (unsigned int) num, - (unsigned int) ptr); + dprintf(stderr,"\nBioCtrl(%p, 0x%x, 0x%lx, %p)", + (void *)bio, cmd, num, ptr); switch (cmd) { --- tlsIO.c Mon Feb 4 17:46:31 2002 +++ tlsIO.c Mon Jun 20 10:18:45 2005 @@ -287,5 +287,5 @@ State *statePtr = (State *) instanceData; - dprintf(stderr,"\nTlsCloseProc(0x%x)", (unsigned int) statePtr); + dprintf(stderr,"\nTlsCloseProc(%p)", instanceData); if (channelTypeVersion == TLS_CHANNEL_VERSION_1) { @@ -413,5 +413,5 @@ *errorCodePtr = 0; - dprintf(stderr,"\nBIO_write(0x%x, %d)", (unsigned int) statePtr, toWrite); + dprintf(stderr,"\nBIO_write(%p, %d)", instanceData, toWrite); if (!SSL_is_init_finished(statePtr->ssl)) { @@ -443,6 +443,6 @@ ERR_clear_error(); written = BIO_write(statePtr->bio, buf, toWrite); - dprintf(stderr,"\nBIO_write(0x%x, %d) -> [%d]", - (unsigned int) statePtr, toWrite, written); + dprintf(stderr,"\nBIO_write(%p, %d) -> [%d]", + instanceData, toWrite, written); } if (written <= 0) { @@ -851,5 +851,5 @@ int err; - dprintf(stderr,"\nWaitForConnect(0x%x)", (unsigned int) statePtr); + dprintf(stderr,"\nWaitForConnect(%p)", (void *)statePtr); for (;;) { --- tls.c 2014-12-08 14:10:28.000000000 -0500 +++ tls.c 2015-03-25 18:22:52.000000000 -0400 @@ -514,5 +514,5 @@ }; enum protocol { - TLS_SSL2, TLS_SSL3, TLS_TLS1, TLS_TLS1_1, TLS_TLS1_2, TLS_NONE -+ TLS_SSL2, TLS_SSL3, TLS_TLS1, TLS_TLS1_1, TLS_TLS1_2, ++ TLS_SSL2, TLS_SSL3, TLS_TLS1, TLS_TLS1_1, TLS_TLS1_2 }; Tcl_Obj *objPtr; +@@ -1040,5 +1040,5 @@ + Tcl_DString ds1; + int off = 0; +- const SSL_METHOD *method; ++ SSL_METHOD *method; + + if (!proto) { @@ -1361,5 +1361,5 @@ { static CONST84 char *commands [] = { "req", NULL }; - enum command { C_REQ, C_DUMMY }; + enum command { C_REQ }; int cmd; @@ -1465,11 +1465,11 @@ name=X509_get_subject_name(cert); - X509_NAME_add_entry_by_txt(name,"C", MBSTRING_ASC, k_C, -1, -1, 0); - X509_NAME_add_entry_by_txt(name,"ST", MBSTRING_ASC, k_ST, -1, -1, 0); - X509_NAME_add_entry_by_txt(name,"L", MBSTRING_ASC, k_L, -1, -1, 0); - X509_NAME_add_entry_by_txt(name,"O", MBSTRING_ASC, k_O, -1, -1, 0); - X509_NAME_add_entry_by_txt(name,"OU", MBSTRING_ASC, k_OU, -1, -1, 0); - X509_NAME_add_entry_by_txt(name,"CN", MBSTRING_ASC, k_CN, -1, -1, 0); - X509_NAME_add_entry_by_txt(name,"Email", MBSTRING_ASC, k_Email, -1, -1, 0); + X509_NAME_add_entry_by_txt(name,"C", MBSTRING_ASC, (const unsigned char *)k_C, -1, -1, 0); + X509_NAME_add_entry_by_txt(name,"ST", MBSTRING_ASC, (const unsigned char *)k_ST, -1, -1, 0); + X509_NAME_add_entry_by_txt(name,"L", MBSTRING_ASC, (const unsigned char *)k_L, -1, -1, 0); + X509_NAME_add_entry_by_txt(name,"O", MBSTRING_ASC, (const unsigned char *)k_O, -1, -1, 0); + X509_NAME_add_entry_by_txt(name,"OU", MBSTRING_ASC, (const unsigned char *)k_OU, -1, -1, 0); + X509_NAME_add_entry_by_txt(name,"CN", MBSTRING_ASC, (const unsigned char *)k_CN, -1, -1, 0); + X509_NAME_add_entry_by_txt(name,"Email", MBSTRING_ASC, (const unsigned char *)k_Email, -1, -1, 0); X509_set_subject_name(cert,name); --- tlsInt.h 2014-12-08 14:10:28.000000000 -0500 +++ tlsInt.h 2015-03-25 18:29:34.000000000 -0400 @@ -18,5 +18,5 @@ * */ -#ifndef _TSLINT_H +#ifndef _TLSINT_H #define _TLSINT_H