Description of problem: When I execute pesign -s -c "Red Hat Test Certificate" -i <kernel_image> -o <kernel_image>.signed I get the following error: pesign: could not parse signature data Version-Release number of selected component (if applicable): Latest from git as of yesterday, 20 Oct 2012 (v0.99 cannot be build!) How reproducible: Always Steps to Reproduce: 1. Install the "standard" pesign.rpm package, which should come with a set of Fedora NSS DB store containing 2 "test" certificates placed in /etc/pki/pesign 2. Execute pesign -s -c "Red Hat Test Certificate" -i <kernel_image> -o <kernel_image>.signed where <kernel_image> is the kernel image built previously (I tried 3.6.2-4) 3. Actual results: The above error is shown. Expected results: The kernel image to be signed. Additional info: After installing pesign RPM (compiled from the latest git sources using the pesign.spec file coming with the 0.99 version of pesign) I have the NSS DB store in /etc/pki/pesign: [root@test1 ~]# ls -las /etc/pki/pesign/ total 104 4 drwxrwxr-x. 2 pesign pesign 4096 Oct 21 02:42 . 4 drwxr-xr-x. 8 root root 4096 Oct 21 02:42 .. 64 -rw-rw-r--. 1 pesign pesign 65536 Jul 13 15:22 cert8.db 16 -rw-rw-r--. 1 pesign pesign 16384 Jul 13 15:22 key3.db 16 -rw-rw-r--. 1 pesign pesign 16384 Jul 13 15:22 secmod.db The integrity of that store seems to be OK: [root@test1 ~]# certutil -L -d /etc/pki/pesign/ Certificate Nickname Trust Attributes SSL,S/MIME,JAR/XPI Red Hat Test CA CT,C,C Red Hat Test Certificate u,u,u [root@test1 ~]# certutil -K -d /etc/pki/pesign/ certutil: Checking token "NSS Certificate DB" in slot "NSS User Private Key and Certificate Services" < 0> rsa e90a8d50a87af903349ecc82691998ed68042573 Red Hat Test Certificate Also, in v3.7 of the kernel (rawhide) the kernel image seems to be signed with the following command (taken from kernel.spec): # Sign the image if we're using EFI %pesign -s -i $KernelImage -o vmlinuz.signed When I execute pesign -s -i <my_kernel_image> -o <my_kernel_image>.signed (from the command line) this produces the following error: pesign: Could not find certificate (null) Am I missing something?
A short note to add that this problem persists with v0.99 as well, which I now managed to compile and build from sources.
You need to either add the user you're building as to the pesign group or setfacl the files appropriately for your build user. The error message could stand some improvement.
Nevermind, that's not the issue. However, I currently can't reproduce the first problem you're having. The second problem you're having is that you haven't told it a certificate name to use. So that's an error reporting issue when you've specified an invalid command line.
(note that %pesign does some magic to try to determine what certificate it should be using based on its environment.)
(In reply to comment #2) > You need to either add the user you're building as to the pesign group or > setfacl the files appropriately for your build user. The error message > could stand some improvement. You will note from the bug report description above that I am executing this as root, so that's not the issue. I need to know why does it fail? "could not parse signature data" isn't very descriptive, is it? It doesn't tell me *why* the "signature data" cannot be parsed, especially given that I am able to check/verify that certificate. As for Comment 4 above, the %pesign macros is valid for the kernel build only - I can't use it on the command line.
That error actually means it can't parse the signature list in the PE binary. I suspect this means you didn't build the kernel you're trying to sign with CONFIG_EFI_STUB=y . If that's the case, it's still a valid observation that the error reporting could use some work. As for %pesign - it's an rpm macro. It works with any rpm package.
Hang on, does this "could not parse signature data" message mean that there is something wrong with my certificate store (/etc/pki/pesign) or there is something wrong with the binary which needs to be signed? I thought that it is the former, but if it is the latter this message is not confusing, but downright misleading.
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
This message is a notice that Fedora 19 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 19. It is Fedora's policy to close all bug reports from releases that are no longer maintained. Approximately 4 (four) weeks from now this bug will be closed as EOL if it remains open with a Fedora 'version' of '19'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 19 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.