diff options
author | Julio Capote <jcapote@gmail.com> | 2023-01-04 15:17:10 +0000 |
---|---|---|
committer | Julio Capote <jcapote@gmail.com> | 2023-01-04 15:17:10 +0000 |
commit | a5f6f68b7c00cdd0c7a86c2374f79d26d60caaee (patch) | |
tree | 5319676ea505421256283de96527f5a8491cf1a4 | |
parent | fba1cfee6677c4f61d4c6977f7e82228e6791118 (diff) | |
download | communique-a5f6f68b7c00cdd0c7a86c2374f79d26d60caaee.tar.gz |
try this
-rw-r--r-- | registry/registry.go | 4 |
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 } |