瀏覽代碼

Add a -client suffix to filenames when generating client certificates

Filippo Valsorda 6 年之前
父節點
當前提交
9e9563535e
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      cert.go

+ 3 - 0
cert.go

@@ -149,6 +149,9 @@ func (m *mkcert) fileNames(hosts []string) (certFile, keyFile, p12File string) {
 	if len(hosts) > 1 {
 		defaultName += "+" + strconv.Itoa(len(hosts)-1)
 	}
+	if m.client {
+		defaultName += "-client"
+	}
 
 	certFile = "./" + defaultName + ".pem"
 	if m.certFile != "" {