upnphttp.c: Configure OpenSSL client cert verification

This commit is contained in:
Thomas Bernard 2014-04-10 23:28:41 +02:00
parent e26174d05d
commit 947be5aafc
1 changed files with 9 additions and 0 deletions

View File

@ -52,6 +52,12 @@ syslogsslerr(void)
} }
} }
static int verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
{
syslog(LOG_DEBUG, "verify_callback(%d, %p)", preverify_ok, ctx);
return preverify_ok;
}
int init_ssl(void) int init_ssl(void)
{ {
SSL_METHOD *method; SSL_METHOD *method;
@ -87,6 +93,9 @@ int init_ssl(void)
syslogsslerr(); syslogsslerr();
return -1; return -1;
} }
/*SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE, verify_callback);*/
SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_NONE, verify_callback);
/*SSL_CTX_set_verify_depth(depth);*/
return 0; return 0;
} }