Created
September 18, 2020 10:40
-
-
Save vasily-kirichenko/219df2fd8b5f26f0abb063ccf0063e81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// download https://drive.google.com/file/d/1kXYcIkDMX25km5YtSBfFa9Xxx2dx8cNB/view?usp=sharing locally | |
using System; | |
using System.IO; | |
using System.Security.Cryptography.X509Certificates; | |
namespace EccSigNet5 | |
{ | |
static class Program | |
{ | |
static void Main() | |
{ | |
var cert = new X509Certificate2(File.ReadAllBytes("<path to the downloaded certificate>")); | |
Console.WriteLine(cert.PublicKey.Key); | |
} | |
} | |
} | |
// Unhandled exception. System.NotSupportedException: The certificate key algorithm is not supported. | |
// at System.Security.Cryptography.X509Certificates.PublicKey.get_Key() | |
// at EccSigNet5.Program.Main() in C:\WLCR\github\EccSig\EccSigNet5\Program.cs:line 12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The exception is thrown here https://referencesource.microsoft.com/#System/security/system/security/cryptography/x509/x509certificate2.cs,111