aboutsummaryrefslogtreecommitdiff
path: root/ex.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-04-13 06:59:54 +0000
committerOmar Polo <op@omarpolo.com>2021-04-13 06:59:54 +0000
commit89541eeec019626df4651f44b90df6a31a844dab (patch)
tree1929cc294de02a0ff6bdfe20a2a5d97cb4ebb0b0 /ex.c
parentb211d0f7d9908de446e1ab4873a3191d53ebf00b (diff)
define TLS_VERSION, TLS_CIPHER and TLS_CIPHER_STRENGTH for CGI scripts
Diffstat (limited to 'ex.c')
-rw-r--r--ex.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ex.c b/ex.c
index e08da7b..b8590f1 100644
--- a/ex.c
+++ b/ex.c
@@ -184,6 +184,12 @@ launch_cgi(struct iri *iri, struct cgireq *req, struct vhost *vhost)
safe_setenv("REMOTE_USER", req->subject);
safe_setenv("TLS_CLIENT_ISSUER", req->issuer);
safe_setenv("TLS_CLIENT_HASH", req->hash);
+ safe_setenv("TLS_VERSION", req->version);
+ safe_setenv("TLS_CIPHER", req->cipher);
+
+ snprintf(path, sizeof(path), "%d", req->cipher_strength);
+ safe_setenv("TLS_CIPHER_STRENGTH", path);
+
setenv_time("TLS_CLIENT_NOT_AFTER", req->notafter);
setenv_time("TLS_CLIENT_NOT_BEFORE", req->notbefore);