MCPcopy Create free account
hub / github.com/evenh/intercert / absoluteFileName

Method absoluteFileName

client/storage.go:97–108  ·  view source on GitHub ↗
(domain string, keyType int)

Source from the content-addressed store, hash-verified

95}
96
97func (c *CertStorage) absoluteFileName(domain string, keyType int) (string, error) {
98 base := c.storageDirectory + "/" + strings.ToLower(domain)
99
100 switch keyType {
101 case privateKey:
102 return base + ".key", nil
103 case certificate:
104 return base + ".cer", nil
105 default:
106 return "", errors.New("Unknown key type: " + strconv.Itoa(keyType))
107 }
108}
109
110func (c *CertStorage) readCerts() ([]string, error) {
111 var files []string

Callers 1

StoreMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected