ecdsakeygen: fix issues pointed out by Aaron M.D. Jones.