diff --git a/src/openvpn/pkcs11_openssl.c b/src/openvpn/pkcs11_openssl.c index 7c07152c8a8..40080efaa0f 100644 --- a/src/openvpn/pkcs11_openssl.c +++ b/src/openvpn/pkcs11_openssl.c @@ -331,8 +331,7 @@ pkcs11_init_tls_session(pkcs11h_certificate_t certificate, #ifdef HAVE_XKEY_PROVIDER return (xkey_load_from_pkcs11h(certificate, ssl_ctx) == 0); /* inverts the return value */ -#endif - +#else int ret = 1; X509 *x509 = NULL; @@ -402,6 +401,7 @@ pkcs11_init_tls_session(pkcs11h_certificate_t certificate, openssl_session = NULL; } return ret; +#endif /* ifdef HAVE_XKEY_PROVIDER */ } char *