Index: head/security/distcache/Makefile =================================================================== --- head/security/distcache/Makefile (revision 541399) +++ head/security/distcache/Makefile (revision 541400) @@ -1,42 +1,43 @@ # Created by: Marcel Prisi # $FreeBSD$ PORTNAME= distcache DISTVERSION= 1.5.1 CATEGORIES= security www MASTER_SITES= SF/distcache/1.%20distcache-devel/1.5.1 MAINTAINER= ports@FreeBSD.org COMMENT= Distributed OpenSSL session caching tools LICENSE= LGPL21 LICENSE_FILE= ${WRKSRC}/LICENSE USES= libtool ssl tar:bzip2 USE_RC_SUBR= dc_server USE_LDCONFIG= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-shared --with-ssl=${OPENSSLBASE} INSTALL_TARGET= install-strip SUB_LIST= NAME=dc_server PORTDOCS= ANNOUNCE BUGS CHANGES FAQ README OPTIONS_DEFINE= DOCS -.include +post-patch: + @${GREP} -q 'define SSLeay_version' /usr/include/openssl/crypto.h \ + && ${REINPLACE_CMD} -e 's,SSLeay_version,OpenSSL_version,' \ + ${WRKSRC}/ssl/configure || : -.if ${SSL_DEFAULT} == base -BROKEN_FreeBSD_12= SSL/TLS libraries were missing or unusable -BROKEN_FreeBSD_13= SSL/TLS libraries were missing or unusable -.endif - post-install: # INSTALL_TARGET=install-strip isn't working! Brute force it @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}) -.include +do-test: + @cd ${WRKSRC} && ${SH} devel/test.sh + +.include Index: head/security/distcache/files/patch-ssl__swamp__swamp.c =================================================================== --- head/security/distcache/files/patch-ssl__swamp__swamp.c (revision 541399) +++ head/security/distcache/files/patch-ssl__swamp__swamp.c (revision 541400) @@ -1,17 +1,45 @@ ---- ssl/swamp/swamp.c.orig 2004-02-19 20:37:33 UTC +--- ssl/swamp/swamp.c.orig 2004-04-30 12:58:00 UTC +++ ssl/swamp/swamp.c -@@ -104,10 +104,14 @@ static SSL_CTX *ossl_setup_ssl_ctx(const +@@ -105,10 +105,14 @@ static SSL_CTX *ossl_setup_ssl_ctx(const swamp_config switch(config->sslmeth) { case SWAMP_SSLMETH_NORMAL: sslmethod = SSLv23_client_method(); break; -+#ifndef OPENSSL_NO_SSL2 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L && !defined(OPENSSL_NO_SSL2) case SWAMP_SSLMETH_SSLv2: sslmethod = SSLv2_client_method(); break; +#endif -+#ifndef OPENSSL_NO_SSL3 ++#ifndef OPENSSL_NO_SSL3_METHOD case SWAMP_SSLMETH_SSLv3: sslmethod = SSLv3_client_method(); break; +#endif case SWAMP_SSLMETH_TLSv1: sslmethod = TLSv1_client_method(); break; default: +@@ -151,7 +155,7 @@ static SSL_CTX *ossl_setup_ssl_ctx(const swamp_config + fp = NULL; + } + if(x509) { +- if(!X509_STORE_add_cert(ctx->cert_store, x509)) ++ if(!X509_STORE_add_cert(SSL_CTX_get_cert_store(ctx), x509)) + return NULL; + /* Reference counts */ + X509_free(x509); +@@ -444,13 +448,16 @@ possible_reconnect: + } + } + if(ctx->config->output_sessions) { ++ const unsigned char *session_id; ++ unsigned int session_id_length; + temp_session = SSL_get1_session(item->ssl); + /* debug some stuff :-) */ + SYS_fprintf(SYS_stderr, "session-id[conn:%i]:", loop); +- for(tmp = 0; tmp < (int)temp_session->session_id_length; ++ session_id = SSL_SESSION_get_id(temp_session, &session_id_length); ++ for(tmp = 0; tmp < session_id_length; + tmp++) + SYS_fprintf(SYS_stderr, "%02X", +- temp_session->session_id[tmp]); ++ session_id[tmp]); + SYS_fprintf(SYS_stderr, "\n"); + SSL_SESSION_free(temp_session); + } Index: head/security/distcache/files/patch-ssl__swamp__swamp.h =================================================================== --- head/security/distcache/files/patch-ssl__swamp__swamp.h (revision 541399) +++ head/security/distcache/files/patch-ssl__swamp__swamp.h (revision 541400) @@ -1,12 +1,15 @@ ---- ssl/swamp/swamp.h.orig 2004-02-17 20:29:34 UTC +--- ssl/swamp/swamp.h.orig 2004-04-30 12:58:00 UTC +++ ssl/swamp/swamp.h -@@ -161,7 +161,9 @@ char *util_parse_escaped_string(const ch +@@ -162,8 +162,12 @@ char *util_parse_escaped_string(const char *str_toconv typedef enum st_swamp_sslmeth { SWAMP_SSLMETH_NORMAL, /* SSLv23_client_method() */ -+#ifndef OPENSSL_NO_SSL2 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L && !defined(OPENSSL_NO_SSL2) SWAMP_SSLMETH_SSLv2, /* SSLv2_client_method() */ +#endif ++#ifndef OPENSSL_NO_SSL3_METHOD SWAMP_SSLMETH_SSLv3, /* SSLv3_client_method() */ ++#endif SWAMP_SSLMETH_TLSv1 /* TLSv1_client_method() */ } swamp_sslmeth; + Index: head/security/distcache/files/patch-ssl__swamp__utils.c =================================================================== --- head/security/distcache/files/patch-ssl__swamp__utils.c (revision 541399) +++ head/security/distcache/files/patch-ssl__swamp__utils.c (revision 541400) @@ -1,17 +1,17 @@ ---- ssl/swamp/utils.c.orig 2004-02-17 20:29:34 UTC +--- ssl/swamp/utils.c.orig 2004-04-30 12:58:00 UTC +++ ssl/swamp/utils.c -@@ -269,10 +269,14 @@ int util_parse_sslmeth(const char *str_t +@@ -267,10 +267,14 @@ int util_parse_sslmeth(const char *str_toconvert, swam { if(!strcmp(str_toconvert, "normal")) *val = SWAMP_SSLMETH_NORMAL; -+#ifndef OPENSSL_NO_SSL2 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L && !defined(OPENSSL_NO_SSL2) else if(!strcmp(str_toconvert, "sslv2")) *val = SWAMP_SSLMETH_SSLv2; +#endif +#ifndef OPENSSL_NO_SSL3 else if(!strcmp(str_toconvert, "sslv3")) *val = SWAMP_SSLMETH_SSLv3; +#endif else if(!strcmp(str_toconvert, "tlsv1")) *val = SWAMP_SSLMETH_TLSv1; else Index: head/security/distcache/files/patch-ssl_libnalssl_bss__nal.c =================================================================== --- head/security/distcache/files/patch-ssl_libnalssl_bss__nal.c (nonexistent) +++ head/security/distcache/files/patch-ssl_libnalssl_bss__nal.c (revision 541400) @@ -0,0 +1,105 @@ +--- ssl/libnalssl/bss_nal.c.orig 2004-05-27 20:54:48 UTC ++++ ssl/libnalssl/bss_nal.c +@@ -41,26 +41,30 @@ static long NAL_bio_ctrl(BIO *, int, long, void *); + static int NAL_bio_new(BIO *); + static int NAL_bio_free(BIO *); + +-static BIO_METHOD NAL_bio_meth = { +- BIO_TYPE_BIO, +- "NAL_CONNECTION", +- NAL_bio_write, +- NAL_bio_read, +- NAL_bio_puts, +- NULL, /* bgets */ +- NAL_bio_ctrl, +- NAL_bio_new, +- NAL_bio_free, +- NULL /* callback_ctrl */ +-}; ++static BIO_METHOD *NAL_bio_meth = NULL; + ++static BIO_METHOD *create_NAL_bio_meth(void) ++{ ++ BIO_METHOD *bm = BIO_meth_new(BIO_get_new_index(), "NAL_CONNECTION"); ++ BIO_meth_set_write(bm, NAL_bio_write); ++ BIO_meth_set_read(bm, NAL_bio_read); ++ BIO_meth_set_puts(bm, NAL_bio_puts); ++ BIO_meth_set_ctrl(bm, NAL_bio_ctrl); ++ BIO_meth_set_create(bm, NAL_bio_new); ++ BIO_meth_set_destroy(bm, NAL_bio_free); ++ return bm; ++} ++ + BIO *BIO_new_NAL_CONNECTION(NAL_CONNECTION *c) + { +- BIO *b = BIO_new(&NAL_bio_meth); ++ if (NAL_bio_meth == NULL) ++ NAL_bio_meth = create_NAL_bio_meth(); ++ ++ BIO *b = BIO_new(NAL_bio_meth); + if(!b) return NULL; +- b->ptr = c; +- b->init = 1; +- b->shutdown = 1; ++ BIO_set_data(b, c); ++ BIO_set_init(b, 1); ++ BIO_set_shutdown(b, 1); + return b; + } + +@@ -69,10 +73,10 @@ static int NAL_bio_new(BIO *b) + #ifdef NAL_BIO_DEBUG + SYS_fprintf(SYS_stdout, "NAL_BIO_DEBUG: NAL_bio_new()\n"); + #endif +- b->init = 0; +- b->num = -1; +- b->ptr = NULL; +- b->flags = 0; ++ BIO_set_init(b, 0); ++ // XXX: b->num = -1; ++ BIO_set_data(b, NULL); ++ BIO_set_flags(b, 0); + return 1; + } + +@@ -81,8 +85,8 @@ static int NAL_bio_free(BIO *b) + #ifdef NAL_BIO_DEBUG + SYS_fprintf(SYS_stdout, "NAL_BIO_DEBUG: NAL_bio_free()\n"); + #endif +- if(b->shutdown && b->init && b->ptr) { +- NAL_CONNECTION *c = b->ptr; ++ if(BIO_get_shutdown(b) && BIO_get_init(b) && BIO_get_data(b)) { ++ NAL_CONNECTION *c = BIO_get_data(b); + NAL_CONNECTION_free(c); + } + return 1; +@@ -91,7 +95,7 @@ static int NAL_bio_free(BIO *b) + static int NAL_bio_write(BIO *b, const char *ptr, int len) + { + unsigned int res; +- NAL_CONNECTION *c = (NAL_CONNECTION *)b->ptr; ++ NAL_CONNECTION *c = (NAL_CONNECTION *)BIO_get_data(b); + NAL_BUFFER *buf = NAL_CONNECTION_get_send(c); + #ifdef NAL_BIO_DEBUG + SYS_fprintf(SYS_stdout, "NAL_BIO_DEBUG: NAL_bio_write(%d)\n", len); +@@ -109,7 +113,7 @@ static int NAL_bio_write(BIO *b, const char *ptr, int + static int NAL_bio_read(BIO *b, char *ptr, int len) + { + unsigned int res; +- NAL_CONNECTION *c = (NAL_CONNECTION *)b->ptr; ++ NAL_CONNECTION *c = (NAL_CONNECTION *)BIO_get_data(b); + NAL_BUFFER *buf = NAL_CONNECTION_get_read(c); + #ifdef NAL_BIO_DEBUG + SYS_fprintf(SYS_stdout, "NAL_BIO_DEBUG: NAL_bio_read(%d)\n", len); +@@ -150,9 +154,9 @@ static long NAL_bio_ctrl(BIO *b, int cmd, long num, vo + return 1; + /* Commands */ + case BIO_CTRL_GET_CLOSE: +- return b->shutdown; ++ return BIO_get_shutdown(b); + case BIO_CTRL_SET_CLOSE: +- b->shutdown = (int)num; ++ BIO_set_shutdown(b, (int)num); + return 1; + default: + #ifdef NAL_BIO_DEBUG Property changes on: head/security/distcache/files/patch-ssl_libnalssl_bss__nal.c ___________________________________________________________________ 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