Have tincctl generate ECDSA keys.
The generate-keys command now generates both an RSA and an ECDSA keypair, but one can generate-rsa-keys or generate-ecdsa-keys to just generate one type.
This commit is contained in:
parent
8ace7f3e57
commit
80b81c00b1
3 changed files with 77 additions and 8 deletions
|
|
@ -23,7 +23,6 @@
|
|||
#include <openssl/err.h>
|
||||
#include <openssl/obj_mac.h>
|
||||
|
||||
#include "logger.h"
|
||||
#include "ecdsagen.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
|
@ -33,8 +32,8 @@ bool ecdsa_generate(ecdsa_t *ecdsa) {
|
|||
*ecdsa = EC_KEY_new_by_curve_name(NID_secp521r1);
|
||||
|
||||
if(!EC_KEY_generate_key(*ecdsa)) {
|
||||
logger(LOG_ERR, "Generating EC key failed: %s", ERR_error_string(ERR_get_error(), NULL));
|
||||
abort();
|
||||
fprintf(stderr, "Generating EC key failed: %s", ERR_error_string(ERR_get_error(), NULL));
|
||||
return false;
|
||||
}
|
||||
|
||||
EC_KEY_set_asn1_flag(*ecdsa, OPENSSL_EC_NAMED_CURVE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue