summaryrefslogtreecommitdiffstats
path: root/eurephia.c
diff options
context:
space:
mode:
Diffstat (limited to 'eurephia.c')
-rw-r--r--eurephia.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/eurephia.c b/eurephia.c
index 82aa183..62c1f89 100644
--- a/eurephia.c
+++ b/eurephia.c
@@ -276,12 +276,21 @@ int eurephia_tlsverify(eurephiaCTX *ctx, const char **env, const char *depth)
eDBregister_attempt(ctx, attempt_IPADDR, ATTEMPT_REGISTER, ipaddr);
eDBregister_attempt(ctx, attempt_CERTIFICATE, ATTEMPT_REGISTER, tls_digest);
}
- free_certinfo(ci);
if( result > 0 ) {
+ // Certificate is okay, result contains the certificate ID
+ eurephia_log(ctx, LOG_INFO, (depth == 0 ? 0 : 1),
+ "Found certid %i for user: %s/%s/%s",
+ result, ci->org, ci->common_name, ci->email);
+
// Reset attempt counter for certificate if it is okey
eDBregister_attempt(ctx, attempt_CERTIFICATE, ATTEMPT_RESET, tls_digest);
+ } else {
+ eurephia_log(ctx, LOG_WARNING, 0,
+ "Unknown certificate for: %s/%s/%s (depth %s, digest: %s)",
+ ci->org, ci->common_name, ci->email, depth, tls_digest);
}
+ free_certinfo(ci);
DEBUG(ctx, 10, "** Function result: eurephia_tlsverify(...) == %i", result > 0);
return (result > 0);
@@ -350,6 +359,8 @@ int eurephia_userauth(eurephiaCTX *ctx, const char **env)
eDBregister_attempt(ctx, attempt_IPADDR, ATTEMPT_RESET, ipaddr);
eDBregister_attempt(ctx, attempt_CERTIFICATE, ATTEMPT_RESET, tls_digest);
eDBregister_attempt(ctx, attempt_USERNAME, ATTEMPT_RESET, username);
+
+ eurephia_log(ctx, LOG_INFO, 0, "User '%s' authenticated", username);
}
DEBUG(ctx, 10, "** Function result: eurephia_userauth(...) = %i", (result>0));
return (result > 0);