]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
certtool: Align warning about --provable with actual code
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 4 May 2021 19:08:08 +0000 (15:08 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 4 May 2021 19:10:44 +0000 (15:10 -0400)
If I try to generate an ed25519 key, it is *not* an ECDSA key.  But I
see this warning:

    0 dkg@host:~$ certtool --generate-privkey --provable --key-type ed25519
    Generating a 256 bit EdDSA (Ed25519) private key ...
    The --provable parameter cannot be used with ECDSA keys.
    1 dkg@host:~$

Looking at the code and documentation, it's clear that --provable only
works for RSA and DSA.  This fix aligns the warning message with the
underlying mechanism.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
src/certtool.c

index 2f1f367184345aefd3bd3367eb30b06d7b6a677c..3c81155a92a9b3ad758e9536adc208d8321cee47 100644 (file)
@@ -197,7 +197,7 @@ generate_private_key_int(common_info_st * cinfo)
 
        if (provable && (!GNUTLS_PK_IS_RSA(key_type) && key_type != GNUTLS_PK_DSA)) {
                fprintf(stderr,
-                       "The --provable parameter cannot be used with ECDSA keys.\n");
+                       "The --provable parameter can only be used with RSA and DSA keys.\n");
                app_exit(1);
        }