Skip to content

Commit 3067b17

Browse files
committed
Add SSL_SHARED_CIPHER environment variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908132 13f79535-47bb-0310-9956-ffa450edef68
1 parent 1061b64 commit 3067b17

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

CHANGES

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
-*- coding: utf-8 -*-
22
Changes with Apache 2.5.1
33

4+
*) Add a SSL_SHARED_CIPHER environment variable with the list of
5+
client/server permitted ciphers. [Dirk-Willem van Gulik]
6+
47
*) mod_http2: field values (headers and trailers) are stripped of
58
leading/trailing whitespace (space +htab) before being processed
69
or send in a response. This is compatible behaviour to HTTP/1.1

docs/manual/mod/mod_ssl.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ compatibility variables.</p>
6666
<tr><td><code>SSL_SESSION_ID</code></td> <td>string</td> <td>The hex-encoded SSL session id</td></tr>
6767
<tr><td><code>SSL_SESSION_RESUMED</code></td> <td>string</td> <td>Initial or Resumed SSL Session. Note: multiple requests may be served over the same (Initial or Resumed) SSL session if HTTP KeepAlive is in use</td></tr>
6868
<tr><td><code>SSL_SECURE_RENEG</code></td> <td>string</td> <td><code>true</code> if secure renegotiation is supported, else <code>false</code></td></tr>
69-
<tr><td><code>SSL_CIPHER</code></td> <td>string</td> <td>The cipher specification name</td></tr>
69+
<tr><td><code>SSL_SHARED_CIPHERS</code></td> <td>string</td> <td>Colon separated list of shared ciphers (i.e. the subset of ciphers that are configured on both server and on the client)</td></tr>
70+
<tr><td><code>SSL_CIPHER</code></td> <td>string</td> <td>The name of the cipher agreed between client and server</td></tr>
7071
<tr><td><code>SSL_CIPHER_EXPORT</code></td> <td>string</td> <td><code>true</code> if cipher is an export cipher</td></tr>
7172
<tr><td><code>SSL_CIPHER_USEKEYSIZE</code></td> <td>number</td> <td>Number of cipher bits (actually used)</td></tr>
7273
<tr><td><code>SSL_CIPHER_ALGKEYSIZE</code></td> <td>number</td> <td>Number of cipher bits (possible)</td></tr>

modules/ssl/ssl_engine_kernel.c

+1
Original file line numberDiff line numberDiff line change
@@ -1532,6 +1532,7 @@ static const char *const ssl_hook_Fixup_vars[] = {
15321532
"SSL_SERVER_A_SIG",
15331533
"SSL_SESSION_ID",
15341534
"SSL_SESSION_RESUMED",
1535+
"SSL_SHARED_CIPHERS",
15351536
#ifdef HAVE_SRP
15361537
"SSL_SRP_USER",
15371538
"SSL_SRP_USERINFO",

modules/ssl/ssl_engine_vars.c

+5
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,11 @@ static const char *ssl_var_lookup_ssl(apr_pool_t *p, const SSLConnRec *sslconn,
506506
else if (ssl != NULL && strcEQ(var, "COMPRESS_METHOD")) {
507507
result = ssl_var_lookup_ssl_compress_meth(ssl);
508508
}
509+
else if (ssl != NULL && strcEQ(var, "SHARED_CIPHERS")) {
510+
char buf[ 1024 * 16 ];
511+
if (SSL_get_shared_ciphers(ssl,buf,sizeof(buf)))
512+
result = apr_pstrdup(p,buf);
513+
}
509514
#ifdef HAVE_TLSEXT
510515
else if (ssl != NULL && strcEQ(var, "TLS_SNI")) {
511516
result = apr_pstrdup(p, SSL_get_servername(ssl,

0 commit comments

Comments
 (0)