Linux-Modules Archive on
 help / color / Atom feed
From: Stefan Strogin <>
To: Lucas De Marchi <>
Subject: Re: [PATCH] libkmod-signature: use PKCS7 for LibreSSL or older OpenSSL
Date: Fri, 15 Feb 2019 15:30:50 +0200
Message-ID: <> (raw)
In-Reply-To: <>

On 15/02/2019 10:04, Lucas De Marchi wrote:
> ooh, this ifdef is messy. Why do we want both libressl and openssl? What
> distro is requiring that?

Well, in the kernel in scripts/sign-file.c the same ifdefs are used.

Every distro that tries to support LibreSSL requires that. I know at least
Gentoo [1], Alpine and Void.

> if in the end we end up with ifdefs for N different libs I'd rather just
> add the implementation in kmod itself or convince kernel guys to just
> fill out the struct they are supposed to fill.

If you don't like ifdefs at all I would say that CMS is not needed. CMS and
PKCS#7 formats are very similar. CMS is newer but is as much as possible
backward compatible [2], but PKCS#7 is better supported. PKCS#7 has all the same
fields that are used when a kernel module is signed using CMS (and otherwise).
For example I can sign a module using OpenSSL-1.1.1 and CMS (even with hashes
other than sha1) and read its signing information with modinfo and PKCS#7 on a
system with LibreSSL, and otherwise.

So we can just replace CMS with PKCS#7 in fill_pkcs7().



  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-15  4:13 Stefan Strogin
2019-02-15  8:04 ` Lucas De Marchi
2019-02-15 13:30   ` Stefan Strogin [this message]
2019-03-01  5:37     ` Stefan Strogin

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Modules Archive on

Archives are clonable:
	git clone --mirror linux-modules/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-modules linux-modules/ \
	public-inbox-index linux-modules

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox