Commit 8d5b0161 authored by Beniamino Galvani's avatar Beniamino Galvani

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: 474a0dbf
parent a7640618
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment