projects
/
umurmur.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2648ff2
)
Some cleanup.
author
Martin Johansson
<martin@fatbob.nu>
Sat, 25 Feb 2012 19:43:56 +0000
(20:43 +0100)
committer
Martin Johansson
<martin@fatbob.nu>
Sat, 25 Feb 2012 19:43:56 +0000
(20:43 +0100)
src/ban.c
patch
|
blob
|
history
src/ssl.c
patch
|
blob
|
history
diff --git
a/src/ban.c
b/src/ban.c
index 043cbc1ced684c9ea841e6b4139fc818f3304007..29ad8a3639e58a2f39772a3a1c549bb93017888a 100644
(file)
--- a/
src/ban.c
+++ b/
src/ban.c
@@
-72,18
+72,18
@@
void Ban_pruneBanned()
list_iterate(itr, &banlist) {
ban = list_get_entry(itr, ban_t, node);
list_iterate(itr, &banlist) {
ban = list_get_entry(itr, ban_t, node);
+#ifdef DEBUG
+ SSLi_hash2hex(ban->hash, hexhash);
+ Log_debug("BL: User %s Reason: '%s' Hash: %s IP: %s Time left: %d",
+ ban->name, ban->reason, hexhash, inet_ntoa(*((struct in_addr *)&ban->address)),
+ bantime / 1000000LL - Timer_elapsed(&ban->startTime) / 1000000LL);
+#endif
if (Timer_isElapsed(&ban->startTime, bantime)) {
if (Timer_isElapsed(&ban->startTime, bantime)) {
-
free(ban->name);
free(ban->reason);
list_del(&ban->node);
free(ban);
}
free(ban->name);
free(ban->reason);
list_del(&ban->node);
free(ban);
}
-#ifdef DEBUG
- SSLi_hash2hex(ban->hash, hexhash);
- Log_debug("BL: User %s Reason: '%s' Hash: %s IP: %s",
- ban->name, ban->reason, hexhash, inet_ntoa(*((struct in_addr *)&ban->address)));
-#endif
}
}
}
}
diff --git
a/src/ssl.c
b/src/ssl.c
index 35b226ffda1f228586a36e6d264d90a5e7a38599..0b3457fa52ffdcb5dbd421276adf1e78c1885ea9 100644
(file)
--- a/
src/ssl.c
+++ b/
src/ssl.c
@@
-687,17
+687,16
@@
static int verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
X509_STORE_CTX_set_error(ctx, err);
}
if (!preverify_ok) {
X509_STORE_CTX_set_error(ctx, err);
}
if (!preverify_ok) {
- Log_warn("verify error:num=%d:%s:depth=%d:%s\n", err,
+ Log_warn("
SSL:
verify error:num=%d:%s:depth=%d:%s\n", err,
X509_verify_cert_error_string(err), depth, buf);
}
/*
* At this point, err contains the last verification error. We can use
* it for something special
*/
X509_verify_cert_error_string(err), depth, buf);
}
/*
* At this point, err contains the last verification error. We can use
* it for something special
*/
- if (!preverify_ok && (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT))
- {
+ if (!preverify_ok && (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT)) {
X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, 256);
X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, 256);
- Log_warn("issuer= %s", buf);
+
Log_warn("issuer= %s", buf);
}
return 1;
}
}
return 1;
}