mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-02 06:08:02 +02:00
libnm-core: macsec: don't require a cak in verify()
CAK is a connection secret and can be NULL for various reasons
(agent-owned, no permissions to get secrets, etc.). verify() must not
require it.
Fixes: 474a0dbfbe
This commit is contained in:
parent
a764061807
commit
8d5b01619b
1 changed files with 6 additions and 0 deletions
|
|
@ -245,6 +245,12 @@ verify_macsec_key (const char *key, gboolean cak, GError **error)
|
|||
{
|
||||
int req_len;
|
||||
|
||||
/* CAK is a connection secret and can be NULL for various
|
||||
* reasons (agent-owned, no permissions to get secrets, etc.)
|
||||
*/
|
||||
if (cak && !key)
|
||||
return TRUE;
|
||||
|
||||
if (!key || !key[0]) {
|
||||
g_set_error_literal (error,
|
||||
NM_CONNECTION_ERROR,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue