From 7c28ecb5f487e24a982a10cb5c5a77dc03c38db1 Mon Sep 17 00:00:00 2001 From: Gaurav Dhameeja Date: Thu, 5 Nov 2020 00:07:41 +0530 Subject: httpcaddyfile: Add certificate_pem placeholder short, add to godoc (#3846) Co-authored-by: Matt Holt Co-authored-by: Francis Lavoie --- caddyconfig/httpcaddyfile/httptype.go | 1 + modules/caddyhttp/app.go | 1 + 2 files changed, 2 insertions(+) diff --git a/caddyconfig/httpcaddyfile/httptype.go b/caddyconfig/httpcaddyfile/httptype.go index a19a6fedd..35eab9069 100644 --- a/caddyconfig/httpcaddyfile/httptype.go +++ b/caddyconfig/httpcaddyfile/httptype.go @@ -99,6 +99,7 @@ func (st ServerType) Setup(inputServerBlocks []caddyfile.ServerBlock, "{tls_client_issuer}", "{http.request.tls.client.issuer}", "{tls_client_serial}", "{http.request.tls.client.serial}", "{tls_client_subject}", "{http.request.tls.client.subject}", + "{tls_client_certificate_pem}", "{http.request.tls.client.certificate_pem}", ) // these are placeholders that allow a user-defined final diff --git a/modules/caddyhttp/app.go b/modules/caddyhttp/app.go index 41820ea6c..f5f079c7a 100644 --- a/modules/caddyhttp/app.go +++ b/modules/caddyhttp/app.go @@ -75,6 +75,7 @@ func init() { // `{http.request.tls.client.fingerprint}` | The SHA256 checksum of the client certificate // `{http.request.tls.client.public_key}` | The public key of the client certificate. // `{http.request.tls.client.public_key_sha256}` | The SHA256 checksum of the client's public key. +// `{http.request.tls.client.certificate_pem}` | The PEM-encoded value of the certificate. // `{http.request.tls.client.issuer}` | The issuer DN of the client certificate // `{http.request.tls.client.serial}` | The serial number of the client certificate // `{http.request.tls.client.subject}` | The subject DN of the client certificate -- cgit v1.2.3