Fossil SCM

Merge the SSL branch into the trunk.

drh 2010-02-08 21:18 trunk merge
Commit b05cb4a0e15d0712e080235ac3bcdbcdf472afbe
+14 -1
--- Makefile
+++ Makefile
@@ -15,10 +15,14 @@
1515
1616
#### The suffix to add to executable files. ".exe" for windows.
1717
# Nothing for unix.
1818
#
1919
E =
20
+
21
+#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
22
+#
23
+FOSSIL_ENABLE_SSL=1
2024
2125
#### C Compile and options for use in building executables that
2226
# will run on the target platform. This is usually the same
2327
# as BCC, unless you are cross-compiling. This C compiler builds
2428
# the finished binary for fossil. The BCC compiler above is used
@@ -25,10 +29,15 @@
2529
# for building intermediate code-generator tools.
2630
#
2731
#TCC = gcc -O6
2832
#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
2933
TCC = gcc -g -Os -Wall
34
+
35
+# With HTTPS support
36
+ifdef FOSSIL_ENABLE_SSL
37
+TCC += -DFOSSIL_ENABLE_SSL=1
38
+endif
3039
3140
#### Extra arguments for linking the finished binary. Fossil needs
3241
# to link against the Z-Lib compression library. There are no
3342
# other dependencies. We sometimes add the -static option here
3443
# so that we can build a static executable that will run in a
@@ -38,11 +47,15 @@
3847
# If you're on OpenSolaris:
3948
# LIB += lsocket
4049
# Solaris 10 needs:
4150
# LIB += -lsocket -lnsl
4251
# My assumption is that the Sol10 flags will work for Sol8/9 and possibly 11.
43
-
52
+#
53
+# OpenSSL:
54
+ifdef FOSSIL_ENABLE_SSL
55
+LIB += -lcrypto -lssl
56
+endif
4457
4558
#### Tcl shell for use in running the fossil testsuite.
4659
#
4760
TCLSH = tclsh
4861
4962
--- Makefile
+++ Makefile
@@ -15,10 +15,14 @@
15
16 #### The suffix to add to executable files. ".exe" for windows.
17 # Nothing for unix.
18 #
19 E =
 
 
 
 
20
21 #### C Compile and options for use in building executables that
22 # will run on the target platform. This is usually the same
23 # as BCC, unless you are cross-compiling. This C compiler builds
24 # the finished binary for fossil. The BCC compiler above is used
@@ -25,10 +29,15 @@
25 # for building intermediate code-generator tools.
26 #
27 #TCC = gcc -O6
28 #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
29 TCC = gcc -g -Os -Wall
 
 
 
 
 
30
31 #### Extra arguments for linking the finished binary. Fossil needs
32 # to link against the Z-Lib compression library. There are no
33 # other dependencies. We sometimes add the -static option here
34 # so that we can build a static executable that will run in a
@@ -38,11 +47,15 @@
38 # If you're on OpenSolaris:
39 # LIB += lsocket
40 # Solaris 10 needs:
41 # LIB += -lsocket -lnsl
42 # My assumption is that the Sol10 flags will work for Sol8/9 and possibly 11.
43
 
 
 
 
44
45 #### Tcl shell for use in running the fossil testsuite.
46 #
47 TCLSH = tclsh
48
49
--- Makefile
+++ Makefile
@@ -15,10 +15,14 @@
15
16 #### The suffix to add to executable files. ".exe" for windows.
17 # Nothing for unix.
18 #
19 E =
20
21 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
22 #
23 FOSSIL_ENABLE_SSL=1
24
25 #### C Compile and options for use in building executables that
26 # will run on the target platform. This is usually the same
27 # as BCC, unless you are cross-compiling. This C compiler builds
28 # the finished binary for fossil. The BCC compiler above is used
@@ -25,10 +29,15 @@
29 # for building intermediate code-generator tools.
30 #
31 #TCC = gcc -O6
32 #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
33 TCC = gcc -g -Os -Wall
34
35 # With HTTPS support
36 ifdef FOSSIL_ENABLE_SSL
37 TCC += -DFOSSIL_ENABLE_SSL=1
38 endif
39
40 #### Extra arguments for linking the finished binary. Fossil needs
41 # to link against the Z-Lib compression library. There are no
42 # other dependencies. We sometimes add the -static option here
43 # so that we can build a static executable that will run in a
@@ -38,11 +47,15 @@
47 # If you're on OpenSolaris:
48 # LIB += lsocket
49 # Solaris 10 needs:
50 # LIB += -lsocket -lnsl
51 # My assumption is that the Sol10 flags will work for Sol8/9 and possibly 11.
52 #
53 # OpenSSL:
54 ifdef FOSSIL_ENABLE_SSL
55 LIB += -lcrypto -lssl
56 endif
57
58 #### Tcl shell for use in running the fossil testsuite.
59 #
60 TCLSH = tclsh
61
62
+13
--- Makefile.w32
+++ Makefile.w32
@@ -15,10 +15,14 @@
1515
1616
#### The suffix to add to executable files. ".exe" for windows.
1717
# Nothing for unix.
1818
#
1919
E = .exe
20
+
21
+#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
22
+#
23
+# FOSSIL_ENABLE_SSL=1
2024
2125
#### C Compile and options for use in building executables that
2226
# will run on the target platform. This is usually the same
2327
# as BCC, unless you are cross-compiling. This C compiler builds
2428
# the finished binary for fossil. The BCC compiler above is used
@@ -27,10 +31,15 @@
2731
#TCC = gcc -O6
2832
#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
2933
#TCC = gcc -g -Os -Wall
3034
#TCC = gcc -g -Os -Wall -DFOSSIL_I18N=0 -L/usr/local/lib -I/usr/local/include
3135
TCC = gcc -Os -Wall -DFOSSIL_I18N=0 -L/mingw/lib -I/mingw/include
36
+
37
+# With HTTPS support
38
+ifdef FOSSIL_ENABLE_SSL
39
+TCC += -DFOSSIL_ENABLE_SSL=1
40
+endif
3241
3342
#### Extra arguments for linking the finished binary. Fossil needs
3443
# to link against the Z-Lib compression library. There are no
3544
# other dependencies. We sometimes add the -static option here
3645
# so that we can build a static executable that will run in a
@@ -37,10 +46,14 @@
3746
# chroot jail.
3847
#
3948
#LIB = -lz
4049
#LIB = -lz -lws2_32
4150
LIB = -lmingwex -lz -lws2_32
51
+# OpenSSL:
52
+ifdef FOSSIL_ENABLE_SSL
53
+LIB += -lcrypto -lssl
54
+endif
4255
4356
#### Tcl shell for use in running the fossil testsuite.
4457
#
4558
TCLSH = tclsh
4659
4760
4861
ADDED src/http_ssl.c
--- Makefile.w32
+++ Makefile.w32
@@ -15,10 +15,14 @@
15
16 #### The suffix to add to executable files. ".exe" for windows.
17 # Nothing for unix.
18 #
19 E = .exe
 
 
 
 
20
21 #### C Compile and options for use in building executables that
22 # will run on the target platform. This is usually the same
23 # as BCC, unless you are cross-compiling. This C compiler builds
24 # the finished binary for fossil. The BCC compiler above is used
@@ -27,10 +31,15 @@
27 #TCC = gcc -O6
28 #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
29 #TCC = gcc -g -Os -Wall
30 #TCC = gcc -g -Os -Wall -DFOSSIL_I18N=0 -L/usr/local/lib -I/usr/local/include
31 TCC = gcc -Os -Wall -DFOSSIL_I18N=0 -L/mingw/lib -I/mingw/include
 
 
 
 
 
