          va_start(argp, fmt);
          vfprintf(stderr, fmt, argp);
          va_end(argp);
---- serf/src/buckets/bwtp_buckets.c	2015-12-17 13:26:38.676327651 -0500
-+++ src/third_party/serf/instaweb_bwtp_buckets.c	2015-12-17 13:26:38.688327565 -0500
+--- serf/src/buckets/bwtp_buckets.c	2016-01-27 13:54:06.782312805 -0500
++++ src/third_party/serf/instaweb_bwtp_buckets.c	2016-01-27 13:54:06.794312723 -0500
 @@ -228,7 +228,8 @@
      req_len = apr_snprintf(ctx->req_line, sizeof(ctx->req_line),
                             "%s %d " "%" APR_UINT64_T_HEX_FMT " %s%s\r\n",

--- serf/src/buckets/buckets.c	2015-12-17 13:26:38.676327651 -0500
+++ src/third_party/serf/instaweb_buckets.c	2015-12-17 16:40:37.323946144 -0500
@@ -609,29 +609,21 @@
     va_list argp;
 

 apr_status_t serf_ssl_load_cert_file(
     serf_ssl_certificate_t **cert,
     const char *file_path,
@@ -1652,6 +1680,21 @@
     return cert->depth;
 }
 
+/*
+ * PageSpeed addition to allow verification of certificate hostnames.
+ *
+ * Hostname must be null-terminated.
+ * For return values, see X509_check_host.
+ */
+int serf_ssl_check_host(const serf_ssl_certificate_t *cert,
+                        const char* hostname)
+{
+  return X509_check_host(cert->ssl_cert,
+                         hostname,
+                         strlen(hostname),
+                         0 /* we don't need to set any flags */,
+                         NULL /* we don't need the SAN or CN extracted*/);
+}
 
 apr_hash_t *serf_ssl_cert_issuer(
     const serf_ssl_certificate_t *cert,
@@ -1798,6 +1841,7 @@
 
     if (!--ctx->ssl_ctx->refcount) {
         ssl_free_context(ctx->ssl_ctx);
