• Juan Castillo's avatar
    TBB: add ECDSA support to the certificate generation tool · ccbf890e
    Juan Castillo authored
    This patch extends the 'cert_create' tool to support ECDSA keys
    to sign the certificates. The '--key-alg' command line option
    can be used to specify the key algorithm when invoking the tool.
    Available options are:
    
        * 'rsa': create RSA-2048 keys (default option)
        * 'ecdsa': create ECDSA-SECP256R1 keys
    
    The TF Makefile has been updated to allow the platform to specify
    the key algorithm by declaring the 'KEY_ALG' variable in the
    platform makefile.
    
    The behaviour regarding key management has changed. After applying
    this patch, the tool will try first to open the keys from disk. If
    one key does not exist or no key is specified, and the command line
    option to create keys has been specified, new keys will be created.
    Otherwise an error will be generated and the tool will exit. This
    way, the user may specify certain keys while the tool will create
    the remaining ones. This feature is useful for testing purposes
    and CI infrastructures.
    
    The OpenSSL directory may be specified using the build option
    'OPENSSL_DIR' when building the certificate generation tool.
    Default is '/usr'.
    
    Change-Id: I98bcc2bfab28dd7179f17f1177ea7a65698df4e7
    ccbf890e
key.c 3.99 KB