32
33 #### Extra arguments for linking the finished binary. Fossil needs
34 # to link against the Z-Lib compression library. There are no
35 # other dependencies. We sometimes add the -static option here
36 # so that we can build a static executable that will run in a
@@ -37,10 +46,14 @@
37 # chroot jail.
38 #
39 #LIB = -lz
40 #LIB = -lz -lws2_32
41 LIB = -lmingwex -lz -lws2_32
 
 
 
 
42
43 #### Tcl shell for use in running the fossil testsuite.
44 #
45 TCLSH = tclsh
46
47
48 DDED src/http_ssl.c
--- Makefile.w32
+++ Makefile.w32
@@ -15,10 +15,14 @@
15
16 #### The suffix to add to executable files. ".exe" for windows.
17 # Nothing for unix.
18 #
19 E = .exe
20
21 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
22 #
23 # FOSSIL_ENABLE_SSL=1
24
25 #### C Compile and options for use in building executables that
26 # will run on the target platform. This is usually the same
27 # as BCC, unless you are cross-compiling. This C compiler builds
28 # the finished binary for fossil. The BCC compiler above is used
@@ -27,10 +31,15 @@
31 #TCC = gcc -O6
32 #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
33 #TCC = gcc -g -Os -Wall
34 #TCC = gcc -g -Os -Wall -DFOSSIL_I18N=0 -L/usr/local/lib -I/usr/local/include
35 TCC = gcc -Os -Wall -DFOSSIL_I18N=0 -L/mingw/lib -I/mingw/include
36
37 # With HTTPS support
38 ifdef FOSSIL_ENABLE_SSL
39 TCC += -DFOSSIL_ENABLE_SSL=1
40 endif
41
42 #### Extra arguments for linking the finished binary. Fossil needs
43 # to link against the Z-Lib compression library. There are no
44 # other dependencies. We sometimes add the -static option here
45 # so that we can build a static executable that will run in a
@@ -37,10 +46,14 @@
46 # chroot jail.
47 #
48 #LIB = -lz
49 #LIB = -lz -lws2_32
50 LIB = -lmingwex -lz -lws2_32
51 # OpenSSL:
52 ifdef FOSSIL_ENABLE_SSL
53 LIB += -lcrypto -lssl
54 endif
55
56 #### Tcl shell for use in running the fossil testsuite.
57 #
58 TCLSH = tclsh
59
60
61 DDED src/http_ssl.c
--- a/src/http_ssl.c
+++ b/src/http_ssl.c
@@ -0,0 +1,78 @@
1
+voidg.g.urlPg.ur(c)me, g.urlPort,g.urlPath = g.g.urlHg.g.urlNg.urlPg.urlName, g.urlPort,g.useProxy?g.urlHostname:g.urlGNU General Public
2
+** License version 2 as published by the Free Software Foundation._STRINGSlsendif
3
+ }
4
+
5
+ = (const unsigned char *) }
6
+
7
+OSTNAMg.urlNg.urlN!= 200cWITHOUT ANY WARRANTY%s\r\n"
8
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9
+** General Public License for more details.
10
+**
11
+** You should have received a copy of the GNU General Public
12
+** License along with this library; if not, write to the
13
+** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
14
+** Boston, MA 02111-1307, USA"Host: %s\r\n"
15
+
16
+
17
+ \r\n",
18
+ , g.urlHostnameBIO_write(bio, connStr, strle,);
19
+ }else{:%d\r\n, g.proxyOrigPort:%dproxyOrigPortoidg.g.urlPg.urlName, g.urlPort,g.urlPath = g.g.urlHg.g.urlNg.urlPg.urlName, g.urlPort,g.useProxy?g.urlHostname:ef HAVE_BIO_ADDR_HOSTNAME_STRINGSlsendif
20
+ }
21
+
22
+ = (const unsigned char *) }
23
+
24
+OSTNAMg.urlNg.urlN!= 200connStr, *bbuf;
25
+ Blobif( !g.urlProxyAut
26
+"Host: %s\r\n"
27
+
28
+ \r\n",
29
+ , g.urlHostname);
30
+ }e
31
+"Host: %s\r\n"
32
+
33
+
34
+ \r\n",
35
+ , g.urlHostnameBIO_write(bio, connStr, str#include "config.h"r
36
+#ifdef FOSSIL_ENABLE_SSLgurlPath = g.g.urlHgABLE_SSLg.urlPath = g.BLE_SSLg.urlPath = g.g.urlort** Make sure the CERT tame:g.urlName,
37
+ 2);
38
+ trusted2 blob_reset(&ans);const char *identityFile = ( g.zSSLIdentity!= 0) ? g.zSSLIdentity : identityFile identityFile, SSL_FILETYPE_PEM)!=1char *connStr ;%d", g.urlName, g.urlPort);VconnStr);
39
+ free(connStrSSL_get_verify_result(ssloidg.g.urlPg.ur©me, g.urlPort,g.urlPath = g.g.urlHg.g.urlNg.urlPg.urlName, g.urlPrlHostnameBIO_write(bio, connStr, strle,);
40
+ }else{:%d\r\n, g.proxyOrigPort:%dproxyOrigPortoidg.g.urlPg.urlName, g.urlPort,g.urlPath = g.g.urlHg.g.urlNg.urlPg.urlName, g.urlPort,g.useProxy?g.urlHostname:g.urlName,
41
+ g.useProxy?g.proxyOrigPort:g.urlPg.urlNg.urlN def HAVE_BIO_ADDR_HOSTNAME_STRINGSlsendif
42
+ }
43
+
44
+ = (const unsigned char *) }
45
+
46
+OSTNAMg.urlNg.urlN!= 200connStr, *bbuf;
47
+ Blobif( !g.urlProxyAut
48
+"Home, type)
49
+ @ );
50
+ ;
51
+ db_multi_exec(zSql);
52
+1;g.useProxy?g.urlHostname:g.urlName!='a' =='a' Blob ans2;[a=always/N]? ", &ans2);
53
+ trusted2 blob_reset(&ans);char *voidg.g.urlPg.ur(c)me, g.urlPort,g.urlPath = g.g.urlHg.g.urlNg.urlPg.urlName, g.urlPort,g.useProxy?g.urlHostname:g.urlGNU General Public
54
+** License version 2 as published by the Free Software Foundation._STRINGSlsendif
55
+ }
56
+
57
+ = (const unsigned char *) }
58
+
59
+OSTNAMg.urlNg.urlN!= 200cWITHOUT ANY WARRANTY%s\r\n"
60
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
61
+** General Public License for more details.
62
+**
63
+** You should have received a copy of the GNU General Public
64
+** License along with this library; if not, write to the
65
+** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
66
+** Boston, MA 02111-1307, USA"Host: %s\r\n"
67
+
68
+
69
+ \r\n",
70
+ , g.urlHostnameBIO_write(bio, connStr, strle,);
71
+ }else{:%d\r\n, g.proxyOrigPort:)me, g.urlPort,g.urlPath = g.g.urlHg.g.urlNg.urlPg.urlName, g.urlPort,g.useProxy?g.urlHostname:g.urlGNU General Public
72
+** License version 2 as published by the Free Software Foundation._STRINGSlsendif
73
+ }
74
+
75
+ = (const unsigned char *) }
76
+
77
+OSTNAMg.urlNg.urlN!= 200cWITHOUT ANY WARRANTY%s\r\n"
78
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPBlob ans;blob_zero(&ans)
--- a/src/http_ssl.c
+++ b/src/http_ssl.c
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/src/http_ssl.c
+++ b/src/http_ssl.c
@@ -0,0 +1,78 @@
1 voidg.g.urlPg.ur(c)me, g.urlPort,g.urlPath = g.g.urlHg.g.urlNg.urlPg.urlName, g.urlPort,g.useProxy?g.urlHostname:g.urlGNU General Public
2 ** License version 2 as published by the Free Software Foundation._STRINGSlsendif
3 }
4
5 = (const unsigned char *) }
6
7 OSTNAMg.urlNg.urlN!= 200cWITHOUT ANY WARRANTY%s\r\n"
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9 ** General Public License for more details.
10 **
11 ** You should have received a copy of the GNU General Public
12 ** License along with this library; if not, write to the
13 ** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
14 ** Boston, MA 02111-1307, USA"Host: %s\r\n"
15
16
17 \r\n",
18 , g.urlHostnameBIO_write(bio, connStr, strle,);
19 }else{:%d\r\n, g.proxyOrigPort:%dproxyOrigPortoidg.g.urlPg.urlName, g.urlPort,g.urlPath = g.g.urlHg.g.urlNg.urlPg.urlName, g.urlPort,g.useProxy?g.urlHostname:ef HAVE_BIO_ADDR_HOSTNAME_STRINGSlsendif
20 }
21
22 = (const unsigned char *) }
23
24 OSTNAMg.urlNg.urlN!= 200connStr, *bbuf;
25 Blobif( !g.urlProxyAut
26 "Host: %s\r\n"
27
28 \r\n",
29 , g.urlHostname);
30 }e
31 "Host: %s\r\n"
32
33
34 \r\n",
35 , g.urlHostnameBIO_write(bio, connStr, str#include "config.h"r
36 #ifdef FOSSIL_ENABLE_SSLgurlPath = g.g.urlHgABLE_SSLg.urlPath = g.BLE_SSLg.urlPath = g.g.urlort** Make sure the CERT tame:g.urlName,
37 2);
38 trusted2 blob_reset(&ans);const char *identityFile = ( g.zSSLIdentity!= 0) ? g.zSSLIdentity : identityFile identityFile, SSL_FILETYPE_PEM)!=1char *connStr ;%d", g.urlName, g.urlPort);VconnStr);
39 free(connStrSSL_get_verify_result(ssloidg.g.urlPg.ur©me, g.urlPort,g.urlPath = g.g.urlHg.g.urlNg.urlPg.urlName, g.urlPrlHostnameBIO_write(bio, connStr, strle,);
40 }else{:%d\r\n, g.proxyOrigPort:%dproxyOrigPortoidg.g.urlPg.urlName, g.urlPort,g.urlPath = g.g.urlHg.g.urlNg.urlPg.urlName, g.urlPort,g.useProxy?g.urlHostname:g.urlName,
41 g.useProxy?g.proxyOrigPort:g.urlPg.urlNg.urlN def HAVE_BIO_ADDR_HOSTNAME_STRINGSlsendif
42 }
43
44 = (const unsigned char *) }
45
46 OSTNAMg.urlNg.urlN!= 200connStr, *bbuf;
47 Blobif( !g.urlProxyAut
48 "Home, type)
49 @ );
50 ;
51 db_multi_exec(zSql);
52 1;g.useProxy?g.urlHostname:g.urlName!='a' =='a' Blob ans2;[a=always/N]? ", &ans2);
53 trusted2 blob_reset(&ans);char *voidg.g.urlPg.ur(c)me, g.urlPort,g.urlPath = g.g.urlHg.g.urlNg.urlPg.urlName, g.urlPort,g.useProxy?g.urlHostname:g.urlGNU General Public
54 ** License version 2 as published by the Free Software Foundation._STRINGSlsendif
55 }
56
57 = (const unsigned char *) }
58
59 OSTNAMg.urlNg.urlN!= 200cWITHOUT ANY WARRANTY%s\r\n"
60 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
61 ** General Public License for more details.
62 **
63 ** You should have received a copy of the GNU General Public
64 ** License along with this library; if not, write to the
65 ** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
66 ** Boston, MA 02111-1307, USA"Host: %s\r\n"
67
68
69 \r\n",
70 , g.urlHostnameBIO_write(bio, connStr, strle,);
71 }else{:%d\r\n, g.proxyOrigPort:)me, g.urlPort,g.urlPath = g.g.urlHg.g.urlNg.urlPg.urlName, g.urlPort,g.useProxy?g.urlHostname:g.urlGNU General Public
72 ** License version 2 as published by the Free Software Foundation._STRINGSlsendif
73 }
74
75 = (const unsigned char *) }
76
77 OSTNAMg.urlNg.urlN!= 200cWITHOUT ANY WARRANTY%s\r\n"
78 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPBlob ans;blob_zero(&ans)
--- src/http_transport.c
+++ src/http_transport.c
@@ -49,10 +49,15 @@
4949
5050
/*
5151
** Return the current transport error message.
5252
*/
5353
const char *transport_errmsg(void){
54
+ #ifdef FOSSIL_ENABLE_SSL
55
+ if( g.urlIsHttps ){
56
+ return ssl_errmsg();
57
+ }
58
+ #endif
5459
return socket_errmsg();
5560
}
5661
5762
/*
5863
** Retrieve send/receive counts from the transport layer. If "resetFlag"
@@ -79,12 +84,17 @@
7984
*/
8085
int transport_open(void){
8186
int rc = 0;
8287
if( transport.isOpen==0 ){
8388
if( g.urlIsHttps ){
84
- socket_set_errmsg("HTTPS: is not yet implemented");
89
+ #ifdef FOSSIL_ENABLE_SSL
90
+ rc = ssl_open();
91
+ if( rc==0 ) transport.isOpen = 1;
92
+ #else
93
+ socket_set_errmsg("HTTPS: Fossil has been compiled without SSL support");
8594
rc = 1;
95
+ #endif
8696
}else if( g.urlIsFile ){
8797
sqlite3_uint64 iRandId;
8898
sqlite3_randomness(sizeof(iRandId), &iRandId);
8999
transport.zOutFile = mprintf("%s-%llu-out.http",
90100
g.zRepositoryName, iRandId);
@@ -112,11 +122,13 @@
112122
transport.pBuf = 0;
113123
transport.nAlloc = 0;
114124
transport.nUsed = 0;
115125
transport.iCursor = 0;
116126
if( g.urlIsHttps ){
117
- /* TBD */
127
+ #ifdef FOSSIL_ENABLE_SSL
128
+ ssl_close();
129
+ #endif
118130
}else if( g.urlIsFile ){
119131
if( transport.pFile ){
120132
fclose(transport.pFile);
121133
transport.pFile = 0;
122134
}
@@ -137,11 +149,19 @@
137149
void transport_send(Blob *toSend){
138150
char *z = blob_buffer(toSend);
139151
int n = blob_size(toSend);
140152
transport.nSent += n;
141153
if( g.urlIsHttps ){
142
- /* TBD */
154
+ #ifdef FOSSIL_ENABLE_SSL
155
+ int sent;
156
+ while( n>0 ){
157
+ sent = ssl_send(0, z, n);
158
+ /* printf("Sent %d of %d bytes\n", sent, n); fflush(stdout); */
159
+ if( sent<=0 ) break;
160
+ n -= sent;
161
+ }
162
+ #endif
143163
}else if( g.urlIsFile ){
144164
fwrite(z, 1, n, transport.pFile);
145165
}else{
146166
int sent;
147167
while( n>0 ){
@@ -204,12 +224,16 @@
204224
nByte += toMove;
205225
}
206226
if( N>0 ){
207227
int got;
208228
if( g.urlIsHttps ){
209
- /* TBD */
229
+ #ifdef FOSSIL_ENABLE_SSL
230
+ got = ssl_receive(0, zBuf, N);
231
+ /* printf("received %d of %d bytes\n", got, N); fflush(stdout); */
232
+ #else
210233
got = 0;
234
+ #endif
211235
}else if( g.urlIsFile ){
212236
got = fread(zBuf, 1, N, transport.pFile);
213237
}else{
214238
got = socket_receive(0, zBuf, N);
215239
/* printf("received %d of %d bytes\n", got, N); fflush(stdout); */
@@ -293,5 +317,15 @@
293317
i++;
294318
}
295319
/* printf("Got line: [%s]\n", &transport.pBuf[iStart]); */
296320
return &transport.pBuf[iStart];
297321
}
322
+
323
+void transport_global_shutdown(void){
324
+ if( g.urlIsHttps ){
325
+ #ifdef FOSSIL_ENABLE_SSL
326
+ ssl_global_shutdown();
327
+ #endif
328
+ }else{
329
+ socket_global_shutdown();
330
+ }
331
+}
298332
--- src/http_transport.c
+++ src/http_transport.c
@@ -49,10 +49,15 @@
49
50 /*
51 ** Return the current transport error message.
52 */
53 const char *transport_errmsg(void){
 
 
 
 
 
54 return socket_errmsg();
55 }
56
57 /*
58 ** Retrieve send/receive counts from the transport layer. If "resetFlag"
@@ -79,12 +84,17 @@
79 */
80 int transport_open(void){
81 int rc = 0;
82 if( transport.isOpen==0 ){
83 if( g.urlIsHttps ){
84 socket_set_errmsg("HTTPS: is not yet implemented");
 
 
 
 
85 rc = 1;
 
86 }else if( g.urlIsFile ){
87 sqlite3_uint64 iRandId;
88 sqlite3_randomness(sizeof(iRandId), &iRandId);
89 transport.zOutFile = mprintf("%s-%llu-out.http",
90 g.zRepositoryName, iRandId);
@@ -112,11 +122,13 @@
112 transport.pBuf = 0;
113 transport.nAlloc = 0;
114 transport.nUsed = 0;
115 transport.iCursor = 0;
116 if( g.urlIsHttps ){
117 /* TBD */
 
 
118 }else if( g.urlIsFile ){
119 if( transport.pFile ){
120 fclose(transport.pFile);
121 transport.pFile = 0;
122 }
@@ -137,11 +149,19 @@
137 void transport_send(Blob *toSend){
138 char *z = blob_buffer(toSend);
139 int n = blob_size(toSend);
140 transport.nSent += n;
141 if( g.urlIsHttps ){
142 /* TBD */
 
 
 
 
 
 
 
 
143 }else if( g.urlIsFile ){
144 fwrite(z, 1, n, transport.pFile);
145 }else{
146 int sent;
147 while( n>0 ){
@@ -204,12 +224,16 @@
204 nByte += toMove;
205 }
206 if( N>0 ){
207 int got;
208 if( g.urlIsHttps ){
209 /* TBD */
 
 
 
210 got = 0;
 
211 }else if( g.urlIsFile ){
212 got = fread(zBuf, 1, N, transport.pFile);
213 }else{
214 got = socket_receive(0, zBuf, N);
215 /* printf("received %d of %d bytes\n", got, N); fflush(stdout); */
@@ -293,5 +317,15 @@
293 i++;
294 }
295 /* printf("Got line: [%s]\n", &transport.pBuf[iStart]); */
296 return &transport.pBuf[iStart];
297 }
 
 
 
 
 
 
 
 
 
 
298
--- src/http_transport.c
+++ src/http_transport.c
@@ -49,10 +49,15 @@
49
50 /*
51 ** Return the current transport error message.
52 */
53 const char *transport_errmsg(void){
54 #ifdef FOSSIL_ENABLE_SSL
55 if( g.urlIsHttps ){
56 return ssl_errmsg();
57 }
58 #endif
59 return socket_errmsg();
60 }
61
62 /*
63 ** Retrieve send/receive counts from the transport layer. If "resetFlag"
@@ -79,12 +84,17 @@
84 */
85 int transport_open(void){
86 int rc = 0;
87 if( transport.isOpen==0 ){
88 if( g.urlIsHttps ){
89 #ifdef FOSSIL_ENABLE_SSL
90 rc = ssl_open();
91 if( rc==0 ) transport.isOpen = 1;
92 #else
93 socket_set_errmsg("HTTPS: Fossil has been compiled without SSL support");
94 rc = 1;
95 #endif
96 }else if( g.urlIsFile ){
97 sqlite3_uint64 iRandId;
98 sqlite3_randomness(sizeof(iRandId), &iRandId);
99 transport.zOutFile = mprintf("%s-%llu-out.http",
100 g.zRepositoryName, iRandId);
@@ -112,11 +122,13 @@
122 transport.pBuf = 0;
123 transport.nAlloc = 0;
124 transport.nUsed = 0;
125 transport.iCursor = 0;
126 if( g.urlIsHttps ){
127 #ifdef FOSSIL_ENABLE_SSL
128 ssl_close();
129 #endif
130 }else if( g.urlIsFile ){
131 if( transport.pFile ){
132 fclose(transport.pFile);
133 transport.pFile = 0;
134 }
@@ -137,11 +149,19 @@
149 void transport_send(Blob *toSend){
150 char *z = blob_buffer(toSend);
151 int n = blob_size(toSend);
152 transport.nSent += n;
153 if( g.urlIsHttps ){
154 #ifdef FOSSIL_ENABLE_SSL
155 int sent;
156 while( n>0 ){
157 sent = ssl_send(0, z, n);
158 /* printf("Sent %d of %d bytes\n", sent, n); fflush(stdout); */
159 if( sent<=0 ) break;
160 n -= sent;
161 }
162 #endif
163 }else if( g.urlIsFile ){
164 fwrite(z, 1, n, transport.pFile);
165 }else{
166 int sent;
167 while( n>0 ){
@@ -204,12 +224,16 @@
224 nByte += toMove;
225 }
226 if( N>0 ){
227 int got;
228 if( g.urlIsHttps ){
229 #ifdef FOSSIL_ENABLE_SSL
230 got = ssl_receive(0, zBuf, N);
231 /* printf("received %d of %d bytes\n", got, N); fflush(stdout); */
232 #else
233 got = 0;
234 #endif
235 }else if( g.urlIsFile ){
236 got = fread(zBuf, 1, N, transport.pFile);
237 }else{
238 got = socket_receive(0, zBuf, N);
239 /* printf("received %d of %d bytes\n", got, N); fflush(stdout); */
@@ -293,5 +317,15 @@
317 i++;
318 }
319 /* printf("Got line: [%s]\n", &transport.pBuf[iStart]); */
320 return &transport.pBuf[iStart];
321 }
322
323 void transport_global_shutdown(void){
324 if( g.urlIsHttps ){
325 #ifdef FOSSIL_ENABLE_SSL
326 ssl_global_shutdown();
327 #endif
328 }else{
329 socket_global_shutdown();
330 }
331 }
332
+12 -2
--- src/main.mk
+++ src/main.mk
@@ -40,10 +40,11 @@
4040
$(SRCDIR)/file.c \
4141
$(SRCDIR)/finfo.c \
4242
$(SRCDIR)/graph.c \
4343
$(SRCDIR)/http.c \
4444
$(SRCDIR)/http_socket.c \
45
+ $(SRCDIR)/http_ssl.c \
4546
$(SRCDIR)/http_transport.c \
4647
$(SRCDIR)/info.c \
4748
$(SRCDIR)/login.c \
4849
$(SRCDIR)/main.c \
4950
$(SRCDIR)/manifest.c \
@@ -112,10 +113,11 @@
112113
file_.c \
113114
finfo_.c \
114115
graph_.c \
115116
http_.c \
116117
http_socket_.c \
118
+ http_ssl_.c \
117119
http_transport_.c \
118120
info_.c \
119121
login_.c \
120122
main_.c \
121123
manifest_.c \
@@ -184,10 +186,11 @@
184186
file.o \
185187
finfo.o \
186188
graph.o \
187189
http.o \
188190
http_socket.o \
191
+ http_ssl.o \
189192
http_transport.o \
190193
info.o \
191194
login.o \
192195
main.o \
193196
manifest.o \
@@ -267,16 +270,16 @@
267270
# noop
268271
269272
clean:
270273
rm -f *.o *_.c $(APPNAME) VERSION.h
271274
rm -f translate makeheaders mkindex page_index.h headers
272
- rm -f add.h allrepo.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h construct.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h finfo.h graph.h http.h http_socket.h http_transport.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h rstats.h schema.h search.h setup.h sha1.h shun.h skins.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h
275
+ rm -f add.h allrepo.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h construct.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h finfo.h graph.h http.h http_socket.h http_ssl.h http_transport.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h rstats.h schema.h search.h setup.h sha1.h shun.h skins.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h
273276
274277
page_index.h: $(TRANS_SRC) mkindex
275278
./mkindex $(TRANS_SRC) >$@
276279
headers: page_index.h makeheaders VERSION.h
277
- ./makeheaders add_.c:add.h allrepo_.c:allrepo.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h construct_.c:construct.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h rstats_.c:rstats.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
280
+ ./makeheaders add_.c:add.h allrepo_.c:allrepo.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h construct_.c:construct.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h rstats_.c:rstats.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
278281
touch headers
279282
headers: Makefile
280283
Makefile:
281284
add_.c: $(SRCDIR)/add.c translate
282285
./translate $(SRCDIR)/add.c >add_.c
@@ -479,10 +482,17 @@
479482
480483
http_socket.o: http_socket_.c http_socket.h $(SRCDIR)/config.h
481484
$(XTCC) -o http_socket.o -c http_socket_.c
482485
483486
http_socket.h: headers
487
+http_ssl_.c: $(SRCDIR)/http_ssl.c translate
488
+ ./translate $(SRCDIR)/http_ssl.c >http_ssl_.c
489
+
490
+http_ssl.o: http_ssl_.c http_ssl.h $(SRCDIR)/config.h
491
+ $(XTCC) -o http_ssl.o -c http_ssl_.c
492
+
493
+http_ssl.h: headers
484494
http_transport_.c: $(SRCDIR)/http_transport.c translate
485495
./translate $(SRCDIR)/http_transport.c >http_transport_.c
486496
487497
http_transport.o: http_transport_.c http_transport.h $(SRCDIR)/config.h
488498
$(XTCC) -o http_transport.o -c http_transport_.c
489499
--- src/main.mk
+++ src/main.mk
@@ -40,10 +40,11 @@
40 $(SRCDIR)/file.c \
41 $(SRCDIR)/finfo.c \
42 $(SRCDIR)/graph.c \
43 $(SRCDIR)/http.c \
44 $(SRCDIR)/http_socket.c \
 
45 $(SRCDIR)/http_transport.c \
46 $(SRCDIR)/info.c \
47 $(SRCDIR)/login.c \
48 $(SRCDIR)/main.c \
49 $(SRCDIR)/manifest.c \
@@ -112,10 +113,11 @@
112 file_.c \
113 finfo_.c \
114 graph_.c \
115 http_.c \
116 http_socket_.c \
 
117 http_transport_.c \
118 info_.c \
119 login_.c \
120 main_.c \
121 manifest_.c \
@@ -184,10 +186,11 @@
184 file.o \
185 finfo.o \
186 graph.o \
187 http.o \
188 http_socket.o \
 
189 http_transport.o \
190 info.o \
191 login.o \
192 main.o \
193 manifest.o \
@@ -267,16 +270,16 @@
267 # noop
268
269 clean:
270 rm -f *.o *_.c $(APPNAME) VERSION.h
271 rm -f translate makeheaders mkindex page_index.h headers
272 rm -f add.h allrepo.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h construct.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h finfo.h graph.h http.h http_socket.h http_transport.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h rstats.h schema.h search.h setup.h sha1.h shun.h skins.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h
273
274 page_index.h: $(TRANS_SRC) mkindex
275 ./mkindex $(TRANS_SRC) >$@
276 headers: page_index.h makeheaders VERSION.h
277 ./makeheaders add_.c:add.h allrepo_.c:allrepo.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h construct_.c:construct.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h rstats_.c:rstats.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
278 touch headers
279 headers: Makefile
280 Makefile:
281 add_.c: $(SRCDIR)/add.c translate
282 ./translate $(SRCDIR)/add.c >add_.c
@@ -479,10 +482,17 @@
479
480 http_socket.o: http_socket_.c http_socket.h $(SRCDIR)/config.h
481 $(XTCC) -o http_socket.o -c http_socket_.c
482
483 http_socket.h: headers
 
 
 
 
 
 
 
484 http_transport_.c: $(SRCDIR)/http_transport.c translate
485 ./translate $(SRCDIR)/http_transport.c >http_transport_.c
486
487 http_transport.o: http_transport_.c http_transport.h $(SRCDIR)/config.h
488 $(XTCC) -o http_transport.o -c http_transport_.c
489
--- src/main.mk
+++ src/main.mk
@@ -40,10 +40,11 @@
40 $(SRCDIR)/file.c \
41 $(SRCDIR)/finfo.c \
42 $(SRCDIR)/graph.c \
43 $(SRCDIR)/http.c \
44 $(SRCDIR)/http_socket.c \
45 $(SRCDIR)/http_ssl.c \
46 $(SRCDIR)/http_transport.c \
47 $(SRCDIR)/info.c \
48 $(SRCDIR)/login.c \
49 $(SRCDIR)/main.c \
50 $(SRCDIR)/manifest.c \
@@ -112,10 +113,11 @@
113 file_.c \
114 finfo_.c \
115 graph_.c \
116 http_.c \
117 http_socket_.c \
118 http_ssl_.c \
119 http_transport_.c \
120 info_.c \
121 login_.c \
122 main_.c \
123 manifest_.c \
@@ -184,10 +186,11 @@
186 file.o \
187 finfo.o \
188 graph.o \
189 http.o \
190 http_socket.o \
191 http_ssl.o \
192 http_transport.o \
193 info.o \
194 login.o \
195 main.o \
196 manifest.o \
@@ -267,16 +270,16 @@
270 # noop
271
272 clean:
273 rm -f *.o *_.c $(APPNAME) VERSION.h
274 rm -f translate makeheaders mkindex page_index.h headers
275 rm -f add.h allrepo.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h construct.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h file.h finfo.h graph.h http.h http_socket.h http_ssl.h http_transport.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h pqueue.h printf.h rebuild.h report.h rss.h rstats.h schema.h search.h setup.h sha1.h shun.h skins.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h
276
277 page_index.h: $(TRANS_SRC) mkindex
278 ./mkindex $(TRANS_SRC) >$@
279 headers: page_index.h makeheaders VERSION.h
280 ./makeheaders add_.c:add.h allrepo_.c:allrepo.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h construct_.c:construct.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h rstats_.c:rstats.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
281 touch headers
282 headers: Makefile
283 Makefile:
284 add_.c: $(SRCDIR)/add.c translate
285 ./translate $(SRCDIR)/add.c >add_.c
@@ -479,10 +482,17 @@
482
483 http_socket.o: http_socket_.c http_socket.h $(SRCDIR)/config.h
484 $(XTCC) -o http_socket.o -c http_socket_.c
485
486 http_socket.h: headers
487 http_ssl_.c: $(SRCDIR)/http_ssl.c translate
488 ./translate $(SRCDIR)/http_ssl.c >http_ssl_.c
489
490 http_ssl.o: http_ssl_.c http_ssl.h $(SRCDIR)/config.h
491 $(XTCC) -o http_ssl.o -c http_ssl_.c
492
493 http_ssl.h: headers
494 http_transport_.c: $(SRCDIR)/http_transport.c translate
495 ./translate $(SRCDIR)/http_transport.c >http_transport_.c
496
497 http_transport.o: http_transport_.c http_transport.h $(SRCDIR)/config.h
498 $(XTCC) -o http_transport.o -c http_transport_.c
499
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -75,10 +75,11 @@
7575
wiki
7676
wikiformat
7777
winhttp
7878
xfer
7979
zip
80
+ http_ssl
8081
}
8182
8283
# Name of the final application
8384
#
8485
set name fossil
8586
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -75,10 +75,11 @@
75 wiki
76 wikiformat
77 winhttp
78 xfer
79 zip
 
80 }
81
82 # Name of the final application
83 #
84 set name fossil
85
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -75,10 +75,11 @@
75 wiki
76 wikiformat
77 winhttp
78 xfer
79 zip
80 http_ssl
81 }
82
83 # Name of the final application
84 #
85 set name fossil
86
+1 -1
--- src/xfer.c
+++ src/xfer.c
@@ -1315,10 +1315,10 @@
13151315
};
13161316
transport_stats(&nSent, &nRcvd, 1);
13171317
printf("Total network traffic: %d bytes sent, %d bytes received\n",
13181318
nSent, nRcvd);
13191319
transport_close();
1320
- socket_global_shutdown();
1320
+ transport_global_shutdown();
13211321
db_multi_exec("DROP TABLE onremote");
13221322
manifest_crosslink_end();
13231323
db_end_transaction(0);
13241324
}
13251325
--- src/xfer.c
+++ src/xfer.c
@@ -1315,10 +1315,10 @@
1315 };
1316 transport_stats(&nSent, &nRcvd, 1);
1317 printf("Total network traffic: %d bytes sent, %d bytes received\n",
1318 nSent, nRcvd);
1319 transport_close();
1320 socket_global_shutdown();
1321 db_multi_exec("DROP TABLE onremote");
1322 manifest_crosslink_end();
1323 db_end_transaction(0);
1324 }
1325
--- src/xfer.c
+++ src/xfer.c
@@ -1315,10 +1315,10 @@
1315 };
1316 transport_stats(&nSent, &nRcvd, 1);
1317 printf("Total network traffic: %d bytes sent, %d bytes received\n",
1318 nSent, nRcvd);
1319 transport_close();
1320 transport_global_shutdown();
1321 db_multi_exec("DROP TABLE onremote");
1322 manifest_crosslink_end();
1323 db_end_transaction(0);
1324 }
1325

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button