imgtool.py: Fix some errors in ecdsa key generation
There are two easy to fix problems with the ecdsa key generation code. Signed-off-by: David Brown <david.brown@linaro.org>
This commit is contained in:
parent
b189f1048d
commit
8ae61c05a5
|
@ -9,7 +9,7 @@ import sys
|
|||
def gen_rsa2048(args):
|
||||
keys.RSA2048.generate().export_private(args.key)
|
||||
def gen_ecdsa_p256(args):
|
||||
keys.ecdsa256p1.generate().export_private(args.key)
|
||||
keys.ECDSA256P1.generate().export_private(args.key)
|
||||
def gen_ecdsa_p224(args):
|
||||
print("TODO: p-224 not yet implemented")
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ class ECDSA256P1():
|
|||
|
||||
def export_private(self, path):
|
||||
with open(path, 'wb') as f:
|
||||
f.write(key.to_pem())
|
||||
f.write(self.key.to_pem())
|
||||
|
||||
def emit_c(self):
|
||||
vk = self.key.get_verifying_key()
|
||||
|
|
Loading…
Reference in New Issue