You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2019/08/05 10:27:34 UTC
svn commit: r1864425 - in /httpd/httpd/trunk/modules/md: md_acme_acct.c
md_acme_order.c md_crypt.c md_time.c md_version.h mod_md.c mod_md_config.c
mod_md_drive.c
Author: icing
Date: Mon Aug 5 10:27:34 2019
New Revision: 1864425
URL: http://svn.apache.org/viewvc?rev=1864425&view=rev
Log:
* mod_md: fix compiler warnings
Modified:
httpd/httpd/trunk/modules/md/md_acme_acct.c
httpd/httpd/trunk/modules/md/md_acme_order.c
httpd/httpd/trunk/modules/md/md_crypt.c
httpd/httpd/trunk/modules/md/md_time.c
httpd/httpd/trunk/modules/md/md_version.h
httpd/httpd/trunk/modules/md/mod_md.c
httpd/httpd/trunk/modules/md/mod_md_config.c
httpd/httpd/trunk/modules/md/mod_md_drive.c
Modified: httpd/httpd/trunk/modules/md/md_acme_acct.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/md/md_acme_acct.c?rev=1864425&r1=1864424&r2=1864425&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/md/md_acme_acct.c (original)
+++ httpd/httpd/trunk/modules/md/md_acme_acct.c Mon Aug 5 10:27:34 2019
@@ -443,7 +443,7 @@ static apr_status_t acct_upd(md_acme_t *
}
apr_array_clear(acct->contacts);
- md_json_getsa(acct->contacts, body, MD_KEY_CONTACT, NULL);
+ md_json_dupsa(acct->contacts, acme->p, body, MD_KEY_CONTACT, NULL);
if (md_json_has_key(body, MD_KEY_STATUS, NULL)) {
acct->status = acct_st_from_str(md_json_gets(body, MD_KEY_STATUS, NULL));
}
Modified: httpd/httpd/trunk/modules/md/md_acme_order.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/md/md_acme_order.c?rev=1864425&r1=1864424&r2=1864425&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/md/md_acme_order.c (original)
+++ httpd/httpd/trunk/modules/md/md_acme_order.c Mon Aug 5 10:27:34 2019
@@ -505,7 +505,7 @@ static apr_status_t check_challenges(voi
default:
rv = APR_EINVAL;
md_result_printf(ctx->result, rv,
- "domain authorization for %s failed with state %s",
+ "domain authorization for %s failed with state %d",
authz->domain, authz->state);
md_result_log(ctx->result, MD_LOG_ERR);
goto leave;
Modified: httpd/httpd/trunk/modules/md/md_crypt.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/md/md_crypt.c?rev=1864425&r1=1864424&r2=1864425&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/md/md_crypt.c (original)
+++ httpd/httpd/trunk/modules/md/md_crypt.c Mon Aug 5 10:27:34 2019
@@ -1545,6 +1545,9 @@ apr_status_t md_cert_get_ct_scts(apr_arr
md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, 0, p, "ct_sct, found %d SCT extensions", scts->nelts);
return APR_SUCCESS;
#else
+ (void)scts;
+ (void)p;
+ (void)cert;
return APR_ENOTIMPL;
#endif
}
Modified: httpd/httpd/trunk/modules/md/md_time.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/md/md_time.c?rev=1864425&r1=1864424&r2=1864425&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/md/md_time.c (original)
+++ httpd/httpd/trunk/modules/md/md_time.c Mon Aug 5 10:27:34 2019
@@ -219,7 +219,7 @@ const char *md_timeslice_parse(const md_
const char *val, apr_interval_time_t norm)
{
md_timeslice_t *ts;
- int percent;
+ int percent = 0;
*pts = NULL;
if (!val) {
Modified: httpd/httpd/trunk/modules/md/md_version.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/md/md_version.h?rev=1864425&r1=1864424&r2=1864425&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/md/md_version.h (original)
+++ httpd/httpd/trunk/modules/md/md_version.h Mon Aug 5 10:27:34 2019
@@ -27,7 +27,7 @@
* @macro
* Version number of the md module as c string
*/
-#define MOD_MD_VERSION "2.0.7"
+#define MOD_MD_VERSION "2.0.10"
/**
* @macro
@@ -35,7 +35,7 @@
* release. This is a 24 bit number with 8 bits for major number, 8 bits
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
*/
-#define MOD_MD_VERSION_NUM 0x020007
+#define MOD_MD_VERSION_NUM 0x02000a
#define MD_ACME_DEF_URL "https://acme-v02.api.letsencrypt.org/directory"
Modified: httpd/httpd/trunk/modules/md/mod_md.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/md/mod_md.c?rev=1864425&r1=1864424&r2=1864425&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/md/mod_md.c (original)
+++ httpd/httpd/trunk/modules/md/mod_md.c Mon Aug 5 10:27:34 2019
@@ -143,8 +143,8 @@ static apr_status_t store_file_ev(void *
ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, s, "store event=%d on %s %s (group %d)",
ev, (ftype == APR_DIR)? "dir" : "file", fname, group);
- /* Directories in group CHALLENGES and STAGING are written to under a different user.
- * Give him ownership.
+ /* Directories in group CHALLENGES, STAGING and OCSP are written to
+ * under a different user. Give her ownership.
*/
if (ftype == APR_DIR) {
switch (group) {
@@ -191,7 +191,8 @@ static apr_status_t setup_store(md_store
md_store_fs_set_event_cb(*pstore, store_file_ev, s);
if (APR_SUCCESS != (rv = check_group_dir(*pstore, MD_SG_CHALLENGES, p, s))
|| APR_SUCCESS != (rv = check_group_dir(*pstore, MD_SG_STAGING, p, s))
- || APR_SUCCESS != (rv = check_group_dir(*pstore, MD_SG_ACCOUNTS, p, s))) {
+ || APR_SUCCESS != (rv = check_group_dir(*pstore, MD_SG_ACCOUNTS, p, s))
+ ) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(10047)
"setup challenges directory");
}
@@ -707,8 +708,8 @@ static void init_watched_names(md_mod_co
}
}
-static apr_status_t md_post_config(apr_pool_t *p, apr_pool_t *plog,
- apr_pool_t *ptemp, server_rec *s)
+static apr_status_t md_post_config_before_ssl(apr_pool_t *p, apr_pool_t *plog,
+ apr_pool_t *ptemp, server_rec *s)
{
void *data = NULL;
const char *mod_md_init_key = "mod_md_init_counter";
@@ -751,11 +752,10 @@ static apr_status_t md_post_config(apr_p
if (APR_SUCCESS != (rv = setup_store(&store, mc, p, s))
|| APR_SUCCESS != (rv = md_reg_create(&mc->reg, p, store, mc->proxy_url))) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(10072)
- "setup md registry");
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(10072) "setup md registry");
goto leave;
}
-
+
init_ssl();
/* How to bootstrap this module:
@@ -939,17 +939,8 @@ static apr_status_t get_certificate(serv
}
if (!sc->assigned) {
- /* Hmm, mod_ssl (or someone like it) asks for certificates for a server
- * where we did not assign a MD to. Either the user forgot to configure
- * that server with SSL certs, has misspelled a server name or we have
- * a bug that prevented us from taking responsibility for this server.
- * Either way, make some polite noise */
- ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(10114)
- "asked for certificate of server %s which has no MD assigned. This "
- "could be ok, but most likely it is either a misconfiguration or "
- "a bug. Please check server names and MD names carefully and if "
- "everything checks open, please open an issue.",
- s->server_hostname);
+ /* With the new hooks in mod_ssl, we are invoked for all server_rec. It is
+ * therefore normal, when we have nothing to add here. */
return APR_ENOENT;
}
@@ -1254,8 +1245,9 @@ static void md_hooks(apr_pool_t *pool)
ap_log_perror(APLOG_MARK, APLOG_TRACE1, 0, pool, "installing hooks");
/* Run once after configuration is set, before mod_ssl.
+ * Run again after mod_ssl is done.
*/
- ap_hook_post_config(md_post_config, NULL, mod_ssl, APR_HOOK_MIDDLE);
+ ap_hook_post_config(md_post_config_before_ssl, NULL, mod_ssl, APR_HOOK_MIDDLE);
/* Run once after a child process has been created.
*/
Modified: httpd/httpd/trunk/modules/md/mod_md_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/md/mod_md_config.c?rev=1864425&r1=1864424&r2=1864425&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/md/mod_md_config.c (original)
+++ httpd/httpd/trunk/modules/md/mod_md_config.c Mon Aug 5 10:27:34 2019
@@ -45,7 +45,7 @@
static md_mod_conf_t defmc = {
NULL, /* list of mds */
#if AP_MODULE_MAGIC_AT_LEAST(20180906, 2)
- NULL, /* base dirm by default state-dir-relative */
+ NULL, /* base dir by default state-dir-relative */
#else
MD_DEFAULT_BASE_DIR,
#endif
@@ -897,7 +897,7 @@ apr_status_t md_config_post_config(serve
if (mc->hsts_max_age > 0) {
mc->hsts_header = apr_psprintf(p, "max-age=%d", mc->hsts_max_age);
}
-
+
#if AP_MODULE_MAGIC_AT_LEAST(20180906, 2)
if (mc->base_dir == NULL) {
mc->base_dir = ap_state_dir_relative(p, MD_DEFAULT_BASE_DIR);
Modified: httpd/httpd/trunk/modules/md/mod_md_drive.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/md/mod_md_drive.c?rev=1864425&r1=1864424&r2=1864425&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/md/mod_md_drive.c (original)
+++ httpd/httpd/trunk/modules/md/mod_md_drive.c Mon Aug 5 10:27:34 2019
@@ -149,7 +149,7 @@ static apr_status_t send_notification(md
const char * const *argv;
const char *cmdline;
int exit_code;
- apr_status_t rv;
+ apr_status_t rv = APR_SUCCESS;
if (!strcmp("renewed", reason)) {
if (dctx->mc->notify_cmd) {
Re: svn commit: r1864425 - in /httpd/httpd/trunk/modules/md:
md_acme_acct.c md_acme_order.c md_crypt.c md_time.c md_version.h mod_md.c
mod_md_config.c mod_md_drive.c
Posted by Stefan Eissing <st...@greenbytes.de>.
> Am 05.08.2019 um 12:32 schrieb Rainer Jung <ra...@kippdata.de>:
>
> Hi Stefan,
>
> Am 05.08.2019 um 12:27 schrieb icing@apache.org:
>> Author: icing
>> Date: Mon Aug 5 10:27:34 2019
>> New Revision: 1864425
>> URL: http://svn.apache.org/viewvc?rev=1864425&view=rev
>> Log:
>> * mod_md: fix compiler warnings
>
> thanks for that. Some trailing spaces have now slipped in though (judged on the diff).
>
> Did you notice this report by Gregg:
>
> mod_md.c(386): warning C4003: not enough actual parameters for macro 'APLOGNO'
> mod_md.c(391): warning C4003: not enough actual parameters for macro 'APLOGNO'
> mod_md.c(601): warning C4003: not enough actual parameters for macro 'APLOGNO'
> mod_md.c(608): warning C4003: not enough actual parameters for macro 'APLOGNO'
> mod_md.c(659): warning C4003: not enough actual parameters for macro 'APLOGNO'
> mod_md.c(702): warning C4003: not enough actual parameters for macro 'APLOGNO'
> mod_md.c(912): warning C4003: not enough actual parameters for macro 'APLOGNO'
This is from 2.4.x, or? I am just about to backport the current trunk there...I am working as fast as I can! :)
>
> Thanks and regards,
>
> Rainer
Re: svn commit: r1864425 - in /httpd/httpd/trunk/modules/md:
md_acme_acct.c md_acme_order.c md_crypt.c md_time.c md_version.h mod_md.c
mod_md_config.c mod_md_drive.c
Posted by Rainer Jung <ra...@kippdata.de>.
Hi Stefan,
Am 05.08.2019 um 12:27 schrieb icing@apache.org:
> Author: icing
> Date: Mon Aug 5 10:27:34 2019
> New Revision: 1864425
>
> URL: http://svn.apache.org/viewvc?rev=1864425&view=rev
> Log:
> * mod_md: fix compiler warnings
thanks for that. Some trailing spaces have now slipped in though (judged
on the diff).
Did you notice this report by Gregg:
mod_md.c(386): warning C4003: not enough actual parameters for macro
'APLOGNO'
mod_md.c(391): warning C4003: not enough actual parameters for macro
'APLOGNO'
mod_md.c(601): warning C4003: not enough actual parameters for macro
'APLOGNO'
mod_md.c(608): warning C4003: not enough actual parameters for macro
'APLOGNO'
mod_md.c(659): warning C4003: not enough actual parameters for macro
'APLOGNO'
mod_md.c(702): warning C4003: not enough actual parameters for macro
'APLOGNO'
mod_md.c(912): warning C4003: not enough actual parameters for macro
'APLOGNO'
Thanks and regards,
Rainer