summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-01 16:17:45 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-07 14:51:19 +0200
commitbab09d3b4780a2d2720d415dcce4442a91e3246f (patch)
treee5ec044665255a68f5c030d5de35cb2c9840bd2e
parent595bc2b1dab1e597ace968864483c21b7633e137 (diff)
downloadgnutls-bab09d3b4780a2d2720d415dcce4442a91e3246f.tar.gz
certtool: silence warnings related to --pkcs8
There is no reason to bug the user with such details by default. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--src/certtool-common.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/certtool-common.h b/src/certtool-common.h
index 066c98d5fe..3973f1a28a 100644
--- a/src/certtool-common.h
+++ b/src/certtool-common.h
@@ -87,15 +87,17 @@ void switch_to_pkcs8_when_needed(common_info_st *cinfo, gnutls_x509_privkey_t ke
return;
if ((key_type == GNUTLS_PK_RSA_PSS || key_type == GNUTLS_PK_EDDSA_ED25519)) {
- fprintf(stderr, "Assuming --pkcs8 is given; %s private keys can only be exported in PKCS#8 format\n",
- gnutls_pk_algorithm_get_name(key_type));
+ if (cinfo->verbose)
+ fprintf(stderr, "Assuming --pkcs8 is given; %s private keys can only be exported in PKCS#8 format\n",
+ gnutls_pk_algorithm_get_name(key_type));
cinfo->pkcs8 = 1;
if (cinfo->password == NULL)
cinfo->password = "";
}
if (gnutls_x509_privkey_get_seed(key, NULL, NULL, 0) != GNUTLS_E_INVALID_REQUEST) {
- fprintf(stderr, "Assuming --pkcs8 is given; provable private keys can only be exported in PKCS#8 format\n");
+ if (cinfo->verbose)
+ fprintf(stderr, "Assuming --pkcs8 is given; provable private keys can only be exported in PKCS#8 format\n");
cinfo->pkcs8 = 1;
if (cinfo->password == NULL)
cinfo->password = "";