[PATCH] ubifs-utils: Don't compile engine support if not available

Sebastian Andrzej Siewior sebastian at breakpoint.cc
Sun Aug 30 23:25:38 PDT 2026


On 2026-08-31 09:50:18 [+0800], Zhihao Cheng wrote:
> 在 2026/8/30 1:32, Sebastian Andrzej Siewior 写道:
> > @@ -139,6 +142,7 @@ static EVP_PKEY *read_private_key(const char *private_key_name, X509 **cert)
> >   	*cert = NULL;
> >   	if (!strncmp(private_key_name, "pkcs11:", 7)) {
> > +#ifndef OPENSSL_NO_ENGINE
> >   		ENGINE *e;
> >   		struct {
> >   			const char *url;
> > @@ -177,6 +181,10 @@ static EVP_PKEY *read_private_key(const char *private_key_name, X509 **cert)
> >   		}
> >   		*cert = parms.cert;
> >   		fprintf(stderr, "Using cert %p\n", *cert);
> > +#else
> > +		ssl_err_msg("PKCS#11 ENGINE support not available.");
> > +		return NULL;
> Hi Sebastian,
> Thanks for pointing that. I am wondering whether it would be better to
> implement PKCS11 encryption in #else branch by the OpenSSL 4.0 API provider.

Well. This is a the very least gets it compiled. The provider API is
supported since OpenSSL 3.0 so I wouldn't make it available only if
ENGINE isn't supported. You still need the actual provider.

> > +#endif
> >   	} else {
> >   		BIO *b;
> > 

Sebastian



More information about the linux-mtd mailing list