From b01bb275b395643542ceca4fbc82bedea8e43937 Mon Sep 17 00:00:00 2001 From: Gaurav Dhameeja Date: Thu, 17 Sep 2020 02:36:51 +0530 Subject: caddyhttp: New placeholder for PEM of client certificate (#3662) * Fix-3585: added placeholder for a PEM encoded value of the certificate * Update modules/caddyhttp/replacer.go Change type of block and empty headers removed Co-authored-by: Matt Holt * fixed tests Co-authored-by: Matt Holt --- modules/caddyhttp/replacer_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/caddyhttp/replacer_test.go') diff --git a/modules/caddyhttp/replacer_test.go b/modules/caddyhttp/replacer_test.go index 49167ee..486a8e3 100644 --- a/modules/caddyhttp/replacer_test.go +++ b/modules/caddyhttp/replacer_test.go @@ -171,6 +171,10 @@ eqp31wM9il1n+guTNyxJd+FzVAH+hCZE5K+tCgVDdVFUlDEHHbS/wqb2PSIoouLV input: "{http.request.tls.client.san.ips.0}", expect: "127.0.0.1", }, + { + input: "{http.request.tls.client.certificate_pem}", + expect: string(clientCert) + "\n", // returned value comes with a newline appended to it + }, } { actual := repl.ReplaceAll(tc.input, "") if actual != tc.expect { -- cgit v1.2.3