Fossil SCM
Add SSL support.
Commit
16f6fd904a0c88f7e1312704ee84675899181ee1
Parent
bd2fa6aa2b5ca05…
7 files changed
+14
-1
+13
+66
+38
-4
+12
-2
+1
+1
-1
M
Makefile
+14
-1
| --- Makefile | ||
| +++ Makefile | ||
| @@ -15,10 +15,14 @@ | ||
| 15 | 15 | |
| 16 | 16 | #### The suffix to add to executable files. ".exe" for windows. |
| 17 | 17 | # Nothing for unix. |
| 18 | 18 | # |
| 19 | 19 | E = |
| 20 | + | |
| 21 | +#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto) | |
| 22 | +# | |
| 23 | +# FOSSIL_ENABLE_SSL=1 | |
| 20 | 24 | |
| 21 | 25 | #### C Compile and options for use in building executables that |
| 22 | 26 | # will run on the target platform. This is usually the same |
| 23 | 27 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 24 | 28 | # the finished binary for fossil. The BCC compiler above is used |
| @@ -25,10 +29,15 @@ | ||
| 25 | 29 | # for building intermediate code-generator tools. |
| 26 | 30 | # |
| 27 | 31 | #TCC = gcc -O6 |
| 28 | 32 | #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage |
| 29 | 33 | TCC = gcc -g -Os -Wall |
| 34 | + | |
| 35 | +# With HTTPS support | |
| 36 | +ifdef FOSSIL_ENABLE_SSL | |
| 37 | +TCC += -DFOSSIL_ENABLE_SSL=1 | |
| 38 | +endif | |
| 30 | 39 | |
| 31 | 40 | #### Extra arguments for linking the finished binary. Fossil needs |
| 32 | 41 | # to link against the Z-Lib compression library. There are no |
| 33 | 42 | # other dependencies. We sometimes add the -static option here |
| 34 | 43 | # so that we can build a static executable that will run in a |
| @@ -38,14 +47,18 @@ | ||
| 38 | 47 | # If you're on OpenSolaris: |
| 39 | 48 | # LIB += lsocket |
| 40 | 49 | # Solaris 10 needs: |
| 41 | 50 | # LIB += -lsocket -lnsl |
| 42 | 51 | # 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 | |
| 44 | 57 | |
| 45 | 58 | #### Tcl shell for use in running the fossil testsuite. |
| 46 | 59 | # |
| 47 | 60 | TCLSH = tclsh |
| 48 | 61 | |
| 49 | 62 | # You should not need to change anything below this line |
| 50 | 63 | ############################################################################### |
| 51 | 64 | include $(SRCDIR)/main.mk |
| 52 | 65 |
| --- 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,14 +47,18 @@ | |
| 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 | # You should not need to change anything below this line |
| 50 | ############################################################################### |
| 51 | include $(SRCDIR)/main.mk |
| 52 |
| --- 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,14 +47,18 @@ | |
| 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 | # You should not need to change anything below this line |
| 63 | ############################################################################### |
| 64 | include $(SRCDIR)/main.mk |
| 65 |
+13
| --- Makefile.w32 | ||
| +++ Makefile.w32 | ||
| @@ -15,10 +15,14 @@ | ||
| 15 | 15 | |
| 16 | 16 | #### The suffix to add to executable files. ".exe" for windows. |
| 17 | 17 | # Nothing for unix. |
| 18 | 18 | # |
| 19 | 19 | E = .exe |
| 20 | + | |
| 21 | +#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto) | |
| 22 | +# | |
| 23 | +# FOSSIL_ENABLE_SSL=1 | |
| 20 | 24 | |
| 21 | 25 | #### C Compile and options for use in building executables that |
| 22 | 26 | # will run on the target platform. This is usually the same |
| 23 | 27 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 24 | 28 | # the finished binary for fossil. The BCC compiler above is used |
| @@ -27,10 +31,15 @@ | ||
| 27 | 31 | #TCC = gcc -O6 |
| 28 | 32 | #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage |
| 29 | 33 | #TCC = gcc -g -Os -Wall |
| 30 | 34 | #TCC = gcc -g -Os -Wall -DFOSSIL_I18N=0 -L/usr/local/lib -I/usr/local/include |
| 31 | 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 | |
| 32 | 41 | |
| 33 | 42 | #### Extra arguments for linking the finished binary. Fossil needs |
| 34 | 43 | # to link against the Z-Lib compression library. There are no |
| 35 | 44 | # other dependencies. We sometimes add the -static option here |
| 36 | 45 | # so that we can build a static executable that will run in a |
| @@ -37,13 +46,17 @@ | ||
| 37 | 46 | # chroot jail. |
| 38 | 47 | # |
| 39 | 48 | #LIB = -lz |
| 40 | 49 | #LIB = -lz -lws2_32 |
| 41 | 50 | LIB = -lmingwex -lz -lws2_32 |
| 51 | +# OpenSSL: | |
| 52 | +ifdef FOSSIL_ENABLE_SSL | |
| 53 | +LIB += -lcrypto -lssl | |
| 54 | +endif | |
| 42 | 55 | |
| 43 | 56 | #### Tcl shell for use in running the fossil testsuite. |
| 44 | 57 | # |
| 45 | 58 | TCLSH = tclsh |
| 46 | 59 | |
| 47 | 60 | # You should not need to change anything below this line |
| 48 | 61 | ############################################################################### |
| 49 | 62 | include $(SRCDIR)/main.mk |
| 50 | 63 | |
| 51 | 64 | 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,13 +46,17 @@ | |
| 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 | # You should not need to change anything below this line |
| 48 | ############################################################################### |
| 49 | include $(SRCDIR)/main.mk |
| 50 | |
| 51 | 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,13 +46,17 @@ | |
| 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 | # You should not need to change anything below this line |
| 61 | ############################################################################### |
| 62 | include $(SRCDIR)/main.mk |
| 63 | |
| 64 | DDED src/http_ssl.c |
+66
| --- a/src/http_ssl.c | ||
| +++ b/src/http_ssl.c | ||
| @@ -0,0 +1,66 @@ | ||
| 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, != 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 == prompt | |
| 66 | +) |
| --- a/src/http_ssl.c | |
| +++ b/src/http_ssl.c | |
| @@ -0,0 +1,66 @@ | |
| --- a/src/http_ssl.c | |
| +++ b/src/http_ssl.c | |
| @@ -0,0 +1,66 @@ | |
| 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, != 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 == prompt |
| 66 | ) |
+38
-4
| --- src/http_transport.c | ||
| +++ src/http_transport.c | ||
| @@ -49,10 +49,15 @@ | ||
| 49 | 49 | |
| 50 | 50 | /* |
| 51 | 51 | ** Return the current transport error message. |
| 52 | 52 | */ |
| 53 | 53 | const char *transport_errmsg(void){ |
| 54 | + #ifdef FOSSIL_ENABLE_SSL | |
| 55 | + if( g.urlIsHttps ){ | |
| 56 | + return ssl_errmsg(); | |
| 57 | + } | |
| 58 | + #endif | |
| 54 | 59 | return socket_errmsg(); |
| 55 | 60 | } |
| 56 | 61 | |
| 57 | 62 | /* |
| 58 | 63 | ** Retrieve send/receive counts from the transport layer. If "resetFlag" |
| @@ -79,12 +84,17 @@ | ||
| 79 | 84 | */ |
| 80 | 85 | int transport_open(void){ |
| 81 | 86 | int rc = 0; |
| 82 | 87 | if( transport.isOpen==0 ){ |
| 83 | 88 | 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"); | |
| 85 | 94 | rc = 1; |
| 95 | + #endif | |
| 86 | 96 | }else if( g.urlIsFile ){ |
| 87 | 97 | sqlite3_uint64 iRandId; |
| 88 | 98 | sqlite3_randomness(sizeof(iRandId), &iRandId); |
| 89 | 99 | transport.zOutFile = mprintf("%s-%llu-out.http", |
| 90 | 100 | g.zRepositoryName, iRandId); |
| @@ -112,11 +122,13 @@ | ||
| 112 | 122 | transport.pBuf = 0; |
| 113 | 123 | transport.nAlloc = 0; |
| 114 | 124 | transport.nUsed = 0; |
| 115 | 125 | transport.iCursor = 0; |
| 116 | 126 | if( g.urlIsHttps ){ |
| 117 | - /* TBD */ | |
| 127 | + #ifdef FOSSIL_ENABLE_SSL | |
| 128 | + ssl_close(); | |
| 129 | + #endif | |
| 118 | 130 | }else if( g.urlIsFile ){ |
| 119 | 131 | if( transport.pFile ){ |
| 120 | 132 | fclose(transport.pFile); |
| 121 | 133 | transport.pFile = 0; |
| 122 | 134 | } |
| @@ -137,11 +149,19 @@ | ||
| 137 | 149 | void transport_send(Blob *toSend){ |
| 138 | 150 | char *z = blob_buffer(toSend); |
| 139 | 151 | int n = blob_size(toSend); |
| 140 | 152 | transport.nSent += n; |
| 141 | 153 | 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 | |
| 143 | 163 | }else if( g.urlIsFile ){ |
| 144 | 164 | fwrite(z, 1, n, transport.pFile); |
| 145 | 165 | }else{ |
| 146 | 166 | int sent; |
| 147 | 167 | while( n>0 ){ |
| @@ -204,12 +224,16 @@ | ||
| 204 | 224 | nByte += toMove; |
| 205 | 225 | } |
| 206 | 226 | if( N>0 ){ |
| 207 | 227 | int got; |
| 208 | 228 | 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 | |
| 210 | 233 | got = 0; |
| 234 | + #endif | |
| 211 | 235 | }else if( g.urlIsFile ){ |
| 212 | 236 | got = fread(zBuf, 1, N, transport.pFile); |
| 213 | 237 | }else{ |
| 214 | 238 | got = socket_receive(0, zBuf, N); |
| 215 | 239 | /* printf("received %d of %d bytes\n", got, N); fflush(stdout); */ |
| @@ -293,5 +317,15 @@ | ||
| 293 | 317 | i++; |
| 294 | 318 | } |
| 295 | 319 | /* printf("Got line: [%s]\n", &transport.pBuf[iStart]); */ |
| 296 | 320 | return &transport.pBuf[iStart]; |
| 297 | 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 | +} | |
| 298 | 332 |
| --- 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 | ||
| @@ -39,10 +39,11 @@ | ||
| 39 | 39 | $(SRCDIR)/encode.c \ |
| 40 | 40 | $(SRCDIR)/file.c \ |
| 41 | 41 | $(SRCDIR)/finfo.c \ |
| 42 | 42 | $(SRCDIR)/http.c \ |
| 43 | 43 | $(SRCDIR)/http_socket.c \ |
| 44 | + $(SRCDIR)/http_ssl.c \ | |
| 44 | 45 | $(SRCDIR)/http_transport.c \ |
| 45 | 46 | $(SRCDIR)/info.c \ |
| 46 | 47 | $(SRCDIR)/login.c \ |
| 47 | 48 | $(SRCDIR)/main.c \ |
| 48 | 49 | $(SRCDIR)/manifest.c \ |
| @@ -109,10 +110,11 @@ | ||
| 109 | 110 | encode_.c \ |
| 110 | 111 | file_.c \ |
| 111 | 112 | finfo_.c \ |
| 112 | 113 | http_.c \ |
| 113 | 114 | http_socket_.c \ |
| 115 | + http_ssl_.c \ | |
| 114 | 116 | http_transport_.c \ |
| 115 | 117 | info_.c \ |
| 116 | 118 | login_.c \ |
| 117 | 119 | main_.c \ |
| 118 | 120 | manifest_.c \ |
| @@ -179,10 +181,11 @@ | ||
| 179 | 181 | encode.o \ |
| 180 | 182 | file.o \ |
| 181 | 183 | finfo.o \ |
| 182 | 184 | http.o \ |
| 183 | 185 | http_socket.o \ |
| 186 | + http_ssl.o \ | |
| 184 | 187 | http_transport.o \ |
| 185 | 188 | info.o \ |
| 186 | 189 | login.o \ |
| 187 | 190 | main.o \ |
| 188 | 191 | manifest.o \ |
| @@ -261,16 +264,16 @@ | ||
| 261 | 264 | # noop |
| 262 | 265 | |
| 263 | 266 | clean: |
| 264 | 267 | rm -f *.o *_.c $(APPNAME) VERSION.h |
| 265 | 268 | rm -f translate makeheaders mkindex page_index.h headers |
| 266 | - 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 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 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 | |
| 269 | + 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 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 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 | |
| 267 | 270 | |
| 268 | 271 | page_index.h: $(TRANS_SRC) mkindex |
| 269 | 272 | ./mkindex $(TRANS_SRC) >$@ |
| 270 | 273 | headers: page_index.h makeheaders VERSION.h |
| 271 | - ./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 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 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 | |
| 274 | + ./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 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 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 | |
| 272 | 275 | touch headers |
| 273 | 276 | headers: Makefile |
| 274 | 277 | Makefile: |
| 275 | 278 | add_.c: $(SRCDIR)/add.c translate |
| 276 | 279 | ./translate $(SRCDIR)/add.c >add_.c |
| @@ -466,10 +469,17 @@ | ||
| 466 | 469 | |
| 467 | 470 | http_socket.o: http_socket_.c http_socket.h $(SRCDIR)/config.h |
| 468 | 471 | $(XTCC) -o http_socket.o -c http_socket_.c |
| 469 | 472 | |
| 470 | 473 | http_socket.h: headers |
| 474 | +http_ssl_.c: $(SRCDIR)/http_ssl.c translate | |
| 475 | + ./translate $(SRCDIR)/http_ssl.c >http_ssl_.c | |
| 476 | + | |
| 477 | +http_ssl.o: http_ssl_.c http_ssl.h $(SRCDIR)/config.h | |
| 478 | + $(XTCC) -o http_ssl.o -c http_ssl_.c | |
| 479 | + | |
| 480 | +http_ssl.h: headers | |
| 471 | 481 | http_transport_.c: $(SRCDIR)/http_transport.c translate |
| 472 | 482 | ./translate $(SRCDIR)/http_transport.c >http_transport_.c |
| 473 | 483 | |
| 474 | 484 | http_transport.o: http_transport_.c http_transport.h $(SRCDIR)/config.h |
| 475 | 485 | $(XTCC) -o http_transport.o -c http_transport_.c |
| 476 | 486 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -39,10 +39,11 @@ | |
| 39 | $(SRCDIR)/encode.c \ |
| 40 | $(SRCDIR)/file.c \ |
| 41 | $(SRCDIR)/finfo.c \ |
| 42 | $(SRCDIR)/http.c \ |
| 43 | $(SRCDIR)/http_socket.c \ |
| 44 | $(SRCDIR)/http_transport.c \ |
| 45 | $(SRCDIR)/info.c \ |
| 46 | $(SRCDIR)/login.c \ |
| 47 | $(SRCDIR)/main.c \ |
| 48 | $(SRCDIR)/manifest.c \ |
| @@ -109,10 +110,11 @@ | |
| 109 | encode_.c \ |
| 110 | file_.c \ |
| 111 | finfo_.c \ |
| 112 | http_.c \ |
| 113 | http_socket_.c \ |
| 114 | http_transport_.c \ |
| 115 | info_.c \ |
| 116 | login_.c \ |
| 117 | main_.c \ |
| 118 | manifest_.c \ |
| @@ -179,10 +181,11 @@ | |
| 179 | encode.o \ |
| 180 | file.o \ |
| 181 | finfo.o \ |
| 182 | http.o \ |
| 183 | http_socket.o \ |
| 184 | http_transport.o \ |
| 185 | info.o \ |
| 186 | login.o \ |
| 187 | main.o \ |
| 188 | manifest.o \ |
| @@ -261,16 +264,16 @@ | |
| 261 | # noop |
| 262 | |
| 263 | clean: |
| 264 | rm -f *.o *_.c $(APPNAME) VERSION.h |
| 265 | rm -f translate makeheaders mkindex page_index.h headers |
| 266 | 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 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 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 |
| 267 | |
| 268 | page_index.h: $(TRANS_SRC) mkindex |
| 269 | ./mkindex $(TRANS_SRC) >$@ |
| 270 | headers: page_index.h makeheaders VERSION.h |
| 271 | ./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 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 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 |
| 272 | touch headers |
| 273 | headers: Makefile |
| 274 | Makefile: |
| 275 | add_.c: $(SRCDIR)/add.c translate |
| 276 | ./translate $(SRCDIR)/add.c >add_.c |
| @@ -466,10 +469,17 @@ | |
| 466 | |
| 467 | http_socket.o: http_socket_.c http_socket.h $(SRCDIR)/config.h |
| 468 | $(XTCC) -o http_socket.o -c http_socket_.c |
| 469 | |
| 470 | http_socket.h: headers |
| 471 | http_transport_.c: $(SRCDIR)/http_transport.c translate |
| 472 | ./translate $(SRCDIR)/http_transport.c >http_transport_.c |
| 473 | |
| 474 | http_transport.o: http_transport_.c http_transport.h $(SRCDIR)/config.h |
| 475 | $(XTCC) -o http_transport.o -c http_transport_.c |
| 476 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -39,10 +39,11 @@ | |
| 39 | $(SRCDIR)/encode.c \ |
| 40 | $(SRCDIR)/file.c \ |
| 41 | $(SRCDIR)/finfo.c \ |
| 42 | $(SRCDIR)/http.c \ |
| 43 | $(SRCDIR)/http_socket.c \ |
| 44 | $(SRCDIR)/http_ssl.c \ |
| 45 | $(SRCDIR)/http_transport.c \ |
| 46 | $(SRCDIR)/info.c \ |
| 47 | $(SRCDIR)/login.c \ |
| 48 | $(SRCDIR)/main.c \ |
| 49 | $(SRCDIR)/manifest.c \ |
| @@ -109,10 +110,11 @@ | |
| 110 | encode_.c \ |
| 111 | file_.c \ |
| 112 | finfo_.c \ |
| 113 | http_.c \ |
| 114 | http_socket_.c \ |
| 115 | http_ssl_.c \ |
| 116 | http_transport_.c \ |
| 117 | info_.c \ |
| 118 | login_.c \ |
| 119 | main_.c \ |
| 120 | manifest_.c \ |
| @@ -179,10 +181,11 @@ | |
| 181 | encode.o \ |
| 182 | file.o \ |
| 183 | finfo.o \ |
| 184 | http.o \ |
| 185 | http_socket.o \ |
| 186 | http_ssl.o \ |
| 187 | http_transport.o \ |
| 188 | info.o \ |
| 189 | login.o \ |
| 190 | main.o \ |
| 191 | manifest.o \ |
| @@ -261,16 +264,16 @@ | |
| 264 | # noop |
| 265 | |
| 266 | clean: |
| 267 | rm -f *.o *_.c $(APPNAME) VERSION.h |
| 268 | rm -f translate makeheaders mkindex page_index.h headers |
| 269 | 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 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 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 |
| 270 | |
| 271 | page_index.h: $(TRANS_SRC) mkindex |
| 272 | ./mkindex $(TRANS_SRC) >$@ |
| 273 | headers: page_index.h makeheaders VERSION.h |
| 274 | ./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 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 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 |
| 275 | touch headers |
| 276 | headers: Makefile |
| 277 | Makefile: |
| 278 | add_.c: $(SRCDIR)/add.c translate |
| 279 | ./translate $(SRCDIR)/add.c >add_.c |
| @@ -466,10 +469,17 @@ | |
| 469 | |
| 470 | http_socket.o: http_socket_.c http_socket.h $(SRCDIR)/config.h |
| 471 | $(XTCC) -o http_socket.o -c http_socket_.c |
| 472 | |
| 473 | http_socket.h: headers |
| 474 | http_ssl_.c: $(SRCDIR)/http_ssl.c translate |
| 475 | ./translate $(SRCDIR)/http_ssl.c >http_ssl_.c |
| 476 | |
| 477 | http_ssl.o: http_ssl_.c http_ssl.h $(SRCDIR)/config.h |
| 478 | $(XTCC) -o http_ssl.o -c http_ssl_.c |
| 479 | |
| 480 | http_ssl.h: headers |
| 481 | http_transport_.c: $(SRCDIR)/http_transport.c translate |
| 482 | ./translate $(SRCDIR)/http_transport.c >http_transport_.c |
| 483 | |
| 484 | http_transport.o: http_transport_.c http_transport.h $(SRCDIR)/config.h |
| 485 | $(XTCC) -o http_transport.o -c http_transport_.c |
| 486 |
+1
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -73,10 +73,11 @@ | ||
| 73 | 73 | wiki |
| 74 | 74 | wikiformat |
| 75 | 75 | winhttp |
| 76 | 76 | xfer |
| 77 | 77 | zip |
| 78 | + http_ssl | |
| 78 | 79 | } |
| 79 | 80 | |
| 80 | 81 | # Name of the final application |
| 81 | 82 | # |
| 82 | 83 | set name fossil |
| 83 | 84 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -73,10 +73,11 @@ | |
| 73 | wiki |
| 74 | wikiformat |
| 75 | winhttp |
| 76 | xfer |
| 77 | zip |
| 78 | } |
| 79 | |
| 80 | # Name of the final application |
| 81 | # |
| 82 | set name fossil |
| 83 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -73,10 +73,11 @@ | |
| 73 | wiki |
| 74 | wikiformat |
| 75 | winhttp |
| 76 | xfer |
| 77 | zip |
| 78 | http_ssl |
| 79 | } |
| 80 | |
| 81 | # Name of the final application |
| 82 | # |
| 83 | set name fossil |
| 84 |
+1
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -1270,10 +1270,10 @@ | ||
| 1270 | 1270 | }; |
| 1271 | 1271 | transport_stats(&nSent, &nRcvd, 1); |
| 1272 | 1272 | printf("Total network traffic: %d bytes sent, %d bytes received\n", |
| 1273 | 1273 | nSent, nRcvd); |
| 1274 | 1274 | transport_close(); |
| 1275 | - socket_global_shutdown(); | |
| 1275 | + transport_global_shutdown(); | |
| 1276 | 1276 | db_multi_exec("DROP TABLE onremote"); |
| 1277 | 1277 | manifest_crosslink_end(); |
| 1278 | 1278 | db_end_transaction(0); |
| 1279 | 1279 | } |
| 1280 | 1280 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1270,10 +1270,10 @@ | |
| 1270 | }; |
| 1271 | transport_stats(&nSent, &nRcvd, 1); |
| 1272 | printf("Total network traffic: %d bytes sent, %d bytes received\n", |
| 1273 | nSent, nRcvd); |
| 1274 | transport_close(); |
| 1275 | socket_global_shutdown(); |
| 1276 | db_multi_exec("DROP TABLE onremote"); |
| 1277 | manifest_crosslink_end(); |
| 1278 | db_end_transaction(0); |
| 1279 | } |
| 1280 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1270,10 +1270,10 @@ | |
| 1270 | }; |
| 1271 | transport_stats(&nSent, &nRcvd, 1); |
| 1272 | printf("Total network traffic: %d bytes sent, %d bytes received\n", |
| 1273 | nSent, nRcvd); |
| 1274 | transport_close(); |
| 1275 | transport_global_shutdown(); |
| 1276 | db_multi_exec("DROP TABLE onremote"); |
| 1277 | manifest_crosslink_end(); |
| 1278 | db_end_transaction(0); |
| 1279 | } |
| 1280 |