From: David von Oheimb Date: Mon, 29 Jan 2018 15:58:07 +0000 (+0100) Subject: remove 'keyid:' when printing simple X509 authority keyID (without issuer and serial) X-Git-Tag: openssl-3.0.0-alpha1~2348 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=86afd005fb8184e37c41d85128a01b58ac152d60;p=oweals%2Fopenssl.git 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) --- 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)