<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/sign-file.c, branch v5.3.14</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.3.14</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.3.14'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-02-10T01:43:47Z</updated>
<entry>
<title>sign-file: fix build error in sign-file.c with libressl</title>
<updated>2017-02-10T01:43:47Z</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2017-02-09T17:17:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f86880175d0db2e3f2e27c24881dd9b395b0b920'/>
<id>urn:sha1:f86880175d0db2e3f2e27c24881dd9b395b0b920</id>
<content type='text'>
The sign-file tool failed to build against libressl. Fix this by extending
the PKCS7 check and thus making sign-file link against libressl without an
error.

Signed-off-by: John Crispin &lt;john@phrozen.org&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2016-12-15T19:41:37Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-15T19:41:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=19c75bcbe0113cbbf05e4d89e0502a23358bfca9'/>
<id>urn:sha1:19c75bcbe0113cbbf05e4d89e0502a23358bfca9</id>
<content type='text'>
Pull crypto fixes from Herbert Xu:
 "This fixes the following issues:

   - a crash regression in the new skcipher walker

   - incorrect return value in public_key_verify_signature

   - fix for in-place signing in the sign-file utility"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: skcipher - fix crash in virtual walk
  sign-file: Fix inplace signing when src and dst names are both specified
  crypto: asymmetric_keys - set error code on failure
</content>
</entry>
<entry>
<title>sign-file: Fix inplace signing when src and dst names are both specified</title>
<updated>2016-12-14T10:33:14Z</updated>
<author>
<name>Alex Yashchenko</name>
<email>alexhoppus111@gmail.com</email>
</author>
<published>2016-12-13T09:26:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=efcae7c931b473285e38c778bdaa9f36de9f78d6'/>
<id>urn:sha1:efcae7c931b473285e38c778bdaa9f36de9f78d6</id>
<content type='text'>
When src and dst both are specified and they point to the same file
the sign-file utility will write only signature to the dst file and
the module (.ko file) body will not be written.
That happens because we open the same file with "rb" and "wb" flags,
from fopen man:

 w      Truncate file to zero length or create text file for writing.
The stream is positioned at the beginning of the file.
...
	bm = BIO_new_file(module_name, "rb");
...
	bd = BIO_new_file(dest_name, "wb");
...
	while ((n = BIO_read(bm, buf, sizeof(buf))),
	       n &gt; 0) {
		ERR(BIO_write(bd, buf, n) &lt; 0, "%s", dest_name);
	}
...

Signed-off-by: Alex Yashchenko &lt;alexhoppus111@gmail.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>treewide: Make remaining source files non-executable</title>
<updated>2016-12-13T04:41:52Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2016-12-12T22:26:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fe6bce8d30a86c693bf7cfbf4759cbafd121289f'/>
<id>urn:sha1:fe6bce8d30a86c693bf7cfbf4759cbafd121289f</id>
<content type='text'>
.c and .h source files should not be executable, change
the permissions to 0644.

[ This would normally go through Andrew Morton, but his ancient
  patch-based toolchain doesn't do permission changes ]

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>modsign: Make sign-file determine the format of the X.509 cert</title>
<updated>2016-06-14T12:18:33Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2016-06-14T12:18:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9552c7aebb8c36912612fddad5b55267c671a303'/>
<id>urn:sha1:9552c7aebb8c36912612fddad5b55267c671a303</id>
<content type='text'>
Make sign-file determine the format of the X.509 certificate by reading the
first two bytes and seeing if the first byte is 0x30 and the second
0x81-0x84.  If this is the case, assume it's DER encoded, otherwise assume
it to be PEM encoded.

Without this, it gets awkward to deal with the error messages from
d2i_X509_bio() when we want to call BIO_reset() and then PEM_read_bio() in
case the certificate was PEM encoded rather than X.509 encoded.

Reported-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Tested-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
cc: Juerg Haefliger &lt;juerg.haefliger@hpe.com&gt;
cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>sign-file: fix build with CMS support disabled</title>
<updated>2016-03-03T10:50:46Z</updated>
<author>
<name>Marc-Antoine Perennou</name>
<email>Marc-Antoine@Perennou.com</email>
</author>
<published>2016-03-01T08:53:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=41693d1c03212de3267bc77b1cb196294a438616'/>
<id>urn:sha1:41693d1c03212de3267bc77b1cb196294a438616</id>
<content type='text'>
Some versions of openssl might have the CMS feature disabled
LibreSSL disables this feature too
If the feature is disabled, fallback to PKCS7

In file included from scripts/sign-file.c:46:0:
/usr/x86_64-pc-linux-gnu/include/openssl/cms.h:62:2: error: #error CMS is disabled.
 #error CMS is disabled.

Signed-off-by: Marc-Antoine Perennou &lt;Marc-Antoine@Perennou.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>scripts/sign-file.c: Add support for signing with a raw signature</title>
<updated>2016-02-18T17:20:48Z</updated>
<author>
<name>Juerg Haefliger</name>
<email>juerg.haefliger@hpe.com</email>
</author>
<published>2016-02-04T11:09:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e5a2e3c8478215aea5b4c58e6154f1b6b170b0ca'/>
<id>urn:sha1:e5a2e3c8478215aea5b4c58e6154f1b6b170b0ca</id>
<content type='text'>
This patch adds support for signing a kernel module with a raw
detached PKCS#7 signature/message.

The signature is not converted and is simply appended to the module so
it needs to be in the right format. Using openssl, a valid signature can
be generated like this:
  $ openssl smime -sign -nocerts -noattr -binary -in &lt;module&gt; -inkey \
    &lt;key&gt; -signer &lt;x509&gt; -outform der -out &lt;raw sig&gt;

The resulting raw signature from the above command is (more or less)
identical to the raw signature that sign-file itself can produce like
this:
  $ scripts/sign-file -d &lt;hash algo&gt; &lt;key&gt; &lt;x509&gt; &lt;module&gt;

Signed-off-by: Juerg Haefliger &lt;juerg.haefliger@hpe.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>v2 linux-next scripts/sign-file.c Fix LibreSSL support</title>
<updated>2016-02-09T16:40:45Z</updated>
<author>
<name>Codarren Velvindron</name>
<email>codarren@hackers.mu</email>
</author>
<published>2016-02-09T16:40:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=411a6f585c0f7695942497ae1a0f3f313cefc6e0'/>
<id>urn:sha1:411a6f585c0f7695942497ae1a0f3f313cefc6e0</id>
<content type='text'>
In file included from scripts/sign-file.c:47:0:
/usr/include/openssl/cms.h:62:2: error: #error CMS is disabled.
 #error CMS is disabled.
  ^
scripts/Makefile.host:91: recipe for target 'scripts/sign-file' failed
make[1]: *** [scripts/sign-file] Error 1
Makefile:567: recipe for target 'scripts' failed
make: *** [scripts] Error 2


Fix SSL headers so that the kernel can build with LibreSSL

Signed-off-by: Codarren Velvindron &lt;codarren@hackers.mu&gt;
Acked-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>MODSIGN: Change from CMS to PKCS#7 signing if the openssl is too old</title>
<updated>2015-09-25T15:31:46Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2015-09-25T15:31:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=283e8ba2dfde54f8f27d7d0f459a07de79a39d55'/>
<id>urn:sha1:283e8ba2dfde54f8f27d7d0f459a07de79a39d55</id>
<content type='text'>
The sign-file.c program actually uses CMS rather than PKCS#7 to sign a file
since that allows the target X.509 certificate to be specified by
subjectKeyId rather than by issuer + serialNumber.

However, older versions of the OpenSSL crypto library (such as may be found
in CentOS 5.11) don't support CMS.  Assume everything prior to
OpenSSL-1.0.0 doesn't support CMS and switch to using PKCS#7 in that case.

Further, the pre-1.0.0 OpenSSL only supports PKCS#7 signing with SHA1, so
give an error from the sign-file script if the caller requests anything
other than SHA1.

The compiler gives the following error with an OpenSSL crypto library
that's too old:

  HOSTCC  scripts/sign-file
scripts/sign-file.c:23:25: fatal error: openssl/cms.h: No such file or directory
 #include &lt;openssl/cms.h&gt;

Reported-by: Vinson Lee &lt;vlee@twopensource.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>modsign: Fix GPL/OpenSSL licence incompatibility</title>
<updated>2015-09-15T20:54:21Z</updated>
<author>
<name>David Woodhouse</name>
<email>dwmw2@infradead.org</email>
</author>
<published>2015-09-15T15:03:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=09a77a885233e2a20dac2635a79c83ccf50a26a1'/>
<id>urn:sha1:09a77a885233e2a20dac2635a79c83ccf50a26a1</id>
<content type='text'>
The GPL does not permit us to link against the OpenSSL library. Use
LGPL for sign-file and extract-file instead.

[ The whole "openssl isn't compatible with gpl" is really just
  fear-mongering, but there's no reason not to make modsign LGPL, so
  nobody cares.  - Linus ]

Reported-by: Julian Andres Klode &lt;jak@jak-linux.org&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Julian Andres Klode &lt;jak@jak-linux.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
