vb21: load private key before signing
When we load the private key, it calls out to PKCS11 and sets up the
modulus and ID of the key. Make sure to do that before signing data, so
that PKCS11 keys have the ID copied into the signature block.
BUG=b:413430417
BRANCH=None
TEST=manual
TEST=make runtests
Change-Id: Iba05e451827aecb706fb433a3e03c413955c144e
Signed-off-by: Benjamin Shai <bshai@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/6489297
Reviewed-by: Jakub "Kuba" Czapiga <czapiga@google.com>
Commit-Queue: Jakub "Kuba" Czapiga <czapiga@google.com>
Tested-by: Jakub "Kuba" Czapiga <czapiga@google.com>
4 files changed