mirror of
https://github.com/systemd/systemd.git
synced 2025-03-06 00:58:29 +03:00
openssl-util: Set expected object type to private keys
Configures the store to only try to fetch private keys and nothing else.
This commit is contained in:
parent
4047b99c00
commit
5619a61829
@ -1340,6 +1340,9 @@ static int load_key_from_provider(
|
||||
if (!store)
|
||||
return log_openssl_errors("Failed to open OpenSSL store via '%s'", private_key_uri);
|
||||
|
||||
if (OSSL_STORE_expect(store, OSSL_STORE_INFO_PKEY) == 0)
|
||||
return log_openssl_errors("Failed to filter store by private keys");
|
||||
|
||||
_cleanup_(OSSL_STORE_INFO_freep) OSSL_STORE_INFO *info = OSSL_STORE_load(store);
|
||||
if (!info)
|
||||
return log_openssl_errors("Failed to load OpenSSL store via '%s'", private_key_uri);
|
||||
|
Loading…
x
Reference in New Issue
Block a user