Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Return error from OpenSSL load_certificate() for PKCS#11 URLs
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Jun 11, 2012
1 parent 150dc03 commit 455c90b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions openssl.c
Expand Up @@ -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);

Expand Down

0 comments on commit 455c90b

Please sign in to comment.