pyca/cryptography — pull request #1442 by reaperhulk (2014-10-24 22:48:25+00:00)
Title: [WIP] X509 interfaces

Replaces #1267.

Several outstanding questions:

- Do we want to blow up when an X509Name has multiple identical OIDs in a single Name?
- Do we want to blow up when an X509Certificate has multiple extensions with the same OID?
- Do we want to have convenience properties for every X509 extension type or have users call something like `get_extension(extension_name)` where `extension_name` is provided by an enum.
- Same question for `X509Name`. Right now I've deliberately set up this PR with both approaches so people can see it and weigh in.

A bit more detail than is in the PR:

- `version` will return an enum object that will correspond to v1 or v3. Leaving it an integer is a mistake many other APIs have made to their sorrow.
- If we decide to go down a convenience methods path we'll have to decide between an exception or a None when asking for something that isn't present in the cert/name.