From a5f6f68b7c00cdd0c7a86c2374f79d26d60caaee Mon Sep 17 00:00:00 2001 From: Julio Capote Date: Wed, 4 Jan 2023 10:17:10 -0500 Subject: try this --- registry/registry.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'registry/registry.go') 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 } -- cgit v1.2.3