Commit 06b9b0ee authored by Stefan Eissing's avatar Stefan Eissing
Browse files

On the trunk:

mod_md: v0.9.2: new directive 'MDHttpProxy' to define a proxy for outgoing connection,
some minor bugfixes, twiddle the build system to avoid non-pic code generation.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807774 13f79535-47bb-0310-9956-ffa450edef68
parent d6bda3aa
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.5.0

  *) mod_md: v0.9.2: new directive 'MDHttpProxy' to define a proxy for outgoing connection,
     some minor bugfixes, twiddle the build system to avoid non-pic code generation.
     [Stefan Eissing]
  
  *) mod_ssl: Adding option to set a list of addr:port specs, as used in VirtualHosts
     to enable SSLEngine for all matching hosts. Updated documentation. [Stefan Eissing]
  
+6 −13
Original line number Diff line number Diff line
@@ -13,13 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

#
#   standard stuff
#


LTLIBRARY_NAME    = libmd.la
LTLIBRARY_SOURCES = \
COMMON_SOURCES = \
	md_acme.c \
	md_acme_acct.c \
	md_acme_authz.c \
@@ -36,9 +30,8 @@ LTLIBRARY_SOURCES = \
	md_store_fs.c \
	md_util.c
        

LTLIBRARY_DEPENDENCIES = md.h

COMMON_OBJECTS = $(COMMON_SOURCES:.c=.o)
COMMON_SHOBJECTS = $(COMMON_SOURCES:.c=.slo)

a2md_CFLAGS = $(EXTRA_INCLUDES)

@@ -48,8 +41,8 @@ a2md_OBJECTS = \
	md_cmd_reg.c \
	md_cmd_store.c

a2md: $(a2md_OBJECTS) $(LTLIBRARY_NAME)
	$(LINK) $(a2md_CFLAGS) $(a2md_LTFLAGS) $(a2md_OBJECTS) -lmd $(A2MD_LDADD) $(AP_LIBS)
a2md: $(a2md_OBJECTS) $(COMMON_SHOBJECTS) md.h
	$(LINK) $(a2md_CFLAGS) $(a2md_LTFLAGS) $(a2md_OBJECTS) $(COMMON_OBJECTS) $(A2MD_LDADD) $(AP_LIBS)

# top be installed in bin dir
bin_PROGRAMS = a2md
+20 −4
Original line number Diff line number Diff line
@@ -242,19 +242,37 @@ AC_DEFUN([APACHE_CHECK_JANSSON],[
dnl #  start of module specific part
APACHE_MODPATH_INIT(md)

dnl #  list of common object files
md_common_objs="dnl
md_acme.o dnl
md_acme_acct.o dnl
md_acme_authz.o dnl
md_acme_drive.o dnl
md_core.o dnl
md_curl.o dnl
md_crypt.o dnl
md_http.o dnl
md_json.o dnl
md_jws.o dnl
md_log.o dnl
md_reg.o dnl
md_store.o dnl
md_store_fs.o dnl
md_util.o dnl
"

dnl #  list of module object files
md_objs="dnl
mod_md.lo dnl
mod_md_config.lo dnl
mod_md_os.lo dnl
libmd.la dnl
"

# Ensure that other modules can pick up mod_md.h
APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])

dnl # hook module into the Autoconf mechanism (--enable-md)
APACHE_MODULE(md, [Managed Domain handling], $md_objs, , most, [
APACHE_MODULE(md, [Managed Domain handling], $md_objs $md_common_objs, , most, [
    APACHE_CHECK_OPENSSL
    if test "x$ac_cv_openssl" = "xno" ; then
        AC_MSG_WARN([libssl (or compatible) not found])
@@ -272,8 +290,6 @@ APACHE_MODULE(md, [Managed Domain handling], $md_objs, , most, [
        AC_MSG_WARN([libcurl not found])
        enable_md=no
    fi
    
    APR_ADDTO(A2MD_LDADD, [ "libmd.la" ])
])

dnl #  end of module specific part
+4 −2
Original line number Diff line number Diff line
@@ -90,7 +90,8 @@ apr_status_t md_acme_init(apr_pool_t *p, const char *base)
    return md_crypt_init(p);
}

apr_status_t md_acme_create(md_acme_t **pacme, apr_pool_t *p, const char *url)
apr_status_t md_acme_create(md_acme_t **pacme, apr_pool_t *p, const char *url,
                            const char *proxy_url)
{
    md_acme_t *acme;
    const char *err = NULL;
@@ -113,6 +114,7 @@ apr_status_t md_acme_create(md_acme_t **pacme, apr_pool_t *p, const char *url)
    acme->p = p;
    acme->user_agent = apr_psprintf(p, "%s mod_md/%s", 
                                    base_product, MOD_MD_VERSION);
    acme->proxy_url = proxy_url? apr_pstrdup(p, proxy_url) : NULL;
    acme->max_retries = 3;
    
    if (APR_SUCCESS != (rv = apr_uri_parse(p, url, &uri_parsed))) {
@@ -134,7 +136,7 @@ apr_status_t md_acme_setup(md_acme_t *acme)
    
    assert(acme->url);
    if (!acme->http && APR_SUCCESS != (rv = md_http_create(&acme->http, acme->p,
                                                           acme->user_agent))) {
                                                           acme->user_agent, acme->proxy_url))) {
        return rv;
    }
    md_http_set_response_limit(acme->http, 1024*1024);
+4 −1
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ struct md_acme_t {
    const char *sname;              /* short name for the service, not necessarily unique */
    apr_pool_t *p;
    const char *user_agent;
    const char *proxy_url;
    struct md_acme_acct_t *acct;
    struct md_pkey_t *acct_key;
    
@@ -77,8 +78,10 @@ apr_status_t md_acme_init(apr_pool_t *pool, const char *base_version);
 * @param pacme   will hold the ACME server instance on success
 * @param p       pool to used
 * @param url     url of the server, optional if known at path
 * @param proxy_url optional url of a HTTP(S) proxy to use
 */
apr_status_t md_acme_create(md_acme_t **pacme, apr_pool_t *p, const char *url);
apr_status_t md_acme_create(md_acme_t **pacme, apr_pool_t *p, const char *url,
                            const char *proxy_url);

/**
 * Contact the ACME server and retrieve its directory information.
Loading