From cc878656f0ad02ff59befd1a71f9a0516af012fc Mon Sep 17 00:00:00 2001 From: Chris Burr Date: Mon, 13 Feb 2023 14:24:20 +0100 Subject: [PATCH] Only set authority key identified field if the public key is available --- src/sslutils/proxy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sslutils/proxy.c b/src/sslutils/proxy.c index 8a1e2098..d9bc9d21 100644 --- a/src/sslutils/proxy.c +++ b/src/sslutils/proxy.c @@ -389,14 +389,14 @@ struct VOMSProxy *VOMS_MakeProxy(struct VOMSProxyArguments *args, int *warning, ex11 = X509V3_EXT_conf_nid(NULL, &ctx, NID_authority_key_identifier, "keyid"); } - if (!ex11) { + if (ex11) { + if (!SET_EXT(ex11)) { + goto err; + } + } else if (args->selfsigned) { PRXYerr(PRXYERR_F_PROXY_SIGN,PRXYERR_R_CLASS_ADD_EXT); goto err; } - - if (!SET_EXT(ex11)) { - goto err; - } } /* class_add extension */