pki_crypto: Reformat pki_key_to_blob()

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2025-05-06 22:32:43 +02:00
committed by Andreas Schneider
parent 8dc29f140b
commit faf9caafc6

View File

@@ -1888,7 +1888,8 @@ ssh_string pki_key_to_blob(const ssh_key key, enum ssh_key_e type)
}
#ifdef WITH_PKCS11_URI
if (ssh_key_is_private(key) && !EC_KEY_get0_public_key(ec)) {
SSH_LOG(SSH_LOG_TRACE, "It is mandatory to have separate"
SSH_LOG(SSH_LOG_TRACE,
"It is mandatory to have separate"
" public ECDSA key objects in the PKCS #11 device."
" Unlike RSA, ECDSA public keys cannot be derived"
" from their private keys.");
@@ -1910,7 +1911,8 @@ ssh_string pki_key_to_blob(const ssh_key key, enum ssh_key_e type)
locate_param = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_PUB_KEY);
#ifdef WITH_PKCS11_URI
if (ssh_key_is_private(key) && !locate_param) {
SSH_LOG(SSH_LOG_TRACE, "It is mandatory to have separate"
SSH_LOG(SSH_LOG_TRACE,
"It is mandatory to have separate"
" public ECDSA key objects in the PKCS #11 device."
" Unlike RSA, ECDSA public keys cannot be derived"
" from their private keys.");