Gentoo Archives: gentoo-commits

From: "Samuli Suominen (ssuominen)" <ssuominen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/sslwrap/files: sslwrap-2.0.6-build.patch
Date: Sun, 02 Dec 2012 04:41:13
Message-Id: 20121202044101.39A5C2171E@flycatcher.gentoo.org
1 ssuominen 12/12/02 04:41:01
2
3 Added: sslwrap-2.0.6-build.patch
4 Log:
5 Update .ebuild to meet current requirement(s)
6
7 (Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
8
9 Revision Changes Path
10 1.1 net-misc/sslwrap/files/sslwrap-2.0.6-build.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/sslwrap/files/sslwrap-2.0.6-build.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/sslwrap/files/sslwrap-2.0.6-build.patch?rev=1.1&content-type=text/plain
14
15 Index: sslwrap-2.0.6-build.patch
16 ===================================================================
17 diff -ur sslwrap206.orig/apps.h sslwrap206/apps.h
18 --- sslwrap206.orig/apps.h 2000-11-12 00:01:25.000000000 +0200
19 +++ sslwrap206/apps.h 2012-12-02 06:27:36.774823569 +0200
20 @@ -65,9 +65,9 @@
21 #include "../e_os.h"
22 #endif
23
24 -#include OPENSSL"buffer.h"
25 -#include OPENSSL"bio.h"
26 -#include OPENSSL"crypto.h"
27 +#include "openssl/buffer.h"
28 +#include "openssl/bio.h"
29 +#include "openssl/crypto.h"
30 /*#include "progs.h"*/
31
32 #ifdef WIN16
33 diff -ur sslwrap206.orig/Makefile sslwrap206/Makefile
34 --- sslwrap206.orig/Makefile 2000-11-12 00:01:25.000000000 +0200
35 +++ sslwrap206/Makefile 2012-12-02 06:34:57.362496172 +0200
36 @@ -1,28 +1,9 @@
37 -
38 SRC = s_server.c s_socket.c s_cb.c
39 -
40 -# For Solaris2.6
41 -#EXTLIBS = -lxnet
42 -
43 -# Debug/Optimizations
44 -#OPT = -g
45 -OPT = -O2
46 -
47 -# Define
48 +LIBS = `pkg-config --libs openssl`
49 OPENSSL="\"openssl/\""
50 -#OPENSSL=""
51
52 -all :
53 - gcc -o sslwrap ${SRC} ${OPT} -DFLAT_INC -DOPENSSL=${OPENSSL} \
54 - -L/usr/local/ssl/lib -lssl -lcrypto \
55 - -I/usr/local/ssl/include \
56 - ${EXTLIBS}
57 +all:
58 + $(CC) $(LDFLAGS) $(CFLAGS) -o sslwrap ${SRC} -DFLAT_INC -DOPENSSL=${OPENSSL} ${LIBS}
59
60 clean:
61 rm -f sslwrap *.o *~
62 -
63 -
64 -
65 -
66 -
67 -
68 diff -ur sslwrap206.orig/s_cb.c sslwrap206/s_cb.c
69 --- sslwrap206.orig/s_cb.c 2000-11-12 00:01:25.000000000 +0200
70 +++ sslwrap206/s_cb.c 2012-12-02 06:27:36.078783978 +0200
71 @@ -63,9 +63,9 @@
72 #include "apps.h"
73 #undef NON_MAIN
74 #undef USE_SOCKETS
75 -#include OPENSSL"err.h"
76 -#include OPENSSL"x509.h"
77 -#include OPENSSL"ssl.h"
78 +#include "openssl/err.h"
79 +#include "openssl/x509.h"
80 +#include "openssl/ssl.h"
81 #include "s_apps.h"
82
83 int verify_depth=0;
84 diff -ur sslwrap206.orig/s_server.c sslwrap206/s_server.c
85 --- sslwrap206.orig/s_server.c 2000-11-12 00:11:18.000000000 +0200
86 +++ sslwrap206/s_server.c 2012-12-02 06:27:36.080784083 +0200
87 @@ -27,11 +27,7 @@
88 * Version 2.0.5
89 * Compatibility with OpenSSL 0.9.4
90 *
91 - * Version 2.0.6
92 - * Changed Malloc to malloc and Free to free
93 - * Changed #include "err.h" to #include OPENSSL"err.h"
94 - *
95 - * Copyright 1997-9, 2000 Rick R. Kaseguma
96 + * Copyright 1997-9 Rick R. Kaseguma
97 * All rights reserved
98 *
99 * Feel free to use this as you want for commercial or non-commercial use,
100 @@ -121,14 +117,14 @@
101 #ifdef WIN16
102 #define APPS_WIN16
103 #endif
104 -#include OPENSSL"lhash.h"
105 -#include OPENSSL"bn.h"
106 +#include "openssl/lhash.h"
107 +#include "openssl/bn.h"
108 #define USE_SOCKETS
109 #include "apps.h"
110 -#include OPENSSL"err.h"
111 -#include OPENSSL"pem.h"
112 -#include OPENSSL"x509.h"
113 -#include OPENSSL"ssl.h"
114 +#include "err.h"
115 +#include "openssl/pem.h"
116 +#include "openssl/x509.h"
117 +#include "openssl/ssl.h"
118 #include "s_apps.h"
119
120 #ifndef NOPROTO
121 @@ -468,7 +464,7 @@
122
123 if (bugs) SSL_CTX_set_options(ctx,SSL_OP_ALL);
124 if (hack) SSL_CTX_set_options(ctx,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
125 - if (hack) SSL_CTX_set_options(ctx,SSL_OP_NON_EXPORT_FIRST);
126 + if (hack) SSL_CTX_set_options(ctx,SSL_OP_CIPHER_SERVER_PREFERENCE);
127
128 if (state) SSL_CTX_set_info_callback(ctx,apps_ssl_info_callback);
129
130 @@ -622,7 +618,7 @@
131 #endif /*NO_EXEC*/
132 }
133
134 - if ((buf=malloc(BUFSIZZ)) == NULL)
135 + if ((buf=CRYPTO_malloc(BUFSIZZ,__FILE__,__LINE__)) == NULL)
136 {
137 BIO_printf(bio_err,"out of memory\n");
138 goto err;
139 @@ -729,7 +725,7 @@
140 if (buf != NULL)
141 {
142 memset(buf,0,BUFSIZZ);
143 - free(buf);
144 + CRYPTO_free(buf);
145 }
146
147 return(ret);
148 diff -ur sslwrap206.orig/s_socket.c sslwrap206/s_socket.c
149 --- sslwrap206.orig/s_socket.c 2000-11-12 00:03:47.000000000 +0200
150 +++ sslwrap206/s_socket.c 2012-12-02 06:27:36.081784132 +0200
151 @@ -67,7 +67,7 @@
152 #undef USE_SOCKETS
153 #undef NON_MAIN
154 #include "s_apps.h"
155 -#include OPENSSL"ssl.h"
156 +#include "openssl/ssl.h"
157
158 #ifndef NOPROTO
159 static struct hostent *GetHostByName(char *name);
160 @@ -305,7 +305,7 @@
161 return(0);
162 }
163 i=(*cb)(name,sock, sock);
164 - if (name != NULL) free(name);
165 + if (name != NULL) CRYPTO_free(name);
166 SHUTDOWN(sock);
167 if (i < 0)
168 {
169 @@ -410,7 +410,7 @@
170 }
171 else
172 {
173 - if ((*host=(char *)malloc(strlen(h1->h_name)+1)) == NULL)
174 + if ((*host=(char *)CRYPTO_malloc(strlen(h1->h_name)+1,__FILE__,__LINE__)) == NULL)
175 {
176 perror("Malloc");
177 return(0);