2020-02-06 17:16:44

by Michał Lowas-Rzechonek

[permalink] [raw]
Subject: mesh: Missing API for delivering provisioning public key via OOB?

Hi,

I have been playing with mesh-cfgclient, and I've noticed that
provisioning procedure gets stuck when node reports Public Key OOB
information available' in 'Public Key Type' field of Provisioning
Capabilities PDU.

While digging into the code and API, I think we have a missing feature
in the API between provisioner application and the daemon - while there
is an API to deliver OOB keys to the daemon when *the application* is
being provisioned, there doesn't seem to be a way to deliver provisioned
device's public key when is the application who does the provisioning.

Is my understanding correct, or is there something I've missed?

regards
--
Michał Lowas-Rzechonek <[email protected]>
Silvair http://silvair.com
Jasnogórska 44, 31-358 Krakow, POLAND


2020-02-06 17:26:05

by Gix, Brian

[permalink] [raw]
Subject: Re: mesh: Missing API for delivering provisioning public key via OOB?

Hi Michał,

On Thu, 2020-02-06 at 18:16 +0100, Michał Lowas-Rzechonek wrote:
> Hi,
>
> I have been playing with mesh-cfgclient, and I've noticed that
> provisioning procedure gets stuck when node reports Public Key OOB
> information available' in 'Public Key Type' field of Provisioning
> Capabilities PDU.
>
> While digging into the code and API, I think we have a missing feature
> in the API between provisioner application and the daemon - while there
> is an API to deliver OOB keys to the daemon when *the application* is
> being provisioned, there doesn't seem to be a way to deliver provisioned
> device's public key when is the application who does the provisioning.
>
> Is my understanding correct, or is there something I've missed?

Yes... It looks like tools/mesh-cfgclient.c needs to implement the:

array{byte} PublicKey()

method.

This is a good catch, and needs to be added.

>
> regards

2020-02-06 17:29:42

by Gix, Brian

[permalink] [raw]
Subject: Re: mesh: Missing API for delivering provisioning public key via OOB?

On Thu, 2020-02-06 at 17:25 +0000, Gix, Brian wrote:
> Hi Michał,
>
> On Thu, 2020-02-06 at 18:16 +0100, Michał Lowas-Rzechonek wrote:
> > Hi,
> >
> > I have been playing with mesh-cfgclient, and I've noticed that
> > provisioning procedure gets stuck when node reports Public Key OOB
> > information available' in 'Public Key Type' field of Provisioning
> > Capabilities PDU.
> >
> > While digging into the code and API, I think we have a missing feature
> > in the API between provisioner application and the daemon - while there
> > is an API to deliver OOB keys to the daemon when *the application* is
> > being provisioned, there doesn't seem to be a way to deliver provisioned
> > device's public key when is the application who does the provisioning.
> >
> > Is my understanding correct, or is there something I've missed?
>
> Yes... It looks like tools/mesh-cfgclient.c needs to implement the:
>
> array{byte} PublicKey()
>
> method.
>
> This is a good catch, and needs to be added.

And before you respond, yes it also needs to be added to mesh/agent.c


>
>
> > regards

2020-02-06 17:54:13

by Michał Lowas-Rzechonek

[permalink] [raw]
Subject: Re: mesh: Missing API for delivering provisioning public key via OOB?

Brian,

On 02/06, Gix, Brian wrote:
> > Is my understanding correct, or is there something I've missed?
> Yes... It looks like tools/mesh-cfgclient.c needs to implement the:
>
> array{byte} PublicKey()
>
> method.
>
> This is a good catch, and needs to be added.

Ok, thanks. I'll give it a shot, if time permits.

What puzzled me is that the provisioning gets stuck instead of failing,
so it seems it's not only that cfgclient doesn't implement the method,
but also the daemon doesn't seem to check for errors?

--
Michał Lowas-Rzechonek <[email protected]>
Silvair http://silvair.com
Jasnogórska 44, 31-358 Krakow, POLAND