Commit 89ee047c authored by Sietse Ringers's avatar Sietse Ringers
Browse files

fix: panic when reading private key with filename scheme.issuer.counter.xml

parent 41887718
......@@ -66,8 +66,8 @@ func NewPrivateKeyRingFolder(path string, conf *Configuration) (*PrivateKeyRingF
base := strings.TrimSuffix(filename, filepath.Ext(filename)) // strip .xml
if dotcount == 3 {
index := strings.LastIndex(base, ".")
base = base[:index]
counter, err = strconv.Atoi(base[index+1:])
base = base[:index]
}
sk, err := ring.readFile(filename)
if err != nil {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment