sbsign: fix failure to sign when key is password protected
The current incarnation of sbsign doesn't all all ciphers to OpenSSL meaning that if the private key is encrypted, it can't decrypt it and instead it returns the unhelpful error message error reading private key ../certs/PK.key Fix this by adding all ciphers before trying to read the private key. Signed-off-by: James Bottomley <JBottomley@Parallels.com> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
This commit is contained in:
parent
14cff46671
commit
8f8939d9bb
1 changed files with 1 additions and 0 deletions
1
sbsign.c
1
sbsign.c
|
@ -170,6 +170,7 @@ int main(int argc, char **argv)
|
|||
|
||||
ERR_load_crypto_strings();
|
||||
OpenSSL_add_all_digests();
|
||||
OpenSSL_add_all_ciphers();
|
||||
|
||||
BIO *privkey_bio = BIO_new_file(keyfilename, "r");
|
||||
EVP_PKEY *pkey = PEM_read_bio_PrivateKey(privkey_bio, NULL, NULL, NULL);
|
||||
|
|
Loading…
Reference in a new issue