Skip to content

Commit a990599

Browse files
committed
Revert "Add SSLVerifyClientEKU directive to control Extended Key Usage checks for client certificates."
This reverts commit 7634be3.
1 parent 29be795 commit a990599

5 files changed

Lines changed: 0 additions & 109 deletions

File tree

docs/manual/mod/mod_ssl.xml

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,48 +1460,6 @@ SSLVerifyClient require
14601460
</usage>
14611461
</directivesynopsis>
14621462

1463-
<directivesynopsis>
1464-
<name>SSLVerifyClientEKU</name>
1465-
<description>Whether to enforce Extended Key Usage checks for Client Certificates</description>
1466-
<syntax>SSLVerifyClientEKU on|off</syntax>
1467-
<default>SSLVerifyClientEKU on</default>
1468-
<contextlist><context>server config</context>
1469-
<context>virtual host</context>
1470-
<context>directory</context>
1471-
<context>.htaccess</context></contextlist>
1472-
<override>AuthConfig</override>
1473-
1474-
<usage>
1475-
<p>
1476-
This directive controls whether mod_ssl enforces X.509 Extended Key Usage
1477-
(EKU) <code>invalid purpose</code> checks during client certificate
1478-
verification. The default value <code>on</code> preserves the standard
1479-
behavior and rejects client certificates whose EKU does not allow client
1480-
authentication.
1481-
</p>
1482-
<p>
1483-
Setting this directive explicitly to <code>on</code> is identical to omitting
1484-
the directive.
1485-
</p>
1486-
<p>
1487-
When set to <code>off</code>, mod_ssl will ignore only the
1488-
<code>invalid purpose</code> verification error for client certificates while
1489-
leaving other verification checks (e.g. chain validation, signature, validity
1490-
period, revocation checks) unchanged.
1491-
</p>
1492-
<p>
1493-
This setting only affects client certificate verification performed by
1494-
<directive module="mod_ssl">SSLVerifyClient</directive>.
1495-
</p>
1496-
<example><title>Example</title>
1497-
<highlight language="config">
1498-
SSLVerifyClient require
1499-
SSLVerifyClientEKU off
1500-
</highlight>
1501-
</example>
1502-
</usage>
1503-
</directivesynopsis>
1504-
15051463
<directivesynopsis>
15061464
<name>SSLVerifyDepth</name>
15071465
<description>Maximum depth of CA Certificates in Client

