On 21.06.2012 18:17, [email protected] wrote:
> Author: ben
> Date: Thu Jun 21 16:17:41 2012
> New Revision: 1352596
>
> URL: http://svn.apache.org/viewvc?rev=1352596&view=rev
> Log:
> RFC 5878 support.
>
> Modified:
> httpd/httpd/trunk/CHANGES
> httpd/httpd/trunk/modules/ssl/mod_ssl.c
> httpd/httpd/trunk/modules/ssl/ssl_engine_config.c
> httpd/httpd/trunk/modules/ssl/ssl_engine_init.c
> httpd/httpd/trunk/modules/ssl/ssl_private.h
Considering how things evolved since June last year, I propose to revert
this patch, for the following reasons:
- as pointed out in my backport votes (http://svn.apache.org/r1395229),
the code is still quite far from being an "implementation" of RFC 5878,
and OpenSSL itself hasn't received any updates to the code added in May 2012
- the SSL*AuthzFile directives for mod_ssl are completely undocumented
as of today, and SSL_CTX_use_authz_file uses an opaque format (which
might see further modifications, see e.g. [1])
- earlier this year it became clear that the first version of the
OpenSSL code for "RFC 5878 support" wasn't really correct [2], and
meanwhile the CT I-D has switched to using a dedicated TLS extension
[3], in any case
- Dr Steve has added support for OpenSSL's new SSL_CONF_* stuff in
December (http://svn.apache.org/r1421323 - pretty cool!), and since this
is also available in the OpenSSL_1_0_2-stable branch, it would
definitely be the way to go for adding support for "not yet recognized"
OpenSSL options to mod_ssl
Unless someone is clearly objecting (please raise your voice), I intend
to commit the attached patch in about a week.
Kaspar
[1] https://github.com/trevp/openssl_extender
[2] http://www.ietf.org/mail-archive/web/therightkey/current/msg00597.html
[3] http://www.ietf.org/rfcdiff?url2=draft-laurie-pki-sunlight-06#diff0077
Index: modules/ssl/mod_ssl.c
===================================================================
--- modules/ssl/mod_ssl.c (revision 1465211)
+++ modules/ssl/mod_ssl.c (working copy)
@@ -99,15 +99,6 @@
SSL_CMD_SRV(PKCS7CertificateFile, TAKE1,
"PKCS#7 file containing server certificate and chain"
" certificates ('/path/to/file' - PEM encoded)")
- SSL_CMD_ALL(RSAAuthzFile, TAKE1,
- "RFC 5878 Authz Extension file for RSA certificate "
- "(`/path/to/file')")
- SSL_CMD_ALL(DSAAuthzFile, TAKE1,
- "RFC 5878 Authz Extension file for DSA certificate "
- "(`/path/to/file')")
- SSL_CMD_ALL(ECAuthzFile, TAKE1,
- "RFC 5878 Authz Extension file for EC certificate "
- "(`/path/to/file')")
#ifdef HAVE_TLS_SESSION_TICKETS
SSL_CMD_SRV(SessionTicketKeyFile, TAKE1,
"TLS session ticket encryption/decryption key file (RFC 5077) "
Index: modules/ssl/ssl_private.h
===================================================================
--- modules/ssl/ssl_private.h (revision 1465211)
+++ modules/ssl/ssl_private.h (working copy)
@@ -678,11 +678,6 @@
SRP_VBASE *srp_vbase;
#endif
- /** RFC 5878 */
- const char *rsa_authz_file;
- const char *dsa_authz_file;
- const char *ec_authz_file;
-
modssl_auth_ctx_t auth;
BOOL ocsp_enabled; /* true if OCSP verification enabled */
@@ -762,9 +757,6 @@
const char *ssl_cmd_SSLRandomSeed(cmd_parms *, void *, const char *, const
char *, const char *);
const char *ssl_cmd_SSLEngine(cmd_parms *, void *, const char *);
const char *ssl_cmd_SSLCipherSuite(cmd_parms *, void *, const char *);
-const char *ssl_cmd_SSLRSAAuthzFile(cmd_parms *, void *, const char *);
-const char *ssl_cmd_SSLDSAAuthzFile(cmd_parms *, void *, const char *);
-const char *ssl_cmd_SSLECAuthzFile(cmd_parms *, void *, const char *);
const char *ssl_cmd_SSLCertificateFile(cmd_parms *, void *, const char *);
const char *ssl_cmd_SSLCertificateKeyFile(cmd_parms *, void *, const char *);
const char *ssl_cmd_SSLCertificateChainFile(cmd_parms *, void *, const char
*);
Index: modules/ssl/ssl_engine_init.c
===================================================================
--- modules/ssl/ssl_engine_init.c (revision 1465211)
+++ modules/ssl/ssl_engine_init.c (working copy)
@@ -1022,8 +1022,7 @@
static int ssl_server_import_cert(server_rec *s,
modssl_ctx_t *mctx,
const char *id,
- int idx,
- const char *authz_file)
+ int idx)
{
SSLModConfigRec *mc = myModConfig(s);
ssl_asn1_t *asn1;
@@ -1062,24 +1061,6 @@
}
#endif
- if (authz_file) {
-#if !defined(OPENSSL_NO_TLSEXT) && OPENSSL_VERSION_NUMBER >= 0x10002000L
- if (!SSL_CTX_use_authz_file(mctx->ssl_ctx, authz_file)) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
- "Unable to initialize TLS authz extension");
- ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
- ssl_die(s);
- }
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, "Set %s authz_file to %s",
- type, authz_file);
-#else
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
- "Unable to initialize TLS authz extension: "
- "OpenSSL version too low");
- ssl_die(s);
-#endif
- }
-
mctx->pks->certs[idx] = cert;
return TRUE;
@@ -1217,13 +1198,10 @@
ecc_id = ssl_asn1_table_keyfmt(ptemp, vhost_id, SSL_AIDX_ECC);
#endif
- have_rsa = ssl_server_import_cert(s, mctx, rsa_id, SSL_AIDX_RSA,
- mctx->rsa_authz_file);
- have_dsa = ssl_server_import_cert(s, mctx, dsa_id, SSL_AIDX_DSA,
- mctx->dsa_authz_file);
+ have_rsa = ssl_server_import_cert(s, mctx, rsa_id, SSL_AIDX_RSA);
+ have_dsa = ssl_server_import_cert(s, mctx, dsa_id, SSL_AIDX_DSA);
#ifndef OPENSSL_NO_EC
- have_ecc = ssl_server_import_cert(s, mctx, ecc_id, SSL_AIDX_ECC,
- mctx->ec_authz_file);
+ have_ecc = ssl_server_import_cert(s, mctx, ecc_id, SSL_AIDX_ECC);
#endif
if (!(have_rsa || have_dsa
Index: modules/ssl/ssl_engine_config.c
===================================================================
--- modules/ssl/ssl_engine_config.c (revision 1465211)
+++ modules/ssl/ssl_engine_config.c (working copy)
@@ -125,10 +125,6 @@
mctx->crl_file = NULL;
mctx->crl_check_mode = SSL_CRLCHECK_UNSET;
- mctx->rsa_authz_file = NULL;
- mctx->dsa_authz_file = NULL;
- mctx->ec_authz_file = NULL;
-
mctx->auth.ca_cert_path = NULL;
mctx->auth.ca_cert_file = NULL;
mctx->auth.cipher_suite = NULL;
@@ -265,10 +261,6 @@
cfgMerge(crl_file, NULL);
cfgMerge(crl_check_mode, SSL_CRLCHECK_UNSET);
- cfgMergeString(rsa_authz_file);
- cfgMergeString(dsa_authz_file);
- cfgMergeString(ec_authz_file);
-
cfgMergeString(auth.ca_cert_path);
cfgMergeString(auth.ca_cert_file);
cfgMergeString(auth.cipher_suite);
@@ -858,54 +850,6 @@
return NULL;
}
-const char *ssl_cmd_SSLRSAAuthzFile(cmd_parms *cmd,
- void *dcfg,
- const char *arg)
-{
- SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
- const char *err;
-
- if ((err = ssl_cmd_check_file(cmd, &arg))) {
- return err;
- }
-
- sc->server->rsa_authz_file = arg;
-
- return NULL;
-}
-
-const char *ssl_cmd_SSLDSAAuthzFile(cmd_parms *cmd,
- void *dcfg,
- const char *arg)
-{
- SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
- const char *err;
-
- if ((err = ssl_cmd_check_file(cmd, &arg))) {
- return err;
- }
-
- sc->server->dsa_authz_file = arg;
-
- return NULL;
-}
-
-const char *ssl_cmd_SSLECAuthzFile(cmd_parms *cmd,
- void *dcfg,
- const char *arg)
-{
- SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
- const char *err;
-
- if ((err = ssl_cmd_check_file(cmd, &arg))) {
- return err;
- }
-
- sc->server->ec_authz_file = arg;
-
- return NULL;
-}
-
#ifdef HAVE_TLS_SESSION_TICKETS
const char *ssl_cmd_SSLSessionTicketKeyFile(cmd_parms *cmd,
void *dcfg,
Index: CHANGES
===================================================================
--- CHANGES (revision 1465211)
+++ CHANGES (working copy)
@@ -140,8 +140,6 @@
- mod_socache_shmcb, mod_socache_dbm: shared memory or dbm for cache
[Jeff Trawick]
- *) mod_ssl: Add RFC 5878 support. [Ben Laurie]
-
*) suexec: Add --enable-suexec-capabilites support on Linux, to use
setuid/setgid capability bits rather than a setuid root binary.
[Joe Orton]