Skip to content

Commit adbdf5d

Browse files
committed
Set cms auth cert header and print headers
1 parent 825ee03 commit adbdf5d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

x509.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ func x509RequestHandler(w http.ResponseWriter, r *http.Request) {
4444
level = true
4545
}
4646
CMSAuth.SetCMSHeaders(r, userData, CricRecords, level)
47+
if r.Header.Get("Cms-Auth-Cert") == "" {
48+
if dn, ok := userData["dn"]; ok {
49+
r.Header.Set("Cms-Auth-Cert", dn.(string))
50+
}
51+
}
52+
if Config.Verbose > 0 {
53+
printHTTPRequest(r, "cms headers")
54+
}
4755
// add logRequest after we set cms headers in HTTP request
4856
defer logRequest(w, r, start, "x509", &status, tstamp)
4957
if _, ok := userData["name"]; !ok {

0 commit comments

Comments
 (0)