Fossil SCM
Show the OpenSSL version and the SERVER_SOFTWARE to administrators on the /stat page.
Commit
bb09ff84ae8a2982a2c109749841aebf0f80538c7eb8d9e921a0fd9305deef1c
Parent
c68fa2edd76d900…
2 files changed
+14
+8
+14
| --- src/http_ssl.c | ||
| +++ src/http_ssl.c | ||
| @@ -1178,5 +1178,19 @@ | ||
| 1178 | 1178 | wellknown_notfound: |
| 1179 | 1179 | fossil_free(zPath); |
| 1180 | 1180 | webpage_notfound_error(0); |
| 1181 | 1181 | return; |
| 1182 | 1182 | } |
| 1183 | + | |
| 1184 | +/* | |
| 1185 | +** Return the OpenSSL version number being used. Space to hold | |
| 1186 | +** this name is obtained from fossil_malloc() and should be | |
| 1187 | +** freed by the caller. | |
| 1188 | +*/ | |
| 1189 | +char *fossil_openssl_version(void){ | |
| 1190 | +#if defined(FOSSIL_ENABLE_SSL) | |
| 1191 | + return mprintf("%s (0x%09x)\n", | |
| 1192 | + SSLeay_version(SSLEAY_VERSION), OPENSSL_VERSION_NUMBER); | |
| 1193 | +#else | |
| 1194 | + return mprintf("none"); | |
| 1195 | +#endif | |
| 1196 | +} | |
| 1183 | 1197 |
| --- src/http_ssl.c | |
| +++ src/http_ssl.c | |
| @@ -1178,5 +1178,19 @@ | |
| 1178 | wellknown_notfound: |
| 1179 | fossil_free(zPath); |
| 1180 | webpage_notfound_error(0); |
| 1181 | return; |
| 1182 | } |
| 1183 |
| --- src/http_ssl.c | |
| +++ src/http_ssl.c | |
| @@ -1178,5 +1178,19 @@ | |
| 1178 | wellknown_notfound: |
| 1179 | fossil_free(zPath); |
| 1180 | webpage_notfound_error(0); |
| 1181 | return; |
| 1182 | } |
| 1183 | |
| 1184 | /* |
| 1185 | ** Return the OpenSSL version number being used. Space to hold |
| 1186 | ** this name is obtained from fossil_malloc() and should be |
| 1187 | ** freed by the caller. |
| 1188 | */ |
| 1189 | char *fossil_openssl_version(void){ |
| 1190 | #if defined(FOSSIL_ENABLE_SSL) |
| 1191 | return mprintf("%s (0x%09x)\n", |
| 1192 | SSLeay_version(SSLEAY_VERSION), OPENSSL_VERSION_NUMBER); |
| 1193 | #else |
| 1194 | return mprintf("none"); |
| 1195 | #endif |
| 1196 | } |
| 1197 |
+8
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -280,10 +280,18 @@ | ||
| 280 | 280 | @ (%h(RELEASE_VERSION)) <a href='version?verbose'>(details)</a> |
| 281 | 281 | @ </td></tr> |
| 282 | 282 | @ <tr><th>SQLite Version:</th><td>%.19s(sqlite3_sourceid()) |
| 283 | 283 | @ [%.10s(&sqlite3_sourceid()[20])] (%s(sqlite3_libversion())) |
| 284 | 284 | @ <a href='version?verbose'>(details)</a></td></tr> |
| 285 | + if( g.perm.Admin ){ | |
| 286 | + const char *zCgi = P("SERVER_SOFTWARE"); | |
| 287 | + @ <tr><th>OpenSSL Version:</th> | |
| 288 | + @ <td>%z(fossil_openssl_version())</td></tr> | |
| 289 | + if( zCgi ){ | |
| 290 | + @ <tr><th>Web Server:</th><td>%s(zCgi)</td></tr> | |
| 291 | + } | |
| 292 | + } | |
| 285 | 293 | if( g.eHashPolicy!=HPOLICY_AUTO ){ |
| 286 | 294 | @ <tr><th>Schema Version:</th><td>%h(g.zAuxSchema), |
| 287 | 295 | @ %s(hpolicy_name())</td></tr> |
| 288 | 296 | }else{ |
| 289 | 297 | @ <tr><th>Schema Version:</th><td>%h(g.zAuxSchema)</td></tr> |
| 290 | 298 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -280,10 +280,18 @@ | |
| 280 | @ (%h(RELEASE_VERSION)) <a href='version?verbose'>(details)</a> |
| 281 | @ </td></tr> |
| 282 | @ <tr><th>SQLite Version:</th><td>%.19s(sqlite3_sourceid()) |
| 283 | @ [%.10s(&sqlite3_sourceid()[20])] (%s(sqlite3_libversion())) |
| 284 | @ <a href='version?verbose'>(details)</a></td></tr> |
| 285 | if( g.eHashPolicy!=HPOLICY_AUTO ){ |
| 286 | @ <tr><th>Schema Version:</th><td>%h(g.zAuxSchema), |
| 287 | @ %s(hpolicy_name())</td></tr> |
| 288 | }else{ |
| 289 | @ <tr><th>Schema Version:</th><td>%h(g.zAuxSchema)</td></tr> |
| 290 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -280,10 +280,18 @@ | |
| 280 | @ (%h(RELEASE_VERSION)) <a href='version?verbose'>(details)</a> |
| 281 | @ </td></tr> |
| 282 | @ <tr><th>SQLite Version:</th><td>%.19s(sqlite3_sourceid()) |
| 283 | @ [%.10s(&sqlite3_sourceid()[20])] (%s(sqlite3_libversion())) |
| 284 | @ <a href='version?verbose'>(details)</a></td></tr> |
| 285 | if( g.perm.Admin ){ |
| 286 | const char *zCgi = P("SERVER_SOFTWARE"); |
| 287 | @ <tr><th>OpenSSL Version:</th> |
| 288 | @ <td>%z(fossil_openssl_version())</td></tr> |
| 289 | if( zCgi ){ |
| 290 | @ <tr><th>Web Server:</th><td>%s(zCgi)</td></tr> |
| 291 | } |
| 292 | } |
| 293 | if( g.eHashPolicy!=HPOLICY_AUTO ){ |
| 294 | @ <tr><th>Schema Version:</th><td>%h(g.zAuxSchema), |
| 295 | @ %s(hpolicy_name())</td></tr> |
| 296 | }else{ |
| 297 | @ <tr><th>Schema Version:</th><td>%h(g.zAuxSchema)</td></tr> |
| 298 |