WIP: Provide OCSP verification endpoint and persist certs to disk#1
WIP: Provide OCSP verification endpoint and persist certs to disk#1jameshartig wants to merge 1 commit intomasterfrom
Conversation
certs/certs.go
Outdated
There was a problem hiding this comment.
Instead of checking if the file exists, you might as well just do a Create and Chmod on it either way and save some code.
|
@mediocregopher thanks! I just updated and fixed your comments. I also added |
certs/certs.go
Outdated
There was a problem hiding this comment.
you can initialize channels in the global scope like this:
+var (
listCh = make(chan listReq)
saveCh = make(chan saveReq)
timeFmt = "2006-01-02T15:04:05"
fileFmt = "%s | %s | %s | %s"
)
|
In main.go you have a lot of repeated code in the handlers. I think quite a bit of it could be generalized into some middleware, specifically the It's a bit tricky because multiple things need to use the raw body data, I would suggest first passing all requests through a middleware which reads the body into a buffer (using an |
|
Okay so I fixed all the code comments you already made and I'll work on the middleware next week at some point. |
Depends on cloudflare/cfssl#309