mirror of
https://github.com/status-im/miniupnp.git
synced 2025-01-21 19:59:09 +00:00
upnphttp.c: Configure OpenSSL client cert verification
This commit is contained in:
parent
e26174d05d
commit
947be5aafc
@ -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)
|
||||
{
|
||||
SSL_METHOD *method;
|
||||
@ -87,6 +93,9 @@ int init_ssl(void)
|
||||
syslogsslerr();
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user