-@r@
+@r1@
expression rv, s;
constant char [] format;
identifier level =~ "^APLOG_(EMERG|ALERT|CRIT|ERR|WARNING|NOTICE|INFO|STARTUP|DEBUG)$";
(
level
|
- level|APLOG_NOERROR
+ level|APLOG_NOERRNO
|
level|APLOG_STARTUP
)
,rv, s
+ , APLOGNO()
,format, ...)
+
+@r2@
+expression rv, s, c;
+constant char [] format;
+identifier level =~ "^APLOG_(EMERG|ALERT|CRIT|ERR|WARNING|NOTICE|INFO|STARTUP|DEBUG)$";
+
+@@
+ ap_log_cserror( APLOG_MARK ,
+(
+ level
+|
+ level|APLOG_NOERRNO
+|
+ level|APLOG_STARTUP
+)
+ ,rv, s, c
++ , APLOGNO()
+ ,format, ...)
+
+@r3@
+expression rv, p, s, cert;
+constant char [] format;
+identifier level =~ "^APLOG_(EMERG|ALERT|CRIT|ERR|WARNING|NOTICE|INFO|STARTUP|DEBUG)$";
+
+@@
+ ssl_log_xerror( SSLLOG_MARK ,
+(
+ level
+|
+ level|APLOG_NOERRNO
+|
+ level|APLOG_STARTUP
+)
+ ,rv, p, s , cert
++ , APLOGNO()
+ ,format, ...)
+
+@r4@
+expression rv, rc, cert;
+constant char [] format;
+identifier level =~ "^APLOG_(EMERG|ALERT|CRIT|ERR|WARNING|NOTICE|INFO|STARTUP|DEBUG)$";
+identifier fn =~ "^ssl_log_(r|c)xerror$";
+
+@@
+ fn( SSLLOG_MARK ,
+(
+ level
+|
+ level|APLOG_NOERRNO
+|
+ level|APLOG_STARTUP
+)
+ ,rv, rc , cert
++ , APLOGNO()
+ ,format, ...)
+
+
storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shm",
AP_SLOTMEM_PROVIDER_VERSION);
if (!storage) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02284)
"failed to lookup provider 'shm' for '%s', "
"maybe you need to load mod_slotmem_shm?",
AP_SLOTMEM_PROVIDER_GROUP);
}
storage->create(&slotmem, "mod_heartmonitor", sizeof(hm_slot_server_t), maxworkers, AP_SLOTMEM_TYPE_PREGRAB, p);
if (!slotmem) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, "slotmem_create for status failed");
+ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02285)
+ "slotmem_create for status failed");
return !OK;
}
}
static void example_log_each(apr_pool_t *p, server_rec *s, const char *note)
{
if (s != NULL) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02062) "mod_example: %s",
- note);
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "mod_example: %s", note);
} else {
apr_file_t *out = NULL;
apr_file_open_stderr(&out, p);
*/
rs = apr_temp_dir_get(&tempdir, pconf);
if (APR_SUCCESS != rs) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rs, s, APLOGNO(02063)
+ ap_log_error(APLOG_MARK, APLOG_ERR, rs, s,
"Failed to find temporary directory");
return HTTP_INTERNAL_SERVER_ERROR;
}
rs = apr_shm_create(&exipc_shm, sizeof(exipc_data),
(const char *) shmfilename, pconf);
if (APR_SUCCESS != rs) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rs, s, APLOGNO(02064)
+ ap_log_error(APLOG_MARK, APLOG_ERR, rs, s,
"Failed to create shared memory segment on file %s",
shmfilename);
return HTTP_INTERNAL_SERVER_ERROR;
apr_global_mutex_lockfile(exipc_mutex),
p);
if (APR_SUCCESS != rs) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, rs, s, APLOGNO(02065)
+ ap_log_error(APLOG_MARK, APLOG_CRIT, rs, s,
"Failed to reopen mutex %s in child",
exipc_mutex_type);
/* There's really nothing else we can do here, since This
break; /* Out of the loop */
} else {
/* Some error, log and bail */
- ap_log_error(APLOG_MARK, APLOG_ERR, rs, r->server, APLOGNO(02066)
+ ap_log_error(APLOG_MARK, APLOG_ERR, rs, r->server,
"Child %ld failed to acquire lock",
(long int)getpid());
break; /* Out of the loop without having the lock */
}
} else {
/* Some other error, log and bail */
- ap_log_error(APLOG_MARK, APLOG_ERR, rs, r->server, APLOGNO(02067)
+ ap_log_error(APLOG_MARK, APLOG_ERR, rs, r->server,
"Child %ld failed to try and acquire lock",
(long int)getpid());
break; /* Out of the loop without having the lock */
storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shm",
AP_SLOTMEM_PROVIDER_VERSION);
if (!storage) {
- ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(02281)
"Failed to lookup provider 'shm' for '%s'. Maybe you "
"need to load mod_slotmem_shm?",
AP_SLOTMEM_PROVIDER_GROUP);
/* Try to use a slotmem created by mod_heartmonitor */
storage->attach(&hm_serversmem, "mod_heartmonitor", &size, &num, p);
if (!hm_serversmem)
- ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(02282)
"No slotmem from mod_heartmonitor");
else
- ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(02283)
"Using slotmem from mod_heartmonitor");
if (hm_serversmem)
if (X509_verify_cert(sctx) != 1) {
int err = X509_STORE_CTX_get_error(sctx);
ssl_log_xerror(SSLLOG_MARK, APLOG_WARNING, 0, ptemp, s, inf->x509,
- "SSL proxy client cert chain verification failed: %s :",
- X509_verify_cert_error_string(err));
+ APLOGNO(02270) "SSL proxy client cert chain "
+ "verification failed: %s :",
+ X509_verify_cert_error_string(err));
}
/* Clear X509_verify_cert errors */
}
ssl_log_xerror(SSLLOG_MARK, APLOG_DEBUG, 0, ptemp, s, inf->x509,
- "loaded %i intermediate CA%s for cert %i: ",
- i, i == 1 ? "" : "s", n);
+ APLOGNO(02271)
+ "loaded %i intermediate CA%s for cert %i: ",
+ i, i == 1 ? "" : "s", n);
if (i > 0) {
int j;
for (j = 0; j < i; j++) {
* Log verification information
*/
ssl_log_cxerror(SSLLOG_MARK, APLOG_DEBUG, 0, conn,
- X509_STORE_CTX_get_current_cert(ctx),
+ X509_STORE_CTX_get_current_cert(ctx), APLOGNO(02275)
"Certificate Verification, depth %d, "
"CRL checking mode: %s", errdepth,
mctx->crl_check_mode == SSL_CRLCHECK_CHAIN ?
if (!ok) {
if (APLOGcinfo(conn)) {
ssl_log_cxerror(SSLLOG_MARK, APLOG_INFO, 0, conn,
- X509_STORE_CTX_get_current_cert(ctx),
+ X509_STORE_CTX_get_current_cert(ctx), APLOGNO(02276)
"Certificate Verification: Error (%d): %s",
errnum, X509_verify_cert_error_string(errnum));
} else {
X509_INFO *info,
const char *msg)
{
- ssl_log_cxerror(SSLLOG_MARK, APLOG_DEBUG, 0, c, info->x509,
+ ssl_log_cxerror(SSLLOG_MARK, APLOG_DEBUG, 0, c, info->x509, APLOGNO(02277)
SSLPROXY_CERT_CB_LOG_FMT "%s, sending",
(mySrvConfigFromConn(c))->vhost_id, msg);
}
*/
info = sk_X509_INFO_value(certs, 0);
- modssl_proxy_info_log(c, info, "no acceptable CA list");
+ modssl_proxy_info_log(c, info, APLOGNO(02278) "no acceptable CA list");
modssl_set_cert_info(info, x509, pkey);
/* Search certs (by issuer name) one by one*/
if (X509_NAME_cmp(issuer, ca_name) == 0) {
- modssl_proxy_info_log(c, info, "found acceptable cert");
+ modssl_proxy_info_log(c, info, APLOGNO(02279)
+ "found acceptable cert");
modssl_set_cert_info(info, x509, pkey);
ca_issuer = X509_get_issuer_name(ca_cert);
if(X509_NAME_cmp(ca_issuer, ca_name) == 0 ) {
- modssl_proxy_info_log(c, info, "found acceptable cert by intermediate CA");
+ modssl_proxy_info_log(c, info, APLOGNO(02280)
+ "found acceptable cert by intermediate CA");
modssl_set_cert_info(info, x509, pkey);
annotation = ssl_log_annotation(err);
ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, s,
- APLOGNO(02021) "SSL Library Error: %s%s%s%s%s%s",
+ "SSL Library Error: %s%s%s%s%s%s",
/* %s */
err,
/* %s%s%s */
*/
int maxdnlen = (HUGE_STRING_LEN - msglen - 300) / 2;
- BIO_puts(bio, APLOGNO(02022) " [subject: ");
+ BIO_puts(bio, " [subject: ");
name = SSL_X509_NAME_to_string(p, X509_get_subject_name(cert),
maxdnlen);
if (!strIsEmpty(name)) {
}
else {
apr_snprintf(buf + msglen, sizeof buf - msglen,
- APLOGNO(02023) " [certificate: -not available-]");
+ " [certificate: -not available-]");
}
if (r) {
&reason, NULL, &thisup, &nextup);
if (rc != 1) {
ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
- ssl_log_cxerror(SSLLOG_MARK, APLOG_ERR, 0, c, cert,
+ ssl_log_cxerror(SSLLOG_MARK, APLOG_ERR, 0, c, cert, APLOGNO(02272)
"failed to retrieve OCSP response status");
rc = V_OCSP_CERTSTATUS_UNKNOWN;
}
sc->server->ocsp_resp_maxage);
if (vrc != 1) {
ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
- ssl_log_cxerror(SSLLOG_MARK, APLOG_ERR, 0, c, cert,
+ ssl_log_cxerror(SSLLOG_MARK, APLOG_ERR, 0, c, cert, APLOGNO(02273)
"OCSP response outside validity period");
rc = V_OCSP_CERTSTATUS_UNKNOWN;
}
p7 = PEM_read_PKCS7(f, NULL, NULL, NULL);
if (!p7) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(02274)
"Can't read PKCS7 object %s", pkcs7);
ssl_log_ssl_error(SSLLOG_MARK, APLOG_CRIT, s);
exit(1);