summaryrefslogtreecommitdiffstats
path: root/database/sqlite/edb-sqlite.c
diff options
context:
space:
mode:
Diffstat (limited to 'database/sqlite/edb-sqlite.c')
-rw-r--r--database/sqlite/edb-sqlite.c6
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 ) {