From 86afd005fb8184e37c41d85128a01b58ac152d60 Mon Sep 17 00:00:00 2001 From: David von Oheimb Date: Mon, 29 Jan 2018 16:58:07 +0100 Subject: [PATCH] remove 'keyid:' when printing simple X509 authority keyID (without issuer and serial) Reviewed-by: Richard Levitte Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6226) --- crypto/x509v3/v3_akey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/x509v3/v3_akey.c b/crypto/x509v3/v3_akey.c index 78218d5695..b656b4b502 100644 --- a/crypto/x509v3/v3_akey.c +++ b/crypto/x509v3/v3_akey.c @@ -42,7 +42,7 @@ static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, char *tmp; if (akeyid->keyid) { tmp = OPENSSL_buf2hexstr(akeyid->keyid->data, akeyid->keyid->length); - X509V3_add_value("keyid", tmp, &extlist); + X509V3_add_value((akeyid->issuer || akeyid->serial) ? "keyid" : NULL, tmp, &extlist); OPENSSL_free(tmp); } if (akeyid->issuer) -- 2.25.1