diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2021-05-07 20:14:53 -0400 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2021-09-17 16:33:07 -0400 |
commit | 838fc8c6d421113bda9eb8f284a35dedf4bff6f7 (patch) | |
tree | 6cb556ab7ac4dc107809017e318ec8e2c6bc8a35 /src/certtool-common.c | |
parent | c5b657bfc8e0291912c4ba50a8fa0f6e0082cb53 (diff) | |
download | gnutls-838fc8c6d421113bda9eb8f284a35dedf4bff6f7.tar.gz |
certtool: add x448 and x25519 for --key-type
This is a simple extension of the certtool command-line interface.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Diffstat (limited to 'src/certtool-common.c')
-rw-r--r-- | src/certtool-common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/certtool-common.c b/src/certtool-common.c index dba89df9a0..3fd63ab7aa 100644 --- a/src/certtool-common.c +++ b/src/certtool-common.c @@ -1647,6 +1647,10 @@ gnutls_pk_algorithm_t figure_key_type(const char *key_type) return GNUTLS_PK_EDDSA_ED25519; else if (strcasecmp(key_type, "ed448") == 0) return GNUTLS_PK_EDDSA_ED448; + else if (strcasecmp(key_type, "x25519") == 0) + return GNUTLS_PK_ECDH_X25519; + else if (strcasecmp(key_type, "x448") == 0) + return GNUTLS_PK_ECDH_X448; else if (strcasecmp(key_type, "dsa") == 0) return GNUTLS_PK_DSA; else if (strcasecmp(key_type, "ecdsa") == 0 || strcasecmp(key_type, "ecc") == 0) |