Commit 455c90b1 authored by David Woodhouse's avatar David Woodhouse

Return error from OpenSSL load_certificate() for PKCS#11 URLs

Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 150dc037
......@@ -593,6 +593,13 @@ static int reload_pem_cert(struct openconnect_info *vpninfo)
static int load_certificate(struct openconnect_info *vpninfo)
{
if (!strncmp(vpninfo->sslkey, "pkcs11:", 7) ||
!strncmp(vpninfo->cert, "pkcs11:", 7)) {
vpn_progress(vpninfo, PRG_ERR,
_("This binary built without PKCS#11 support\n"));
return -EINVAL;
}
vpn_progress(vpninfo, PRG_TRACE,
_("Using certificate file %s\n"), vpninfo->cert);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment