aboutsummaryrefslogtreecommitdiff
path: root/registry/registry.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--registry/registry.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/registry/registry.go b/registry/registry.go
index 501edb5..7b47d73 100644
--- a/registry/registry.go
+++ b/registry/registry.go
@@ -207,13 +207,13 @@ func (r *Registry) Inbox(name string, req *http.Request) error {
pubKey := iter.Get()
pemProp := pubKey.GetW3IDSecurityV1PublicKeyPem()
pemStr := pemProp.Get()
- pemStr = strings.ReplaceAll(pemStr, `\n`, "")
+ pemStr = strings.ReplaceAll(pemStr, "\n", "")
logger.With("keyId", keyId).With("pem", pemStr).Debugf("extracted pem")
pemObj, _ := pem.Decode([]byte(pemStr))
if pemObj == nil {
return fmt.Errorf("no PEM block found")
}
- decodedKey, err := x509.ParsePKIXPublicKey(pemObj.Bytes)
+ decodedKey, err := x509.ParsePKCS1PublicKey(pemObj.Bytes)
if err != nil {
return err
}