SSLConnRec *sslconn = ssl_init_connection_ctx(c);
if (!sc->proxy_enabled) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, c->base_server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, c->base_server,
"SSL Proxy requested for %s but not enabled "
"[Hint: SSLProxyEngine]", sc->vhost_id);
* later access inside callback functions
*/
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, c->base_server,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, c->base_server,
"Connection to child %ld established "
"(server %s, client %s)", c->id, sc->vhost_id,
c->remote_ip ? c->remote_ip : "unknown");
* so we can detach later.
*/
if (!(ssl = SSL_new(mctx->ssl_ctx))) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, c->base_server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, c->base_server,
"Unable to create a new SSL connection from the SSL "
"context");
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, c->base_server);
if (!SSL_set_session_id_context(ssl, (unsigned char *)vhost_md5,
MD5_DIGESTSIZE*2))
{
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, c->base_server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, c->base_server,
"Unable to set session id context to `%s'", vhost_md5);
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, c->base_server);
if (!SSL_is_init_finished(filter->pssl)) {
if (sslconn->is_proxy) {
if ((n = SSL_connect(filter->pssl)) <= 0) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0,
c->base_server,
"SSL Proxy connect failed");
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, c->base_server);
* was transferred. That's not a real error and can occur
* sporadically with some clients.
*/
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0,
c->base_server,
"SSL handshake stopped: connection was closed");
}
(errno != EINTR))
{
if (errno > 0) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0,
c->base_server,
"SSL handshake interrupted by system "
"[Hint: Stop button pressed in browser?!]");
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, c->base_server);
}
else {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0,
c->base_server,
"Spurious SSL handshake interrupt [Hint: "
"Usually just one of those OpenSSL "
/*
* Ok, anything else is a fatal error
*/
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0,
c->base_server,
"SSL handshake failed (server %s, client %s)",
ssl_util_vhostid(c->pool, c->base_server),
* optional_no_ca doesn't appear to work as advertised
* in 1.x
*/
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0,
c->base_server,
"SSL client authentication failed, "
"accepting certificate based on "
sslconn->verify_error :
X509_verify_cert_error_string(verify_result);
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0,
c->base_server,
"SSL client authentication failed: %s",
error ? error : "unknown");
if ((sc->server->auth.verify_mode == SSL_CVERIFY_REQUIRE) &&
!sslconn->client_cert)
{
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, c->base_server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, c->base_server,
"No acceptable peer certificate available");
return ssl_abort(filter, c);
version_components[i]);
}
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Server: %s, Interface: %s, Library: %s",
AP_SERVER_BASEVERSION,
vals[1], /* SSL_VERSION_INTERFACE */
*/
static void ssl_init_SSLLibrary(server_rec *s)
{
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Init: Initializing %s library", SSL_LIBRARY_NAME);
CRYPTO_malloc_init();
if (!(mc->pTmpKeys[idx] =
RSA_generate_key(bits, RSA_F4, NULL, NULL)))
{
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Init: Failed to generate temporary "
"%d bit RSA private key", bits);
ssl_die();
if (!(mc->pTmpKeys[idx] =
ssl_dh_GetTmpParam(bits)))
{
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Init: Failed to generate temporary "
"%d bit DH parameters", bits);
ssl_die();
static void ssl_tmp_keys_init(server_rec *s)
{
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Init: Generating temporary RSA private keys (512/1024 bits)");
MODSSL_TMP_KEY_INIT_RSA(s, 512);
MODSSL_TMP_KEY_INIT_RSA(s, 1024);
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Init: Generating temporary DH parameters (512/1024 bits)");
MODSSL_TMP_KEY_INIT_DH(s, 512);
/*
* initialize servers
*/
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, base_server,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, base_server,
"Init: Initializing (virtual) servers for SSL");
for (s = base_server; s; s = s->next) {
if (mc->szCryptoDevice) {
if (!(e = ENGINE_by_id(mc->szCryptoDevice))) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Init: Failed to load Crypto Device API `%s'",
mc->szCryptoDevice);
ssl_die();
}
if (!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Init: Failed to enable Crypto Device API `%s'",
mc->szCryptoDevice);
ssl_die();
* possibility that the user forgot to set them.
*/
if (!mctx->pks->cert_files[0]) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"No SSL Certificate set [hint: SSLCertificateFile]");
ssl_die();
}
if (mctx->pks->certs[SSL_AIDX_RSA] ||
mctx->pks->certs[SSL_AIDX_DSA])
{
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Illegal attempt to re-initialise SSL for server "
"(theoretically shouldn't happen!)");
ssl_die();
* Create the new per-server SSL context
*/
if (protocol == SSL_PROTOCOL_NONE) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"No SSL protocols available [hint: SSLProtocol]");
ssl_die();
}
NULL);
cp[strlen(cp)-2] = NUL;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"Creating new SSL context (protocols: %s)", cp);
if (protocol == SSL_PROTOCOL_SSLV2) {
* Configure Client Authentication details
*/
if (mctx->auth.ca_cert_file || mctx->auth.ca_cert_path) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"Configuring client authentication");
if (!SSL_CTX_load_verify_locations(ctx,
mctx->auth.ca_cert_file,
mctx->auth.ca_cert_path))
{
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Unable to configure verify locations "
"for client authentication");
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, s);
mctx->auth.ca_cert_file,
mctx->auth.ca_cert_path);
if (!ca_list) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Unable to determine list of available "
"CA certificates for client authentication");
ssl_die();
ca_list = (STACK_OF(X509_NAME) *)SSL_CTX_get_client_CA_list(ctx);
if (sk_X509_NAME_num(ca_list) == 0) {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
"Init: Oops, you want to request client "
"authentication, but no CAs are known for "
"verification!? [Hint: SSLCACertificate*]");
return;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"Configuring permitted SSL ciphers [%s]",
suite);
if (!SSL_CTX_set_cipher_list(ctx, suite)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Unable to configure permitted SSL ciphers");
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, s);
ssl_die();
return;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"Configuring certificate revocation facility");
mctx->crl =
(char *)mctx->crl_path);
if (!mctx->crl) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Unable to configure X.509 CRL storage "
"for certificate revocation");
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, s);
(char *)chain,
skip_first, NULL);
if (n < 0) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Failed to configure CA certificate chain!");
ssl_die();
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"Configuring server certificate chain "
"(%d CA certificate%s)",
n, n == 1 ? "" : "s");
return FALSE;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"Configuring %s server certificate", type);
ptr = asn1->cpData;
if (!(cert = d2i_X509(NULL, &ptr, asn1->nData))) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Unable to import %s server certificate", type);
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, s);
ssl_die();
}
if (SSL_CTX_use_certificate(mctx->ssl_ctx, cert) <= 0) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Unable to configure %s server certificate", type);
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, s);
ssl_die();
return FALSE;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"Configuring %s server private key", type);
ptr = asn1->cpData;
if (!(pkey = d2i_PrivateKey(pkey_type, NULL, &ptr, asn1->nData)))
{
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Unable to import %s server private key", type);
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, s);
ssl_die();
}
if (SSL_CTX_use_PrivateKey(mctx->ssl_ctx, pkey) <= 0) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Unable to configure %s server private key", type);
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, s);
ssl_die();
if (pubkey && EVP_PKEY_missing_parameters(pubkey)) {
EVP_PKEY_copy_parameters(pubkey, pkey);
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Copying DSA parameters from private key to certificate");
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, s);
}
*/
if (SSL_X509_isSGC(cert)) {
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"%s server certificate enables "
"Server Gated Cryptography (SGC)",
ssl_asn1_keystr(type));
if (SSL_X509_getBC(cert, &is_ca, &pathlen)) {
if (is_ca) {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
"%s server certificate is a CA certificate "
"(BasicConstraints: CA == TRUE !?)",
ssl_asn1_keystr(type));
}
if (pathlen > 0) {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
"%s server certificate is not a leaf certificate "
"(BasicConstraints: pathlen == %d > 0 !?)",
ssl_asn1_keystr(type), pathlen);
(apr_fnmatch(cn, s->server_hostname,
fnm_flags) == FNM_NOMATCH))
{
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
"%s server certificate wildcard CommonName (CN) `%s' "
"does NOT match server name!?",
ssl_asn1_keystr(type), cn);
}
else if (strNE(s->server_hostname, cn)) {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
"%s server certificate CommonName (CN) `%s' "
"does NOT match server name!?",
ssl_asn1_keystr(type), cn);
have_dsa = ssl_server_import_cert(s, mctx, dsa_id, SSL_AIDX_DSA);
if (!(have_rsa || have_dsa)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Oops, no RSA or DSA server certificate found?!");
ssl_die();
}
have_dsa = ssl_server_import_key(s, mctx, dsa_id, SSL_AIDX_DSA);
if (!(have_rsa || have_dsa)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Oops, no RSA or DSA server private key found?!");
ssl_die();
}
}
if ((ncerts = sk_X509_INFO_num(sk)) > 0) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"loaded %d client certs for SSL proxy",
ncerts);
pkp->certs = sk;
}
else {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
"no client certs found for SSL proxy");
sk_X509_INFO_free(sk);
}
SSLSrvConfigRec *sc)
{
if (sc->enabled) {
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Configuring server for SSL protocol");
ssl_init_server_ctx(s, p, ptemp, sc);
}
sc = mySrvConfig(s);
if (sc->enabled && (s->port == DEFAULT_HTTP_PORT)) {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
base_server,
"Init: (%s) You configured HTTPS(%d) "
"on the standard HTTP(%d) port!",
}
if (!sc->enabled && (s->port == DEFAULT_HTTPS_PORT)) {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
base_server,
"Init: (%s) You configured HTTP(%d) "
"on the standard HTTPS(%d) port!",
klen = strlen(key);
if ((ps = (server_rec *)apr_hash_get(table, key, klen))) {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
base_server,
"Init: SSL server IP/port conflict: "
"%s (%s:%d) vs. %s (%s:%d)",
}
if (conflict) {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, base_server,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server,
"Init: You should not use name-based "
"virtual hosts in conjunction with SSL!!");
}
char name_buf[256];
X509_NAME *name = sk_X509_NAME_value(sk, n);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"CA certificate: %s",
X509_NAME_oneline(name, name_buf, sizeof(name_buf)));
* Log SSL errors
*/
conn_rec *c = (conn_rec *)SSL_get_app_data(ssl);
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, c->base_server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, c->base_server,
"SSL error on reading data");
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, c->base_server);
}
* Log SSL errors
*/
conn_rec *c = (conn_rec *)SSL_get_app_data(ssl);
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, c->base_server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, c->base_server,
"SSL error on writing data");
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, c->base_server);
}
reason = "likely due to failed renegotiation";
}
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, c->base_server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, c->base_server,
"failed to write %d of %d bytes (%s)",
n > 0 ? len - n : len, len, reason);
switch (status) {
case HTTP_BAD_REQUEST:
/* log the situation */
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0,
f->c->base_server,
"SSL handshake failed: HTTP spoken on HTTPS port; "
"trying to send HTML error page");
rows = (len / DUMP_WIDTH);
if ((rows * DUMP_WIDTH) < len)
rows++;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, srvr,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, srvr,
"+-------------------------------------------------------------------------+");
for(i = 0 ; i< rows; i++) {
apr_snprintf(tmp, sizeof(tmp), "| %04x: ", i * DUMP_WIDTH);
}
}
apr_cpystrn(buf+strlen(buf), " |", sizeof(buf)-strlen(buf));
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, srvr,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, srvr,
"%s", buf);
}
if (trunc > 0)
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, srvr,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, srvr,
"| %04ld - <SPACES/NULS>", len + trunc);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, srvr,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, srvr,
"+-------------------------------------------------------------------------+");
return;
}
if ( cmd == (BIO_CB_WRITE|BIO_CB_RETURN)
|| cmd == (BIO_CB_READ |BIO_CB_RETURN) ) {
if (rc >= 0) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"%s: %s %ld/%d bytes %s BIO#%p [mem: %p] %s",
SSL_LIBRARY_NAME,
(cmd == (BIO_CB_WRITE|BIO_CB_RETURN) ? "write" : "read"),
ssl_io_data_dump(s, argp, rc);
}
else {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"%s: I/O error, %d bytes expected to %s on BIO#%p [mem: %p]",
SSL_LIBRARY_NAME, argi,
(cmd == (BIO_CB_WRITE|BIO_CB_RETURN) ? "write" : "read"),
/* and finally log the fact that we've closed the connection */
if (conn->base_server->loglevel >= APLOG_INFO) {
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, conn->base_server,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, conn->base_server,
"Connection to child %ld closed with %s shutdown"
"(server %s, client %s)",
conn->id, type,
* Log information about incoming HTTPS requests
*/
if (r->server->loglevel >= APLOG_INFO && ap_is_initial_req(r)) {
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
"%s HTTPS request received for child %ld (server %s)",
(r->connection->keepalives <= 0 ?
"Initial (No.1)" :
* Support for SSLRequireSSL directive
*/
if (dc->bSSLRequired && !ssl) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"access to %s failed, reason: %s",
r->filename, "SSL connection required");
/* configure new state */
if (!modssl_set_cipher_list(ssl, dc->szCipherSuite)) {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
r->server,
"Unable to reconfigure (per-directory) "
"permitted SSL ciphers");
/* tracing */
if (renegotiate) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"Reconfigured cipher suite will force renegotiation");
}
}
/* determine whether a renegotiation has to be forced */
if (dc->nVerifyDepth < n) {
renegotiate = TRUE;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"Reduced client verification depth will force "
"renegotiation");
}
renegotiate_quick = TRUE;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
r->server,
"Changed client verification type will force "
"%srenegotiation",
cert_store = X509_STORE_new();
if (!X509_STORE_load_locations(cert_store, ca_file, ca_path)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"Unable to reconfigure verify locations "
"for client authentication");
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, r->server);
if (!(ca_list = ssl_init_FindCAList(r->server, r->pool,
ca_file, ca_path)))
{
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"Unable to determine list of available "
"CA certificates for client authentication");
SSL_set_client_CA_list(ssl, ca_list);
renegotiate = TRUE;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"Changed client verification locations will force "
"renegotiation");
}
* !! BUT ALL THIS IS STILL NOT RE-IMPLEMENTED FOR APACHE 2.0 !!
*/
if (renegotiate && (r->method_number == M_POST)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"SSL Re-negotiation in conjunction "
"with POST method not supported!");
* here because it resets too much of the connection. So we set the
* state explicitly and continue the handshake manually.
*/
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
"Requesting connection re-negotiation");
if (renegotiate_quick) {
STACK_OF(X509) *cert_stack;
/* perform just a manual re-verification of the peer */
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"Performing quick renegotiation: "
"just re-verifying the peer");
cert_stack = (STACK_OF(X509) *)SSL_get_peer_cert_chain(ssl);
if (!cert_stack || (sk_X509_num(cert_stack) == 0)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"Cannot find peer certificate chain");
return HTTP_FORBIDDEN;
if (!(cert_store ||
(cert_store = SSL_CTX_get_cert_store(ctx))))
{
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"Cannot find certificate storage");
return HTTP_FORBIDDEN;
(char *)ssl);
if (!modssl_X509_verify_cert(&cert_store_ctx)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"Re-negotiation verification step failed");
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, r->server);
}
request_rec *id = r->main ? r->main : r;
/* do a full renegotiation */
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"Performing full renegotiation: "
"complete handshake protocol");
SSL_do_handshake(ssl);
if (SSL_get_state(ssl) != SSL_ST_OK) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"Re-negotiation request failed");
return HTTP_FORBIDDEN;
}
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
"Awaiting re-negotiation handshake");
SSL_set_state(ssl, SSL_ST_ACCEPT);
SSL_do_handshake(ssl);
if (SSL_get_state(ssl) != SSL_ST_OK) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"Re-negotiation handshake failed: "
"Not accepted by client!?");
BOOL do_verify = (dc->nVerifyClient == SSL_CVERIFY_REQUIRE);
if (do_verify && (SSL_get_verify_result(ssl) != X509_V_OK)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"Re-negotiation handshake failed: "
"Client verification failed");
}
if (do_verify && !SSL_get_peer_certificate(ssl)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
"Re-negotiation handshake failed: "
"Client certificate missing");
"SSL requirement expression: %s",
ssl_expr_get_error());
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"access to %s failed, reason: %s",
r->filename, cp);
}
if (ok != 1) {
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
"Access to %s denied for %s "
"(requirement expression not fulfilled)",
r->filename, r->connection->remote_ip);
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
"Failed expression: %s", req->cpExpr);
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"access to %s failed, reason: %s",
r->filename,
"SSL requirement expression not fulfilled "
apr_snprintf(buf1, sizeof(buf1), "Basic %s", buf2);
apr_table_set(r->headers_in, "Authorization", buf1);
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
"Faking HTTP Basic Auth header: \"Authorization: %s\"", buf1);
return DECLINED;
SSLModConfigRec *mc = myModConfig(c->base_server);
int idx;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, c->base_server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, c->base_server,
"handing out temporary %d bit RSA key", keylen);
/* doesn't matter if export flag is on,
SSLModConfigRec *mc = myModConfig(c->base_server);
int idx;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, c->base_server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, c->base_server,
"handing out temporary %d bit DH key", keylen);
switch (keylen) {
char *sname = X509_NAME_oneline(X509_get_subject_name(cert), NULL, 0);
char *iname = X509_NAME_oneline(X509_get_issuer_name(cert), NULL, 0);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"Certificate Verification: "
"depth: %d, subject: %s, issuer: %s",
errdepth,
if (ssl_verify_error_is_optional(errnum) &&
(verify == SSL_CVERIFY_OPTIONAL_NO_CA))
{
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"Certificate Verification: Verifiable Issuer is "
"configured as optional, therefore we're accepting "
"the certificate");
* If we already know it's not ok, log the real reason
*/
if (!ok) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Certificate Verification: Error (%d): %s",
errnum, X509_verify_cert_error_string(errnum));
}
if (errdepth > depth) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Certificate Verification: Certificate Chain too long "
"(chain has %d certificates, but maximum allowed are "
"only %d)",
BIO_free(bio);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s, buff);
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, buff);
}
/*
* Verify the signature on this CRL
*/
if (X509_CRL_verify(crl, X509_get_pubkey(cert)) <= 0) {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
"Invalid signature on CRL");
X509_STORE_CTX_set_error(ctx, X509_V_ERR_CRL_SIGNATURE_FAILURE);
i = X509_cmp_current_time(X509_CRL_get_nextUpdate(crl));
if (i == 0) {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
"Found CRL has invalid nextUpdate field");
X509_STORE_CTX_set_error(ctx,
}
if (i < 0) {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
"Found CRL is expired - "
"revoking all certificates until you get updated CRL");
char *cp = X509_NAME_oneline(issuer, NULL, 0);
long serial = ASN1_INTEGER_get(sn);
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Certificate with serial %ld (0x%lX) "
"revoked per CRL from issuer %s",
serial, serial, cp);
name = X509_get_subject_name(info->x509);
dn = X509_NAME_oneline(name, name_buf, sizeof(name_buf));
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
SSLPROXY_CERT_CB_LOG_FMT "%s, sending %s",
sc->vhost_id, msg, dn ? dn : "-uknown-");
}
STACK_OF(X509_INFO) *certs = sc->proxy->pkp->certs;
int i, j;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
SSLPROXY_CERT_CB_LOG_FMT "entered",
sc->vhost_id);
if (!certs || (sk_X509_INFO_num(certs) <= 0)) {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
SSLPROXY_CERT_CB_LOG_FMT
"downstream server wanted client certificate "
"but none are configured", sc->vhost_id);
}
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
SSLPROXY_CERT_CB_LOG_FMT
"no client certificate found!?", sc->vhost_id);
"timeout=%lds ", (timeout - time(NULL)));
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"Inter-Process Session Cache: "
"request=%s status=%s id=%s %s(session %s)",
request, status,
*/
if (s->loglevel >= APLOG_DEBUG) {
if (where & SSL_CB_HANDSHAKE_START) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"%s: Handshake: start", SSL_LIBRARY_NAME);
}
else if (where & SSL_CB_HANDSHAKE_DONE) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"%s: Handshake: done", SSL_LIBRARY_NAME);
}
else if (where & SSL_CB_LOOP) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"%s: Loop: %s",
SSL_LIBRARY_NAME, SSL_state_string_long(ssl));
}
else if (where & SSL_CB_READ) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"%s: Read: %s",
SSL_LIBRARY_NAME, SSL_state_string_long(ssl));
}
else if (where & SSL_CB_WRITE) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"%s: Write: %s",
SSL_LIBRARY_NAME, SSL_state_string_long(ssl));
}
else if (where & SSL_CB_ALERT) {
char *str = (where & SSL_CB_READ) ? "read" : "write";
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"%s: Alert: %s:%s:%s\n",
SSL_LIBRARY_NAME, str,
SSL_alert_type_string_long(rc),
}
else if (where & SSL_CB_EXIT) {
if (rc == 0) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"%s: Exit: failed in %s",
SSL_LIBRARY_NAME, SSL_state_string_long(ssl));
}
else if (rc < 0) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"%s: Exit: error in %s",
SSL_LIBRARY_NAME, SSL_state_string_long(ssl));
}
* right after a finished handshake.
*/
if (where & SSL_CB_HANDSHAKE_DONE) {
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Connection: Client IP: %s, Protocol: %s, "
"Cipher: %s (%s/%s bits)",
ssl_var_lookup(NULL, s, c, NULL, "REMOTE_ADDR"),
annotation = ssl_log_annotation(err);
if (annotation) {
- ap_log_error(file, line, level|APLOG_NOERRNO, 0, s,
+ ap_log_error(file, line, level, 0, s,
"SSL Library Error: %ld %s %s",
e, err, annotation);
}
else {
- ap_log_error(file, line, level|APLOG_NOERRNO, 0, s,
+ ap_log_error(file, line, level, 0, s,
"SSL Library Error: %ld %s",
e, err);
}
continue;
cpVHostID = ssl_util_vhostid(p, pServ);
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, pServ,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, pServ,
"Loading certificate & private key of SSL-aware server");
/*
* because this file isn't encrypted in any way.
*/
if (sc->server->pks->cert_files[0] == NULL) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, pServ,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, pServ,
"Server should be SSL-aware but has no certificate "
"configured [Hint: SSLCertificateFile]");
ssl_die();
ssl_die();
}
if ((pX509Cert = SSL_read_X509(szPath, NULL, NULL)) == NULL) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Init: Unable to read server certificate from file %s", szPath);
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, s);
ssl_die();
at = ssl_util_algotypeof(pX509Cert, NULL);
an = ssl_util_algotypestr(at);
if (algoCert & at) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Init: Multiple %s server certificates not "
"allowed", an);
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, s);
ssl_asn1_table_get(mc->tPrivateKey, key_id);
if (asn1 && (asn1->source_mtime == pkey_mtime)) {
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO,
+ ap_log_error(APLOG_MARK, APLOG_INFO,
0, pServ,
"%s reusing existing "
"%s private key on restart",
}
#ifdef WIN32
if (sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Init: PassPhraseDialog BuiltIn not "
"supported in server private key from file "
"%s", szPath);
if (nPassPhraseDialogCur && pkey_mtime &&
!(isterm = isatty(fileno(stdout)))) /* XXX: apr_isatty() */
{
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0,
pServ,
"Init: Unable to read pass phrase "
"[Hint: key introduced or changed "
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, pServ);
}
else {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0,
pServ, "Init: Private key not found");
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, pServ);
}
}
}
else {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0,
pServ, "Init: Pass phrase incorrect");
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, pServ);
}
if (pPrivateKey == NULL) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Init: Unable to read server private key from "
"file %s [Hint: Perhaps it is in a separate file? "
" See SSLCertificateKeyFile]", szPath);
at = ssl_util_algotypeof(NULL, pPrivateKey);
an = ssl_util_algotypestr(at);
if (algoKey & at) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Init: Multiple %s server private keys not "
"allowed", an);
ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, s);
* Log the type of reading
*/
if (nPassPhraseDialogCur == 0) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, pServ,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, pServ,
"unencrypted %s private key - pass phrase not "
"required", an);
}
else {
if (cpPassPhraseCur != NULL) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
pServ,
"encrypted %s private key - pass phrase "
"requested", an);
}
else {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
pServ,
"encrypted %s private key - pass phrase"
" reused", an);
*/
if (aPassPhrase->nelts) {
pphrase_array_clear(aPassPhrase);
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Init: Wiped out the queried pass phrases from memory");
}
if (sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE) {
if (!readtty) {
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Init: Creating pass phrase dialog pipe child "
"'%s'", sc->server->pphrase_dialog_path);
if (ssl_pipe_child_create(p, sc->server->pphrase_dialog_path)
!= APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Init: Failed to create pass phrase pipe '%s'",
sc->server->pphrase_dialog_path);
PEMerr(PEM_F_DEF_CALLBACK,PEM_R_PROBLEMS_GETTING_PASSWORD);
return (-1);
}
}
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Init: Requesting pass phrase via piped dialog");
}
else { /* sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN */
*/
apr_file_open_stdout(&writetty, p);
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Init: Requesting pass phrase via builtin terminal "
"dialog");
#endif
const char **argv = apr_palloc(p, sizeof(char *) * 4);
char *result;
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Init: Requesting pass phrase from dialog filter "
"program (%s)", cmd);
}
}
}
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"%sSeeding PRNG with %d bytes of entropy", prefix, nDone);
if (RAND_status() == 0)
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
"%sPRNG still contains not sufficient entropy!", prefix);
return nDone;
* But we can operate without it, of course.
*/
if (mc->nSessionCacheMode == SSL_SCMODE_UNSET) {
- ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
"Init: Session Cache is not configured "
"[hint: SSLSessionCache]");
mc->nSessionCacheMode = SSL_SCMODE_NONE;
/* for the DBM we need the data file */
if (mc->szSessionCacheDataFile == NULL) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"SSLSessionCache required");
ssl_die();
}
}
ssl_mutex_off(s);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"Inter-Process Session Cache (DBM) Expiry: "
"old: %d, new: %d, removed: %d",
nElements, nElements-nDeleted, nDeleted);
* Create shared memory segment
*/
if (mc->szSessionCacheDataFile == NULL) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"SSLSessionCache required");
ssl_die();
}
mc->szSessionCacheDataFile,
mc->pPool)) != APR_SUCCESS) {
char buf[100];
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Cannot allocate shared memory: (%d)%s", rv,
apr_strerror(rv, buf, sizeof(buf)));
ssl_die();
shm_segment = apr_shm_baseaddr_get(mc->pSessionCacheDataMM);
shm_segsize = apr_shm_size_get(mc->pSessionCacheDataMM);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"shmcb_init allocated %u bytes of shared memory",
shm_segsize);
if (!shmcb_init_memory(s, shm_segment, shm_segsize)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Failure initialising 'shmcb' shared memory");
ssl_die();
}
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Shared memory session cache initialised");
/*
ssl_mutex_on(s);
if (!shmcb_store_session(s, shm_segment, id, idlen, pSession, timeout))
/* in this cache engine, "stores" should never fail. */
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"'shmcb' code was unable to store a "
"session in the cache.");
else {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"shmcb_store successful");
to_return = TRUE;
}
pSession = shmcb_retrieve_session(s, shm_segment, id, idlen);
ssl_mutex_off(s);
if (pSession)
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"shmcb_retrieve had a hit");
else {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"shmcb_retrieve had a miss");
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Client requested a 'session-resume' but "
"we have no such session.");
}
double expiry_total;
time_t average_expiry, now, max_expiry, min_expiry, idxexpiry;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"inside ssl_scache_shmcb_status");
/* We've kludged our pointer into the other cache's member variable. */
func(apr_psprintf(p, "total removes since starting: <b>%lu</b> hit, "
"<b>%lu</b> miss<br>", header->num_removes_hit,
header->num_removes_miss), arg);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"leaving shmcb_status");
return;
}
SHMCBCache cache;
unsigned int temp, loop, granularity;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"entered shmcb_init_memory()");
/* Calculate some sizes... */
/* If the segment is ridiculously too small, bail out */
if (shm_mem_size < (2*temp)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"shared memory segment too small");
return FALSE;
}
* the cache is full, which is a lot less stupid than having
* having not enough index space to utilise the whole cache!. */
temp /= 120;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"for %u bytes, recommending %u indexes",
shm_mem_size, temp);
/* Too small? Bail ... */
if (temp < 5) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"shared memory segment too small");
return FALSE;
}
header->queue_size - header->cache_data_offset;
/* Output trace info */
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"shmcb_init_memory choices follow");
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"division_mask = 0x%02X", header->division_mask);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"division_offset = %u", header->division_offset);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"division_size = %u", header->division_size);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"queue_size = %u", header->queue_size);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"index_num = %u", header->index_num);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"index_offset = %u", header->index_offset);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"index_size = %u", header->index_size);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"cache_data_offset = %u", header->cache_data_offset);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"cache_data_size = %u", header->cache_data_size);
/* The header is done, make the caches empty */
for (loop = 0; loop < granularity; loop++) {
if (!shmcb_get_division(header, &queue, &cache, loop))
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s, "shmcb_init_memory, " "internal error");
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "shmcb_init_memory, " "internal error");
shmcb_set_safe_uint(cache.first_pos, 0);
shmcb_set_safe_uint(cache.pos_count, 0);
shmcb_set_safe_uint(queue.first_pos, 0);
shmcb_set_safe_uint(queue.pos_count, 0);
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"leaving shmcb_init_memory()");
return TRUE;
}
time_t expiry_time;
unsigned char *session_id = SSL_SESSION_get_session_id(pSession);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"inside shmcb_store_session");
/* Get the header structure, which division this session will fall into etc. */
shmcb_get_header(shm_segment, &header);
masked_index = session_id[0] & header->division_mask;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"session_id[0]=%u, masked index=%u",
session_id[0], masked_index);
if (!shmcb_get_division(header, &queue, &cache, (unsigned int)masked_index)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"shmcb_store_session internal error");
return FALSE;
}
* or we find some assurance that it will never be necessary. */
len_encoded = i2d_SSL_SESSION(pSession, NULL);
if (len_encoded > SSL_SESSION_MAX_DER) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"session is too big (%u bytes)", len_encoded);
return FALSE;
}
if (!shmcb_insert_encoded_session(s, &queue, &cache, encoded,
len_encoded, session_id,
expiry_time)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"can't store a session!");
return FALSE;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"leaving shmcb_store successfully");
header->num_stores++;
return TRUE;
unsigned char masked_index;
SSL_SESSION *pSession;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"inside shmcb_retrieve_session");
if (idlen < 2) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s, "unusably short session_id provided "
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "unusably short session_id provided "
"(%u bytes)", idlen);
return FALSE;
}
* will come from etc. */
shmcb_get_header(shm_segment, &header);
masked_index = id[0] & header->division_mask;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"id[0]=%u, masked index=%u", id[0], masked_index);
if (!shmcb_get_division(header, &queue, &cache, (unsigned int) masked_index)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"shmcb_retrieve_session internal error");
header->num_retrieves_miss++;
return FALSE;
header->num_retrieves_hit++;
else
header->num_retrieves_miss++;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"leaving shmcb_retrieve_session");
return pSession;
}
unsigned char masked_index;
BOOL res;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"inside shmcb_remove_session");
if (id == NULL) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s, "remove called with NULL session_id!");
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "remove called with NULL session_id!");
return FALSE;
}
* will happen in etc. */
shmcb_get_header(shm_segment, &header);
masked_index = id[0] & header->division_mask;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"id[0]=%u, masked index=%u", id[0], masked_index);
if (!shmcb_get_division(header, &queue, &cache, (unsigned int)masked_index)) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s, "shmcb_remove_session, internal error");
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "shmcb_remove_session, internal error");
header->num_removes_miss++;
return FALSE;
}
header->num_removes_hit++;
else
header->num_removes_miss++;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"leaving shmcb_remove_session");
return res;
}
unsigned int loop, index_num, pos_count, new_pos;
SHMCBHeader *header;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"entering shmcb_expire_division");
/* We must calculate num and space ourselves based on expiry times. */
/* Find the new_offset and make the expiries happen. */
if (loop > 0) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"will be expiring %u sessions", loop);
/* We calculate the new_offset by "peeking" (or in the
* case it's the last entry, "sneaking" ;-). */
shmcb_get_safe_uint(&(idx->offset))));
shmcb_set_safe_uint(cache->first_pos, shmcb_get_safe_uint(&(idx->offset)));
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"we now have %u sessions",
shmcb_get_safe_uint(queue->pos_count));
}
unsigned int gap, new_pos, loop, new_offset;
int need;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"entering shmcb_insert_encoded_session, "
"*queue->pos_count = %u",
shmcb_get_safe_uint(queue->pos_count));
shmcb_get_safe_uint(&(idx->offset)));
}
if (loop > 0) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"about to scroll %u sessions from %u",
loop, shmcb_get_safe_uint(queue->pos_count));
/* We are removing "loop" items from the cache. */
shmcb_set_safe_uint(cache->first_pos, shmcb_get_safe_uint(&(idx->offset)));
shmcb_set_safe_uint(queue->pos_count, shmcb_get_safe_uint(queue->pos_count) - loop);
shmcb_set_safe_uint(queue->first_pos, new_pos);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"now only have %u sessions",
shmcb_get_safe_uint(queue->pos_count));
/* Update the stats!!! */
* is verified. */
if (shmcb_get_safe_uint(cache->pos_count) + encoded_len >
header->cache_data_size) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"shmcb_insert_encoded_session internal error");
return FALSE;
}
if (shmcb_get_safe_uint(queue->pos_count) == header->index_num) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"shmcb_insert_encoded_session internal error");
return FALSE;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"we have %u bytes and %u indexes free - enough",
header->cache_data_size -
shmcb_get_safe_uint(cache->pos_count), header->index_num -
new_pos = shmcb_cyclic_increment(header->index_num,
shmcb_get_safe_uint(queue->first_pos),
shmcb_get_safe_uint(queue->pos_count));
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"storing in index %u, at offset %u",
new_pos, new_offset);
idx = shmcb_get_index(queue, new_pos);
if (idx == NULL) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"shmcb_insert_encoded_session internal error");
return FALSE;
}
/* idx->removed = (unsigned char)0; */ /* Not needed given the memset above. */
idx->s_id2 = session_id[1];
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"session_id[0]=%u, idx->s_id2=%u",
session_id[0], session_id[1]);
shmcb_get_safe_uint(queue->pos_count) + 1);
/* And just for good debugging measure ... */
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"leaving now with %u bytes in the cache and %u indexes",
shmcb_get_safe_uint(cache->pos_count),
shmcb_get_safe_uint(queue->pos_count));
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"leaving shmcb_insert_encoded_session");
return TRUE;
}
unsigned char *ptr;
time_t now;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"entering shmcb_lookup_session_id");
/* If there are entries to expire, ditch them first thing. */
count = shmcb_get_safe_uint(queue->pos_count);
header = queue->header;
for (loop = 0; loop < count; loop++) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"loop=%u, count=%u, curr_pos=%u",
loop, count, curr_pos);
idx = shmcb_get_index(queue, curr_pos);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"idx->s_id2=%u, id[1]=%u, offset=%u",
idx->s_id2, id[1], shmcb_get_safe_uint(&(idx->offset)));
/* Only look into the session further if;
unsigned int session_id_length;
unsigned char *session_id;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"at index %u, found possible session match",
curr_pos);
shmcb_cyclic_cton_memcpy(header->cache_data_size,
session_id = SSL_SESSION_get_session_id(pSession);
if (pSession == NULL) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"scach2_lookup_session_id internal error");
return NULL;
}
if ((session_id_length == idlen) &&
(memcmp(session_id, id, idlen) == 0)) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"a match!");
return pSession;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"not a match");
SSL_SESSION_free(pSession);
pSession = NULL;
}
curr_pos = shmcb_cyclic_increment(header->index_num, curr_pos, 1);
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"no matching sessions were found");
return NULL;
}
unsigned char *ptr;
BOOL to_return = FALSE;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"entering shmcb_remove_session_id");
/* If there's entries to expire, ditch them first thing. */
count = shmcb_get_safe_uint(queue->pos_count);
header = cache->header;
for (loop = 0; loop < count; loop++) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"loop=%u, count=%u, curr_pos=%u",
loop, count, curr_pos);
idx = shmcb_get_index(queue, curr_pos);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"idx->s_id2=%u, id[1]=%u", idx->s_id2,
id[1]);
/* Only look into the session further if the second byte of the
unsigned int session_id_length;
unsigned char *session_id;
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"at index %u, found possible "
"session match", curr_pos);
shmcb_cyclic_cton_memcpy(header->cache_data_size,
ptr = tempasn;
pSession = d2i_SSL_SESSION(NULL, &ptr, SSL_SESSION_MAX_DER);
if (pSession == NULL) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"shmcb_remove_session_id, internal error");
goto end;
}
if ((session_id_length == idlen)
&& (memcmp(id, session_id, idlen) == 0)) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"a match!");
/* Scrub out this session "quietly" */
idx->removed = (unsigned char) 1;
to_return = TRUE;
goto end;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"not a match");
SSL_SESSION_free(pSession);
pSession = NULL;
}
curr_pos = shmcb_cyclic_increment(header->index_num, curr_pos, 1);
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"no matching sessions were found");
/* If there's entries to expire, ditch them now. */
shmcb_expire_division(s, queue, cache);
end:
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"leaving shmcb_remove_session_id");
return to_return;
}
* Create shared memory segment
*/
if (mc->szSessionCacheDataFile == NULL) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"SSLSessionCache required");
ssl_die();
}
"Cannot initialize rmm");
ssl_die();
}
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"initialize MM %p RMM %p",
mc->pSessionCacheDataMM, mc->pSessionCacheDataRMM);
ssl_scache_shmht_calloc,
ssl_scache_shmht_realloc,
ssl_scache_shmht_free, s )) == NULL) {
- ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"Cannot allocate hash table in shared memory: %s",
table_strerror(ta_errno));
ssl_die();
/*
* Log the done work
*/
- ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
"Init: Created hash-table (%d buckets) "
"in shared memory (%d bytes) for SSL session cache",
n, avail);
/* (vpKeyThis != vpKey) && (nKeyThis != nKey) */
}
ssl_mutex_off(s);
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"Inter-Process Session Cache (SHMHT) Expiry: "
"old: %d, new: %d, removed: %d",
nElements, nElements-nDeleted, nDeleted);