Fossil SCM
Merge the SSL branch into the trunk.
Commit
b05cb4a0e15d0712e080235ac3bcdbcdf472afbe
Parent
0faa676fab1cf3c…
7 files changed
+14
-1
+13
+78
+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,11 +47,15 @@ | ||
| 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 |
| --- 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 @@ | ||
| 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,10 +46,14 @@ | ||
| 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 | |
| 48 | 61 | 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 |
+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) |
| --- 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) |
+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 | ||
| @@ -40,10 +40,11 @@ | ||
| 40 | 40 | $(SRCDIR)/file.c \ |
| 41 | 41 | $(SRCDIR)/finfo.c \ |
| 42 | 42 | $(SRCDIR)/graph.c \ |
| 43 | 43 | $(SRCDIR)/http.c \ |
| 44 | 44 | $(SRCDIR)/http_socket.c \ |
| 45 | + $(SRCDIR)/http_ssl.c \ | |
| 45 | 46 | $(SRCDIR)/http_transport.c \ |
| 46 | 47 | $(SRCDIR)/info.c \ |
| 47 | 48 | $(SRCDIR)/login.c \ |
| 48 | 49 | $(SRCDIR)/main.c \ |
| 49 | 50 | $(SRCDIR)/manifest.c \ |
| @@ -112,10 +113,11 @@ | ||
| 112 | 113 | file_.c \ |
| 113 | 114 | finfo_.c \ |
| 114 | 115 | graph_.c \ |
| 115 | 116 | http_.c \ |
| 116 | 117 | http_socket_.c \ |
| 118 | + http_ssl_.c \ | |
| 117 | 119 | http_transport_.c \ |
| 118 | 120 | info_.c \ |
| 119 | 121 | login_.c \ |
| 120 | 122 | main_.c \ |
| 121 | 123 | manifest_.c \ |
| @@ -184,10 +186,11 @@ | ||
| 184 | 186 | file.o \ |
| 185 | 187 | finfo.o \ |
| 186 | 188 | graph.o \ |
| 187 | 189 | http.o \ |
| 188 | 190 | http_socket.o \ |
| 191 | + http_ssl.o \ | |
| 189 | 192 | http_transport.o \ |
| 190 | 193 | info.o \ |
| 191 | 194 | login.o \ |
| 192 | 195 | main.o \ |
| 193 | 196 | manifest.o \ |
| @@ -267,16 +270,16 @@ | ||
| 267 | 270 | # noop |
| 268 | 271 | |
| 269 | 272 | clean: |
| 270 | 273 | rm -f *.o *_.c $(APPNAME) VERSION.h |
| 271 | 274 | 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 | |
| 273 | 276 | |
| 274 | 277 | page_index.h: $(TRANS_SRC) mkindex |
| 275 | 278 | ./mkindex $(TRANS_SRC) >$@ |
| 276 | 279 | 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 | |
| 278 | 281 | touch headers |
| 279 | 282 | headers: Makefile |
| 280 | 283 | Makefile: |
| 281 | 284 | add_.c: $(SRCDIR)/add.c translate |
| 282 | 285 | ./translate $(SRCDIR)/add.c >add_.c |
| @@ -479,10 +482,17 @@ | ||
| 479 | 482 | |
| 480 | 483 | http_socket.o: http_socket_.c http_socket.h $(SRCDIR)/config.h |
| 481 | 484 | $(XTCC) -o http_socket.o -c http_socket_.c |
| 482 | 485 | |
| 483 | 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 | |
| 484 | 494 | http_transport_.c: $(SRCDIR)/http_transport.c translate |
| 485 | 495 | ./translate $(SRCDIR)/http_transport.c >http_transport_.c |
| 486 | 496 | |
| 487 | 497 | http_transport.o: http_transport_.c http_transport.h $(SRCDIR)/config.h |
| 488 | 498 | $(XTCC) -o http_transport.o -c http_transport_.c |
| 489 | 499 |
| --- 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 |
+1
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -75,10 +75,11 @@ | ||
| 75 | 75 | wiki |
| 76 | 76 | wikiformat |
| 77 | 77 | winhttp |
| 78 | 78 | xfer |
| 79 | 79 | zip |
| 80 | + http_ssl | |
| 80 | 81 | } |
| 81 | 82 | |
| 82 | 83 | # Name of the final application |
| 83 | 84 | # |
| 84 | 85 | set name fossil |
| 85 | 86 |
| --- 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 @@ | ||
| 1315 | 1315 | }; |
| 1316 | 1316 | transport_stats(&nSent, &nRcvd, 1); |
| 1317 | 1317 | printf("Total network traffic: %d bytes sent, %d bytes received\n", |
| 1318 | 1318 | nSent, nRcvd); |
| 1319 | 1319 | transport_close(); |
| 1320 | - socket_global_shutdown(); | |
| 1320 | + transport_global_shutdown(); | |
| 1321 | 1321 | db_multi_exec("DROP TABLE onremote"); |
| 1322 | 1322 | manifest_crosslink_end(); |
| 1323 | 1323 | db_end_transaction(0); |
| 1324 | 1324 | } |
| 1325 | 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 | 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 |