Skip to content
Snippets Groups Projects
Commit 0cdc8fdc authored by godog's avatar godog
Browse files

Merge branch 'cerbot_names' into 'master'

Switch to certbot pem names

See merge request ai3/tools/acmeserver!1
parents a32c41b4 a5477d77
No related branches found
No related tags found
No related merge requests found
......@@ -125,7 +125,7 @@ func TestManager_NewCert(t *testing.T) {
if _, err := os.Stat(p); err != nil {
t.Fatalf("file not created: %v", err)
}
p = filepath.Join(m.configDirs[0], "../certs/example.com/private_key.pem")
p = filepath.Join(m.configDirs[0], "../certs/example.com/privkey.pem")
if _, err := os.Stat(p); err != nil {
t.Fatalf("file not created: %v", err)
}
......
......@@ -25,7 +25,7 @@ type dirStorage struct {
func (d *dirStorage) GetCert(cn string) ([][]byte, crypto.Signer, error) {
certPath := filepath.Join(d.root, cn, "fullchain.pem")
keyPath := filepath.Join(d.root, cn, "private_key.pem")
keyPath := filepath.Join(d.root, cn, "privkey.pem")
der, err := parseCertsFromFile(certPath)
if err != nil {
......@@ -53,7 +53,7 @@ func (d *dirStorage) PutCert(cn string, der [][]byte, key crypto.Signer) error {
for path, data := range filemap {
var mode os.FileMode = 0644
if strings.HasSuffix(path, "private_key.pem") {
if strings.HasSuffix(path, "privkey.pem") {
mode = 0400
}
log.Printf("writing %s (%03o)", path, mode)
......@@ -83,7 +83,7 @@ func dumpCertsAndKey(cn string, der [][]byte, key crypto.Signer) (map[string][]b
if err != nil {
return nil, err
}
m[filepath.Join(cn, "private_key.pem")] = data
m[filepath.Join(cn, "privkey.pem")] = data
return m, nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment