Files
linux/scripts
David Howells 9552c7aebb modsign: Make sign-file determine the format of the X.509 cert
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 <[email protected]>
Signed-off-by: David Howells <[email protected]>
Tested-by: Ben Hutchings <[email protected]>
cc: David Woodhouse <[email protected]>
cc: Juerg Haefliger <[email protected]>
cc: Ben Hutchings <[email protected]>
2016-06-14 13:18:33 +01:00
..
2014-08-20 16:03:45 +02:00
2014-08-20 16:03:45 +02:00
…
…
…
2014-08-20 16:03:45 +02:00
2014-08-20 16:03:45 +02:00
2014-08-20 16:03:45 +02:00
2014-12-20 00:01:12 +01:00
2015-10-12 17:46:36 +01:00
…
2014-08-20 16:03:45 +02:00
2014-08-20 16:03:45 +02:00
…
…
2015-08-28 17:04:40 +02:00
2015-08-28 17:04:40 +02:00
…
2016-02-07 23:01:45 -08:00
2014-08-20 16:03:45 +02:00