Commit cb1bb48b authored by David Brown's avatar David Brown Committed by David Brown
Browse files

imgtool: Fix ECDSA signatures

Earlier refactoring created a call for get_public_bytes() that was added
to the RSA class, but missed on the ECDSA class.  Add this call so that
ECDSA signatures will work again.

Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent 9911b186
Loading
Loading
Loading
Loading
+4
Changes for scripts/imgtool/keys.py: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -101,6 +101,10 @@ class ECDSA256P1():
        with open(path, 'wb') as f:
            f.write(self.key.to_pem())

    def get_public_bytes(self):
        vk = self.key.get_verifying_key()
        return bytes(vk.to_der())

    def emit_c(self):
        vk = self.key.get_verifying_key()
        print(AUTOGEN_MESSAGE)