X509 versions are 0 -> V1 ; 1 -> V2 ; 2 -> V3 -- fix that mapping here!
bail on unknown version
Merge pull request #114 from mirleft/x509-tests-and-fixes

X509 tests and fixes