{:ok, cert} = X509.Certificate.from_pem(File.read!("cert.pem"))
{:ok,
{:OTPCertificate,
{:OTPTBSCertificate, :v3, 659044153923839650366784781981133796981832295134,
{:SignatureAlgorithm, {1, 3, 101, 112}, :asn1_NOVALUE},
{:rdnSequence,
[
[
{:AttributeTypeAndValue, {2, 5, 4, 3},
{:utf8String, "Jamixir Ed25519 Cert"}}
]
]},
{:Validity, {:utcTime, ~c"241224172510Z"}, {:utcTime, ~c"251224172510Z"}},
{:rdnSequence,
[
[
{:AttributeTypeAndValue, {2, 5, 4, 3},
{:utf8String, "Jamixir Ed25519 Cert"}}
]
]},
{:OTPSubjectPublicKeyInfo,
{:PublicKeyAlgorithm, {1, 3, 101, 112}, :asn1_NOVALUE},
{:ECPoint,
<<190, 37, 128, 158, 175, 169, 189, 141, 96, 149, 247, 38, 140, 106, 56,
195, 163, 19, 160, 90, 212, 255, 19, 170, 139, 104, 65, 80, 102, 146, 33,
244>>}}, :asn1_NOVALUE, :asn1_NOVALUE,
[
{:Extension, {2, 5, 29, 14}, false,
<<88, 127, 51, 143, 139, 84, 110, 21, 105, 209, 144, 254, 69, 145, 147,
196, 15, 144, 130, 97>>},
{:Extension, {2, 5, 29, 35}, false,
{:AuthorityKeyIdentifier,
<<88, 127, 51, 143, 139, 84, 110, 21, 105, 209, 144, 254, 69, 145, 147,
196, 15, 144, 130, 97>>, :asn1_NOVALUE, :asn1_NOVALUE}},
{:Extension, {2, 5, 29, 19}, true,
{:BasicConstraints, true, :asn1_NOVALUE}},
{:Extension, {2, 5, 29, 17}, false,
[dNSName: ~c"exysybhvpvg6y2yev64tiy2ryyorrhic22t7rhkulnbavazuseh2a===="]}
]}, {:SignatureAlgorithm, {1, 3, 101, 112}, :asn1_NOVALUE},
<<109, 74, 55, 253, 177, 96, 1, 238, 193, 121, 99, 236, 248, 151, 33, 176, 10,
201, 161, 144, 222, 205, 53, 73, 238, 171, 206, 124, 222, 21, 70, 222, 89,
51, 30, 190, 195, 103, 155, 232, 26, 26, 54, 74, ...>>}}
I have this certificate pem:
Which results in this info:
When I try to import it works:
But when I try to read the public key I get an error: