Re: [PATCH v2] unit: Add better check for pkcs8_key_parser availability
Bastien Nocera <[email protected]> Thu, 19 Feb 2026 13:29:06 +0100
| Newsgroups | dev.linux.lists.iwd |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 2026-02-19 at 12:57 +0100, Marcel Holtmann wrote:
> Hi Bastien,
>
> > Check whether the pkcs8_key_parser kernel module is available
> > (whether
> > built-in or as a module) before announcing that we support PKCS#8.
> > ---
> > Changes since v1:
> > - Fix missing #include
> >
> > unit/test-eapol.c | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/unit/test-eapol.c b/unit/test-eapol.c
> > index 58f3e054a5ae..2ffc3e700108 100644
> > --- a/unit/test-eapol.c
> > +++ b/unit/test-eapol.c
> > @@ -27,6 +27,7 @@
> > #include <stdio.h>
> > #include <string.h>
> > #include <assert.h>
> > +#include <sys/stat.h>
> > #include <linux/if_ether.h>
> > #include <ell/ell.h>
> >
> > @@ -3923,6 +3924,16 @@ static bool aes_precheck(const void *data)
> >
> > static bool pkcs8_precheck(const void *data)
> > {
> > + struct stat s;
> > +
> > + /* Despite the path, this directory exists whether the module
> > + * is external or built-in. */
>
> for some reason we stuck with this comments style (M2 in doc/coding-
> style.txt):
>
> /*
> * foo
> * bar
> */
Sent a v3.