summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2012-11-02 17:53:44 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2012-11-02 17:53:44 +0100
commit69c35c113c15a76becd819e671b24bb1222de710 (patch)
treef43c7af755853b16bed2c293766f87d63cc79e66 /plugin
parent2613675111387fb0753d31be74b5e0a362389ef8 (diff)
downloadeurephia-69c35c113c15a76becd819e671b24bb1222de710.tar.gz
eurephia-69c35c113c15a76becd819e671b24bb1222de710.tar.xz
eurephia-69c35c113c15a76becd819e671b24bb1222de710.zip
Added error checking before calling eDBget_uid()
This is to prepare for eDBget_uid() to also do lookups when certid is not set. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'plugin')
-rw-r--r--plugin/eurephia.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/eurephia.c b/plugin/eurephia.c
index 880ad71..e41a0dc 100644
--- a/plugin/eurephia.c
+++ b/plugin/eurephia.c
@@ -543,6 +543,12 @@ int eurephia_connect(eurephiaCTX *ctx, const char **env) {
return 0;
}
certid = eDBauth_TLS(ctx, ci->org, ci->common_name, ci->email, digest, 0);
+ if( certid < 1 ) {
+ eurephia_log(ctx, LOG_WARNING, 0, "Failed to lookup certificate: %s/%s/%s [%s]",
+ ci->org, ci->common_name, ci->email, digest);
+ free_certinfo(ci);
+ return 0;
+ }
uid = eDBget_uid(ctx, certid, uname);
free_certinfo(ci);