seclib2: add doc describing the protocol on removal of tmpfile

This commit is contained in:
Yousong Zhou
2019-11-05 03:55:34 +00:00
parent 27226aa623
commit 9ea42cf7e2
+4
View File
@@ -24,6 +24,10 @@ const (
certBeginString = "BEGIN CERTIFICATE"
)
// MergeCaCertFiles concatenates cert and ca file to form a chain, write it to
// a tmpfile then return the path
//
// Callers are responsible for removing the returned tmpfile
func MergeCaCertFiles(cafile string, certfile string) (string, error) {
tmpfile, err := ioutil.TempFile("", "cerfile.*.crt")
if err != nil {