diff --git a/DysonNetwork.Sphere/ActivityPub/ActivityPubKeyService.cs b/DysonNetwork.Sphere/ActivityPub/ActivityPubKeyService.cs index 4a7f131..e841264 100644 --- a/DysonNetwork.Sphere/ActivityPub/ActivityPubKeyService.cs +++ b/DysonNetwork.Sphere/ActivityPub/ActivityPubKeyService.cs @@ -11,7 +11,7 @@ public class ActivityPubKeyService(ILogger logger) using var rsa = RSA.Create(2048); var privateKey = rsa.ExportRSAPrivateKey(); - var publicKey = rsa.ExportRSAPublicKey(); + var publicKey = rsa.ExportSubjectPublicKeyInfo(); var privateKeyPem = ConvertToPem(privateKey, "RSA PRIVATE KEY"); var publicKeyPem = ConvertToPem(publicKey, "PUBLIC KEY");