rauc / meta-rauc

Yocto/Open Embedded meta layer for RAUC, the embedded Linux update framework
MIT License
165 stars 91 forks source link

specifying intermediate certificates in bundle.bbclass #183

Open hellow554 opened 3 years ago

hellow554 commented 3 years ago

According to the docs if you'd like to include intermediate certificates you have to use --intermediate=your/cert/here.pem, but the bundle.bbclass does not provide such option.

One could misuse the BUNDLE_ARGS variable to acomplish this.

I propose a RAUC_INTERMEDIATE_FILE (or RAUC_INTER_FILE for short, although I'd like to see the longer version) that will automatically add an intermediate file to the rauc bundle command.

ejoerns commented 3 years ago

I'd tend to agree with you, as we are currently in the process of introducing this in https://github.com/pengutronix/genimage/pull/139 accordingly (which is the comparable mechanism used for PTXdist).

But we must also take care here that this option can be called multiple times to add multiple intermediate certs. Thus the variable must be a list and evaluated as such. Due to this, I am not fully sure if this is a benefit over simply giving the explicit options with BUNDLE_ARGS (but it could as it is consistent with providing key and cert via variables, too).