diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2009-10-13 14:25:50 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2009-10-13 14:37:24 +0200 |
commit | c6621d108bb8beb97ca6185c0c11d4fbffab5a1b (patch) | |
tree | d3c68716c7e2dc8f2fc0f949d6305a28f4504d38 /database/sqlite/edb-sqlite.c | |
parent | 5501786363987737509c2306a9eba9af8d881817 (diff) | |
download | eurephia-c6621d108bb8beb97ca6185c0c11d4fbffab5a1b.tar.gz eurephia-c6621d108bb8beb97ca6185c0c11d4fbffab5a1b.tar.xz eurephia-c6621d108bb8beb97ca6185c0c11d4fbffab5a1b.zip |
Always process certificate depth as integer
Diffstat (limited to 'database/sqlite/edb-sqlite.c')
-rw-r--r-- | database/sqlite/edb-sqlite.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/database/sqlite/edb-sqlite.c b/database/sqlite/edb-sqlite.c index 80966e5..6728f84 100644 --- a/database/sqlite/edb-sqlite.c +++ b/database/sqlite/edb-sqlite.c @@ -217,13 +217,13 @@ void eDBdisconnect(eurephiaCTX *ctx) * @copydoc eDBauth_TLS() */ int eDBauth_TLS(eurephiaCTX *ctx, const char *org, const char *cname, const char *email, - const char *digest, const char *depth) + const char *digest, const unsigned int depth) { dbresult *res = NULL; int certid = 0; char *blid = NULL; - DEBUG(ctx, 20, "Function call: eDBauth_TLS(ctx, '%s', '%s', '%s', '%s', %s)", + DEBUG(ctx, 20, "Function call: eDBauth_TLS(ctx, '%s', '%s', '%s', '%s', %i)", org, cname, email, digest, depth); // Check if certificate is valid, and not too many attempts has been tried with the given certificate @@ -232,7 +232,7 @@ int eDBauth_TLS(eurephiaCTX *ctx, const char *org, const char *cname, const char " FROM openvpn_certificates cert" " LEFT JOIN openvpn_blacklist bl USING(digest)" " WHERE organisation='%q' AND common_name='%q' " - " AND email='%q' AND depth='%q' AND cert.digest='%q'%c", + " AND email='%q' AND depth='%i' AND cert.digest='%q'%c", org, cname, email, depth, digest, 0); if( res != NULL ) { |