MCUboot: Generate and sign with new keys if needed

If the MCUBOOT_GENERATE_SIGNING_KEYPAIR config flag is on
then generate new private key with the imgtool and use the new
keys to sign the S and NS images.

The public keys of the newly generated keys have to be
provisioned into the OTP so the MCUboot can validate the
signed images correctly.

Change-Id: Ia833775fd66c046e2afaffca8f59361ef3cbebb8
Signed-off-by: Bence Balogh <bence.balogh@arm.com>
4 files changed