Fossil SCM
Make "fossil version -v" report the right openssl version, even when it was linked dynamically with openssl and the openssl version was later upgraded. Remove some dead code and comments which are not true any more.
Commit
48f1239eb2e9098b5c2f3b7d118683e4418f4696
Parent
94c0eb9724fbbcb…
2 files changed
+2
-27
+5
-9
+2
-27
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -32,11 +32,11 @@ | ||
| 32 | 32 | #else |
| 33 | 33 | # include <errno.h> /* errno global */ |
| 34 | 34 | #endif |
| 35 | 35 | #include "zlib.h" |
| 36 | 36 | #ifdef FOSSIL_ENABLE_SSL |
| 37 | -# include "openssl/opensslv.h" | |
| 37 | +# include "openssl/crypto.h" | |
| 38 | 38 | #endif |
| 39 | 39 | #if INTERFACE |
| 40 | 40 | #ifdef FOSSIL_ENABLE_TCL |
| 41 | 41 | # include "tcl.h" |
| 42 | 42 | #endif |
| @@ -167,35 +167,10 @@ | ||
| 167 | 167 | int wikiFlags; /* Wiki conversion flags applied to %w and %W */ |
| 168 | 168 | char isHTTP; /* True if server/CGI modes, else assume CLI. */ |
| 169 | 169 | char javascriptHyperlink; /* If true, set href= using script, not HTML */ |
| 170 | 170 | Blob httpHeader; /* Complete text of the HTTP request header */ |
| 171 | 171 | UrlData url; /* Information about current URL */ |
| 172 | -#if 0 | |
| 173 | - /* | |
| 174 | - ** NOTE: These members MUST be kept in sync with those in the "UrlData" | |
| 175 | - ** structure defined in "url.c". | |
| 176 | - */ | |
| 177 | - int urlIsFile; /* True if a "file:" url */ | |
| 178 | - int urlIsHttps; /* True if a "https:" url */ | |
| 179 | - int urlIsSsh; /* True if an "ssh:" url */ | |
| 180 | - char *urlName; /* Hostname for http: or filename for file: */ | |
| 181 | - char *urlHostname; /* The HOST: parameter on http headers */ | |
| 182 | - char *urlProtocol; /* "http" or "https" */ | |
| 183 | - int urlPort; /* TCP port number for http: or https: */ | |
| 184 | - int urlDfltPort; /* The default port for the given protocol */ | |
| 185 | - char *urlPath; /* Pathname for http: */ | |
| 186 | - char *urlUser; /* User id for http: */ | |
| 187 | - char *urlPasswd; /* Password for http: */ | |
| 188 | - char *urlCanonical; /* Canonical representation of the URL */ | |
| 189 | - char *urlProxyAuth; /* Proxy-Authorizer: string */ | |
| 190 | - char *urlFossil; /* The fossil query parameter on ssh: */ | |
| 191 | - unsigned urlFlags; /* Boolean flags controlling URL processing */ | |
| 192 | - int useProxy; /* Used to remember that a proxy is in use */ | |
| 193 | - char *proxyUrlPath; | |
| 194 | - int proxyOrigPort; /* Tunneled port number for https through proxy */ | |
| 195 | -#endif | |
| 196 | - | |
| 197 | 172 | const char *zLogin; /* Login name. NULL or "" if not logged in. */ |
| 198 | 173 | const char *zSSLIdentity; /* Value of --ssl-identity option, filename of |
| 199 | 174 | ** SSL client identity */ |
| 200 | 175 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 201 | 176 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| @@ -885,11 +860,11 @@ | ||
| 885 | 860 | __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8); |
| 886 | 861 | fossil_print("SQLite %s %.30s\n", sqlite3_libversion(), sqlite3_sourceid()); |
| 887 | 862 | fossil_print("Schema version %s\n", AUX_SCHEMA); |
| 888 | 863 | fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion()); |
| 889 | 864 | #if defined(FOSSIL_ENABLE_SSL) |
| 890 | - fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT); | |
| 865 | + fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION)); | |
| 891 | 866 | #endif |
| 892 | 867 | #if defined(FOSSIL_ENABLE_TCL) |
| 893 | 868 | Th_FossilInit(TH_INIT_DEFAULT | TH_INIT_FORCE_TCL); |
| 894 | 869 | rc = Th_Eval(g.interp, 0, "tclInvoke info patchlevel", -1); |
| 895 | 870 | zRc = Th_ReturnCodeName(rc, 0); |
| 896 | 871 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -32,11 +32,11 @@ | |
| 32 | #else |
| 33 | # include <errno.h> /* errno global */ |
| 34 | #endif |
| 35 | #include "zlib.h" |
| 36 | #ifdef FOSSIL_ENABLE_SSL |
| 37 | # include "openssl/opensslv.h" |
| 38 | #endif |
| 39 | #if INTERFACE |
| 40 | #ifdef FOSSIL_ENABLE_TCL |
| 41 | # include "tcl.h" |
| 42 | #endif |
| @@ -167,35 +167,10 @@ | |
| 167 | int wikiFlags; /* Wiki conversion flags applied to %w and %W */ |
| 168 | char isHTTP; /* True if server/CGI modes, else assume CLI. */ |
| 169 | char javascriptHyperlink; /* If true, set href= using script, not HTML */ |
| 170 | Blob httpHeader; /* Complete text of the HTTP request header */ |
| 171 | UrlData url; /* Information about current URL */ |
| 172 | #if 0 |
| 173 | /* |
| 174 | ** NOTE: These members MUST be kept in sync with those in the "UrlData" |
| 175 | ** structure defined in "url.c". |
| 176 | */ |
| 177 | int urlIsFile; /* True if a "file:" url */ |
| 178 | int urlIsHttps; /* True if a "https:" url */ |
| 179 | int urlIsSsh; /* True if an "ssh:" url */ |
| 180 | char *urlName; /* Hostname for http: or filename for file: */ |
| 181 | char *urlHostname; /* The HOST: parameter on http headers */ |
| 182 | char *urlProtocol; /* "http" or "https" */ |
| 183 | int urlPort; /* TCP port number for http: or https: */ |
| 184 | int urlDfltPort; /* The default port for the given protocol */ |
| 185 | char *urlPath; /* Pathname for http: */ |
| 186 | char *urlUser; /* User id for http: */ |
| 187 | char *urlPasswd; /* Password for http: */ |
| 188 | char *urlCanonical; /* Canonical representation of the URL */ |
| 189 | char *urlProxyAuth; /* Proxy-Authorizer: string */ |
| 190 | char *urlFossil; /* The fossil query parameter on ssh: */ |
| 191 | unsigned urlFlags; /* Boolean flags controlling URL processing */ |
| 192 | int useProxy; /* Used to remember that a proxy is in use */ |
| 193 | char *proxyUrlPath; |
| 194 | int proxyOrigPort; /* Tunneled port number for https through proxy */ |
| 195 | #endif |
| 196 | |
| 197 | const char *zLogin; /* Login name. NULL or "" if not logged in. */ |
| 198 | const char *zSSLIdentity; /* Value of --ssl-identity option, filename of |
| 199 | ** SSL client identity */ |
| 200 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 201 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| @@ -885,11 +860,11 @@ | |
| 885 | __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8); |
| 886 | fossil_print("SQLite %s %.30s\n", sqlite3_libversion(), sqlite3_sourceid()); |
| 887 | fossil_print("Schema version %s\n", AUX_SCHEMA); |
| 888 | fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion()); |
| 889 | #if defined(FOSSIL_ENABLE_SSL) |
| 890 | fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT); |
| 891 | #endif |
| 892 | #if defined(FOSSIL_ENABLE_TCL) |
| 893 | Th_FossilInit(TH_INIT_DEFAULT | TH_INIT_FORCE_TCL); |
| 894 | rc = Th_Eval(g.interp, 0, "tclInvoke info patchlevel", -1); |
| 895 | zRc = Th_ReturnCodeName(rc, 0); |
| 896 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -32,11 +32,11 @@ | |
| 32 | #else |
| 33 | # include <errno.h> /* errno global */ |
| 34 | #endif |
| 35 | #include "zlib.h" |
| 36 | #ifdef FOSSIL_ENABLE_SSL |
| 37 | # include "openssl/crypto.h" |
| 38 | #endif |
| 39 | #if INTERFACE |
| 40 | #ifdef FOSSIL_ENABLE_TCL |
| 41 | # include "tcl.h" |
| 42 | #endif |
| @@ -167,35 +167,10 @@ | |
| 167 | int wikiFlags; /* Wiki conversion flags applied to %w and %W */ |
| 168 | char isHTTP; /* True if server/CGI modes, else assume CLI. */ |
| 169 | char javascriptHyperlink; /* If true, set href= using script, not HTML */ |
| 170 | Blob httpHeader; /* Complete text of the HTTP request header */ |
| 171 | UrlData url; /* Information about current URL */ |
| 172 | const char *zLogin; /* Login name. NULL or "" if not logged in. */ |
| 173 | const char *zSSLIdentity; /* Value of --ssl-identity option, filename of |
| 174 | ** SSL client identity */ |
| 175 | int useLocalauth; /* No login required if from 127.0.0.1 */ |
| 176 | int noPswd; /* Logged in without password (on 127.0.0.1) */ |
| @@ -885,11 +860,11 @@ | |
| 860 | __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8); |
| 861 | fossil_print("SQLite %s %.30s\n", sqlite3_libversion(), sqlite3_sourceid()); |
| 862 | fossil_print("Schema version %s\n", AUX_SCHEMA); |
| 863 | fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion()); |
| 864 | #if defined(FOSSIL_ENABLE_SSL) |
| 865 | fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION)); |
| 866 | #endif |
| 867 | #if defined(FOSSIL_ENABLE_TCL) |
| 868 | Th_FossilInit(TH_INIT_DEFAULT | TH_INIT_FORCE_TCL); |
| 869 | rc = Th_Eval(g.interp, 0, "tclInvoke info patchlevel", -1); |
| 870 | zRc = Th_ReturnCodeName(rc, 0); |
| 871 |
+5
-9
| --- src/url.c | ||
| +++ src/url.c | ||
| @@ -43,14 +43,10 @@ | ||
| 43 | 43 | |
| 44 | 44 | /* |
| 45 | 45 | ** The URL related data used with this subsystem. |
| 46 | 46 | */ |
| 47 | 47 | struct UrlData { |
| 48 | - /* | |
| 49 | - ** NOTE: These members MUST be kept in sync with the related ones in the | |
| 50 | - ** "Global" structure defined in "main.c". | |
| 51 | - */ | |
| 52 | 48 | int isFile; /* True if a "file:" url */ |
| 53 | 49 | int isHttps; /* True if a "https:" url */ |
| 54 | 50 | int isSsh; /* True if an "ssh:" url */ |
| 55 | 51 | char *name; /* Hostname for http: or filename for file: */ |
| 56 | 52 | char *hostname; /* The HOST: parameter on http headers */ |
| @@ -213,11 +209,11 @@ | ||
| 213 | 209 | } |
| 214 | 210 | |
| 215 | 211 | dehttpize(pUrlData->path); |
| 216 | 212 | if( pUrlData->dfltPort==pUrlData->port ){ |
| 217 | 213 | pUrlData->canonical = mprintf( |
| 218 | - "%s://%s%T%T%s", | |
| 214 | + "%s://%s%T%T%s", | |
| 219 | 215 | pUrlData->protocol, zLogin, pUrlData->name, pUrlData->path, zExe |
| 220 | 216 | ); |
| 221 | 217 | }else{ |
| 222 | 218 | pUrlData->canonical = mprintf( |
| 223 | 219 | "%s://%s%T:%d%T%s", |
| @@ -250,11 +246,11 @@ | ||
| 250 | 246 | fossil_fatal("unknown repository: %s", zUrl); |
| 251 | 247 | } |
| 252 | 248 | if( urlFlags ) pUrlData->flags = urlFlags; |
| 253 | 249 | if( pUrlData->isFile ){ |
| 254 | 250 | Blob cfile; |
| 255 | - dehttpize(zFile); | |
| 251 | + dehttpize(zFile); | |
| 256 | 252 | file_canonical_name(zFile, &cfile, 0); |
| 257 | 253 | free(zFile); |
| 258 | 254 | pUrlData->protocol = "file"; |
| 259 | 255 | pUrlData->path = ""; |
| 260 | 256 | pUrlData->name = mprintf("%b", &cfile); |
| @@ -272,15 +268,15 @@ | ||
| 272 | 268 | } |
| 273 | 269 | } |
| 274 | 270 | } |
| 275 | 271 | |
| 276 | 272 | /* |
| 277 | -** Parse the given URL, which describes a sync server. Populate variables | |
| 273 | +** Parse the given URL, which describes a sync server. Populate variables | |
| 278 | 274 | ** in the global "g" structure as follows: |
| 279 | 275 | ** |
| 280 | 276 | ** g.url.isFile True if FILE: |
| 281 | -** g.url.isHttps True if HTTPS: | |
| 277 | +** g.url.isHttps True if HTTPS: | |
| 282 | 278 | ** g.url.isSsh True if SSH: |
| 283 | 279 | ** g.url.protocol "http" or "https" or "file" |
| 284 | 280 | ** g.url.name Hostname for HTTP:, HTTPS:, SSH:. Filename for FILE: |
| 285 | 281 | ** g.url.port TCP port number for HTTP or HTTPS. |
| 286 | 282 | ** g.url.dfltPort Default TCP port number (80 or 443). |
| @@ -470,11 +466,11 @@ | ||
| 470 | 466 | const char *zName2, /* Second override */ |
| 471 | 467 | const char *zValue2 /* Second override value */ |
| 472 | 468 | ){ |
| 473 | 469 | const char *zSep = "?"; |
| 474 | 470 | int i; |
| 475 | - | |
| 471 | + | |
| 476 | 472 | blob_reset(&p->url); |
| 477 | 473 | blob_appendf(&p->url, "%s/%s", g.zTop, p->zBase); |
| 478 | 474 | for(i=0; i<p->nParam; i++){ |
| 479 | 475 | const char *z = p->azValue[i]; |
| 480 | 476 | if( zName1 && fossil_strcmp(zName1,p->azName[i])==0 ){ |
| 481 | 477 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -43,14 +43,10 @@ | |
| 43 | |
| 44 | /* |
| 45 | ** The URL related data used with this subsystem. |
| 46 | */ |
| 47 | struct UrlData { |
| 48 | /* |
| 49 | ** NOTE: These members MUST be kept in sync with the related ones in the |
| 50 | ** "Global" structure defined in "main.c". |
| 51 | */ |
| 52 | int isFile; /* True if a "file:" url */ |
| 53 | int isHttps; /* True if a "https:" url */ |
| 54 | int isSsh; /* True if an "ssh:" url */ |
| 55 | char *name; /* Hostname for http: or filename for file: */ |
| 56 | char *hostname; /* The HOST: parameter on http headers */ |
| @@ -213,11 +209,11 @@ | |
| 213 | } |
| 214 | |
| 215 | dehttpize(pUrlData->path); |
| 216 | if( pUrlData->dfltPort==pUrlData->port ){ |
| 217 | pUrlData->canonical = mprintf( |
| 218 | "%s://%s%T%T%s", |
| 219 | pUrlData->protocol, zLogin, pUrlData->name, pUrlData->path, zExe |
| 220 | ); |
| 221 | }else{ |
| 222 | pUrlData->canonical = mprintf( |
| 223 | "%s://%s%T:%d%T%s", |
| @@ -250,11 +246,11 @@ | |
| 250 | fossil_fatal("unknown repository: %s", zUrl); |
| 251 | } |
| 252 | if( urlFlags ) pUrlData->flags = urlFlags; |
| 253 | if( pUrlData->isFile ){ |
| 254 | Blob cfile; |
| 255 | dehttpize(zFile); |
| 256 | file_canonical_name(zFile, &cfile, 0); |
| 257 | free(zFile); |
| 258 | pUrlData->protocol = "file"; |
| 259 | pUrlData->path = ""; |
| 260 | pUrlData->name = mprintf("%b", &cfile); |
| @@ -272,15 +268,15 @@ | |
| 272 | } |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | /* |
| 277 | ** Parse the given URL, which describes a sync server. Populate variables |
| 278 | ** in the global "g" structure as follows: |
| 279 | ** |
| 280 | ** g.url.isFile True if FILE: |
| 281 | ** g.url.isHttps True if HTTPS: |
| 282 | ** g.url.isSsh True if SSH: |
| 283 | ** g.url.protocol "http" or "https" or "file" |
| 284 | ** g.url.name Hostname for HTTP:, HTTPS:, SSH:. Filename for FILE: |
| 285 | ** g.url.port TCP port number for HTTP or HTTPS. |
| 286 | ** g.url.dfltPort Default TCP port number (80 or 443). |
| @@ -470,11 +466,11 @@ | |
| 470 | const char *zName2, /* Second override */ |
| 471 | const char *zValue2 /* Second override value */ |
| 472 | ){ |
| 473 | const char *zSep = "?"; |
| 474 | int i; |
| 475 | |
| 476 | blob_reset(&p->url); |
| 477 | blob_appendf(&p->url, "%s/%s", g.zTop, p->zBase); |
| 478 | for(i=0; i<p->nParam; i++){ |
| 479 | const char *z = p->azValue[i]; |
| 480 | if( zName1 && fossil_strcmp(zName1,p->azName[i])==0 ){ |
| 481 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -43,14 +43,10 @@ | |
| 43 | |
| 44 | /* |
| 45 | ** The URL related data used with this subsystem. |
| 46 | */ |
| 47 | struct UrlData { |
| 48 | int isFile; /* True if a "file:" url */ |
| 49 | int isHttps; /* True if a "https:" url */ |
| 50 | int isSsh; /* True if an "ssh:" url */ |
| 51 | char *name; /* Hostname for http: or filename for file: */ |
| 52 | char *hostname; /* The HOST: parameter on http headers */ |
| @@ -213,11 +209,11 @@ | |
| 209 | } |
| 210 | |
| 211 | dehttpize(pUrlData->path); |
| 212 | if( pUrlData->dfltPort==pUrlData->port ){ |
| 213 | pUrlData->canonical = mprintf( |
| 214 | "%s://%s%T%T%s", |
| 215 | pUrlData->protocol, zLogin, pUrlData->name, pUrlData->path, zExe |
| 216 | ); |
| 217 | }else{ |
| 218 | pUrlData->canonical = mprintf( |
| 219 | "%s://%s%T:%d%T%s", |
| @@ -250,11 +246,11 @@ | |
| 246 | fossil_fatal("unknown repository: %s", zUrl); |
| 247 | } |
| 248 | if( urlFlags ) pUrlData->flags = urlFlags; |
| 249 | if( pUrlData->isFile ){ |
| 250 | Blob cfile; |
| 251 | dehttpize(zFile); |
| 252 | file_canonical_name(zFile, &cfile, 0); |
| 253 | free(zFile); |
| 254 | pUrlData->protocol = "file"; |
| 255 | pUrlData->path = ""; |
| 256 | pUrlData->name = mprintf("%b", &cfile); |
| @@ -272,15 +268,15 @@ | |
| 268 | } |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | /* |
| 273 | ** Parse the given URL, which describes a sync server. Populate variables |
| 274 | ** in the global "g" structure as follows: |
| 275 | ** |
| 276 | ** g.url.isFile True if FILE: |
| 277 | ** g.url.isHttps True if HTTPS: |
| 278 | ** g.url.isSsh True if SSH: |
| 279 | ** g.url.protocol "http" or "https" or "file" |
| 280 | ** g.url.name Hostname for HTTP:, HTTPS:, SSH:. Filename for FILE: |
| 281 | ** g.url.port TCP port number for HTTP or HTTPS. |
| 282 | ** g.url.dfltPort Default TCP port number (80 or 443). |
| @@ -470,11 +466,11 @@ | |
| 466 | const char *zName2, /* Second override */ |
| 467 | const char *zValue2 /* Second override value */ |
| 468 | ){ |
| 469 | const char *zSep = "?"; |
| 470 | int i; |
| 471 | |
| 472 | blob_reset(&p->url); |
| 473 | blob_appendf(&p->url, "%s/%s", g.zTop, p->zBase); |
| 474 | for(i=0; i<p->nParam; i++){ |
| 475 | const char *z = p->azValue[i]; |
| 476 | if( zName1 && fossil_strcmp(zName1,p->azName[i])==0 ){ |
| 477 |