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 */