modules/ssl/mod_ssl.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,6 @@ static const command_rec ssl_config_cmds[] = {
152152
SSL_CMD_ALL(VerifyClient, TAKE1,
153153
"SSL Client verify type "
154154
"('none', 'optional', 'require', 'optional_no_ca')")
155-
SSL_CMD_ALL(VerifyClientEKU, TAKE1,
156-
"Whether to enforce client certificate Extended Key Usage "
157-
"during SSL client verification ('on' or 'off')")
158155
SSL_CMD_ALL(VerifyDepth, TAKE1,
159156
"SSL Client verify depth "
160157
"('N' - number of intermediate certificates)")

modules/ssl/ssl_engine_config.c

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ static void modssl_ctx_init(modssl_ctx_t *mctx, apr_pool_t *p)
138138
mctx->auth.cipher_suite = NULL;
139139
mctx->auth.verify_depth = UNSET;
140140
mctx->auth.verify_mode = SSL_CVERIFY_UNSET;
141-
mctx->auth.verify_client_eku = SSL_VERIFY_EKU_UNSET;
142141
mctx->auth.tls13_ciphers = NULL;
143142

144143
mctx->ocsp_mask = UNSET;
@@ -285,7 +284,6 @@ static void modssl_ctx_cfg_merge(apr_pool_t *p,
285284
cfgMergeString(auth.cipher_suite);
286285
cfgMergeInt(auth.verify_depth);
287286
cfgMerge(auth.verify_mode, SSL_CVERIFY_UNSET);
288-
cfgMerge(auth.verify_client_eku, SSL_VERIFY_EKU_UNSET);
289287
cfgMergeString(auth.tls13_ciphers);
290288

291289
cfgMergeInt(ocsp_mask);
@@ -407,7 +405,6 @@ void *ssl_config_perdir_create(apr_pool_t *p, char *dir)
407405

408406
dc->szCipherSuite = NULL;
409407
dc->nVerifyClient = SSL_CVERIFY_UNSET;
410-
dc->nVerifyClientEKU = SSL_VERIFY_EKU_UNSET;
411408
dc->nVerifyDepth = UNSET;
412409

413410
dc->szUserName = NULL;
@@ -464,7 +461,6 @@ void *ssl_config_perdir_merge(apr_pool_t *p, void *basev, void *addv)
464461

465462
cfgMergeString(szCipherSuite);
466463
cfgMerge(nVerifyClient, SSL_CVERIFY_UNSET);
467-
cfgMerge(nVerifyClientEKU, SSL_VERIFY_EKU_UNSET);
468464
cfgMergeInt(nVerifyDepth);
469465

470466
cfgMergeString(szUserName);
@@ -1325,36 +1321,6 @@ const char *ssl_cmd_SSLVerifyClient(cmd_parms *cmd,
13251321
return NULL;
13261322
}
13271323

1328-
const char *ssl_cmd_SSLVerifyClientEKU(cmd_parms *cmd,
1329-
void *dcfg,
1330-
const char *arg)
1331-
{
1332-
SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
1333-
SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
1334-
ssl_verify_eku_t mode;
1335-
1336-
if (strcEQ(arg, "on")) {
1337-
mode = SSL_VERIFY_EKU_UNSET;
1338-
}
1339-
else if (strcEQ(arg, "off")) {
1340-
mode = SSL_VERIFY_EKU_OFF;
1341-
}
1342-
else {
1343-
return apr_pstrcat(cmd->temp_pool, cmd->cmd->name,
1344-
": Invalid argument '", arg,
1345-
"' (expected 'on' or 'off')", NULL);
1346-
}
1347-
1348-
if (cmd->path) {
1349-
dc->nVerifyClientEKU = mode;
1350-
}
1351-
else {
1352-
sc->server->auth.verify_client_eku = mode;
1353-
}
1354-
1355-
return NULL;
1356-
}
1357-
13581324
static const char *ssl_cmd_verify_depth_parse(cmd_parms *parms,
13591325
const char *arg,
13601326
int *depth)
@@ -2656,9 +2622,6 @@ static void modssl_auth_ctx_dump(modssl_auth_ctx_t *auth, apr_pool_t *p, int pro
26562622
}
26572623
#endif
26582624
DMP_VERIFY(proxy? "SSLProxyVerify" : "SSLVerifyClient", auth->verify_mode);
2659-
if (!proxy) {
2660-
DMP_ON_OFF("SSLVerifyClientEKU", auth->verify_client_eku);
2661-
}
26622625
DMP_LONG( proxy? "SSLProxyVerify" : "SSLVerifyDepth", auth->verify_depth);
26632626
DMP_STRING(proxy? "SSLProxyCACertificateFile" : "SSLCACertificateFile", auth->ca_cert_file);
26642627
DMP_STRING(proxy? "SSLProxyCACertificatePath" : "SSLCACertificatePath", auth->ca_cert_path);

modules/ssl/ssl_engine_kernel.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,7 +1630,6 @@ int ssl_callback_SSLVerify(int ok, X509_STORE_CTX *ctx)
16301630
int errdepth = X509_STORE_CTX_get_error_depth(ctx);
16311631
int depth = UNSET;
16321632
int verify = SSL_CVERIFY_UNSET;
1633-
ssl_verify_eku_t verify_eku = SSL_VERIFY_EKU_UNSET;
16341633

16351634
/*
16361635
* Log verification information
@@ -1658,13 +1657,6 @@ int ssl_callback_SSLVerify(int ok, X509_STORE_CTX *ctx)
16581657
verify = mctx->auth.verify_mode;
16591658
}
16601659

1661-
if (dc && !conn->outgoing) {
1662-
verify_eku = dc->nVerifyClientEKU;
1663-
}
1664-
if (verify_eku == SSL_VERIFY_EKU_UNSET) {
1665-
verify_eku = mctx->auth.verify_client_eku;
1666-
}
1667-
16681660
if (verify == SSL_CVERIFY_NONE) {
16691661
/*
16701662
* SSLProxyVerify is either not configured or set to "none".
@@ -1674,17 +1666,6 @@ int ssl_callback_SSLVerify(int ok, X509_STORE_CTX *ctx)
16741666
return TRUE;
16751667
}
16761668

1677-
if (!ok && !conn->outgoing
1678-
&& errnum == X509_V_ERR_INVALID_PURPOSE
1679-
&& verify_eku == SSL_VERIFY_EKU_OFF) {
1680-
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, conn,
1681-
"Certificate Verification: EKU check disabled by "
1682-
"SSLVerifyClientEKU, accepting invalid purpose");
1683-
X509_STORE_CTX_set_error(ctx, X509_V_OK);
1684-
errnum = X509_V_OK;
1685-
ok = TRUE;
1686-
}
1687-
16881669
if (ssl_verify_error_is_optional(errnum) &&
16891670
(verify == SSL_CVERIFY_OPTIONAL_NO_CA))
16901671
{

modules/ssl/ssl_private.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -479,11 +479,6 @@ typedef enum {
479479
SSL_CVERIFY_OPTIONAL_NO_CA = 3
480480
} ssl_verify_t;
481481

482-
typedef enum {
483-
SSL_VERIFY_EKU_UNSET = UNSET,
484-
SSL_VERIFY_EKU_OFF = 0
485-
} ssl_verify_eku_t;
486-
487482
#define SSL_VERIFY_PEER_STRICT \
488483
(SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT)
489484

@@ -796,7 +791,6 @@ typedef struct {
796791
/** for client or downstream server authentication */
797792
int verify_depth;
798793
ssl_verify_t verify_mode;
799-
ssl_verify_eku_t verify_client_eku;
800794

801795
/** TLSv1.3 has its separate cipher list, separate from the
802796
settings for older TLS protocol versions. Since which one takes
@@ -932,7 +926,6 @@ struct SSLDirConfigRec {
932926
ssl_opt_t nOptionsDel;
933927
const char *szCipherSuite;
934928
ssl_verify_t nVerifyClient;
935-
ssl_verify_eku_t nVerifyClientEKU;
936929
int nVerifyDepth;
937930
const char *szUserName;
938931
apr_size_t nRenegBufferSize;
@@ -984,7 +977,6 @@ const char *ssl_cmd_SSLClientHelloVars(cmd_parms *, void *, int flag);
984977
const char *ssl_cmd_SSLCompression(cmd_parms *, void *, int flag);
985978
const char *ssl_cmd_SSLSessionTickets(cmd_parms *, void *, int flag);
986979
const char *ssl_cmd_SSLVerifyClient(cmd_parms *, void *, const char *);
987-
const char *ssl_cmd_SSLVerifyClientEKU(cmd_parms *, void *, const char *);
988980
const char *ssl_cmd_SSLVerifyDepth(cmd_parms *, void *, const char *);
989981
const char *ssl_cmd_SSLSessionCache(cmd_parms *, void *, const char *);
990982
const char *ssl_cmd_SSLSessionCacheTimeout(cmd_parms *, void *, const char *);

0 commit comments

Comments
 (0)