mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 02:39:48 +09:00
Do not build the PKCS#11 when disabled
This prevents building the pkcs11-related functions and printing pkcs11-related log messages when the libssh is built without PKCS#11 support. Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
@@ -1232,6 +1232,7 @@ int ssh_userauth_publickey_auto(ssh_session session,
|
||||
state->privkey = NULL;
|
||||
state->pubkey = NULL;
|
||||
|
||||
#ifdef WITH_PKCS11_URI
|
||||
if (ssh_pki_is_uri(privkey_file)) {
|
||||
char *pub_uri_from_priv = NULL;
|
||||
SSH_LOG(SSH_LOG_INFO,
|
||||
@@ -1244,7 +1245,9 @@ int ssh_userauth_publickey_auto(ssh_session session,
|
||||
pub_uri_from_priv);
|
||||
SAFE_FREE(pub_uri_from_priv);
|
||||
}
|
||||
} else {
|
||||
} else
|
||||
#endif /* WITH_PKCS11_URI */
|
||||
{
|
||||
snprintf(pubkey_file, sizeof(pubkey_file), "%s.pub", privkey_file);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user