diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-06-02 09:44:52 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-07-17 17:08:01 +0200 |
commit | e80dd2beb5392255ad619fd578bf86889794f28d (patch) | |
tree | 75dc3cecb63b3bbad71ef8c5e052c1fb9121941b /src | |
parent | 4f0e7e9a5048d5dbf22369aa475bcb0078b863f5 (diff) | |
download | gnutls-e80dd2beb5392255ad619fd578bf86889794f28d.tar.gz |
tests: replaced rsa-pss/eddsa certtool options with --key-type
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/certtool.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/certtool.c b/src/certtool.c index aa7f27d893..d6220c6a60 100644 --- a/src/certtool.c +++ b/src/certtool.c @@ -1120,15 +1120,15 @@ void sign_params_to_flags(common_info_st *cinfo, const char *params) static void figure_key_type(const char *key_type) { - if (strcasecmp(key_type, "rsa")) + if (strcasecmp(key_type, "rsa") == 0) req_key_type = GNUTLS_PK_RSA; - else if (strcasecmp(key_type, "rsa-pss")) + else if (strcasecmp(key_type, "rsa-pss") == 0) req_key_type = GNUTLS_PK_RSA_PSS; - else if (strcasecmp(key_type, "ed25519") || strcasecmp(key_type, "eddsa")) + else if (strcasecmp(key_type, "ed25519") == 0 || strcasecmp(key_type, "eddsa") == 0) req_key_type = GNUTLS_PK_EDDSA_ED25519; - else if (strcasecmp(key_type, "dsa")) + else if (strcasecmp(key_type, "dsa") == 0) req_key_type = GNUTLS_PK_DSA; - else if (strcasecmp(key_type, "ecdsa")) + else if (strcasecmp(key_type, "ecdsa") == 0 || strcasecmp(key_type, "ecc") == 0) req_key_type = GNUTLS_PK_ECDSA; else { fprintf(stderr, "unknown key type: %s\n", key_type); |