The addition of an examples section in x509 to cover common questions like this might be useful actually. If you're interested in submitting a PR adding that we'd be happy to review!
-Paul On April 24, 2017 at 2:24:00 AM, Paul King via Cryptography-dev ( cryptography-dev@python.org) wrote: Sorry. Being very stupid. from cryptography.hazmat.primitives.asymmetric import ec print isinstance(cert.public_key(), ec.EllipticCurvePublicKey) On 24 Apr 2017, at 08:21, Paul King via Cryptography-dev < cryptography-dev@python.org> wrote: Thanks Alex. I am now appreciating how good your documentation is! I am struggling to do a test for the type of public key. In the documentation it shows an example for RSA but I am too stupid to get it to work. print cert.public_key() <cryptography.hazmat.backends.openssl.ec._EllipticCurvePublicKey object at 0x102b5a3d0> print type( cert.public_key() ) <class 'cryptography.hazmat.backends.openssl.ec._EllipticCurvePublicKey’> How do I test for that? On 21 Apr 2017, at 02:07, Alex Gaynor <alex.gay...@gmail.com> wrote: (Please reply to the full mailing lists) https://cryptography.io/en/latest/hazmat/primitives/asymmetric/ec/#cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicKey describes the methods that an EllipticCurvePublicKey has for exporting the key, either to bytes or ot raw numbers. Alex _______________________________________________ Cryptography-dev mailing list Cryptography-dev@python.org https://mail.python.org/mailman/listinfo/cryptography-dev _______________________________________________ Cryptography-dev mailing list Cryptography-dev@python.org https://mail.python.org/mailman/listinfo/cryptography-dev
_______________________________________________ Cryptography-dev mailing list Cryptography-dev@python.org https://mail.python.org/mailman/listinfo/cryptography-dev