haskell-tls / hs-certificate

Certificate and Key Reader/Writer in haskell
60 stars 57 forks source link

Fix implicit certificate version. #86

Closed vdukhovni closed 6 years ago

vdukhovni commented 6 years ago

X.509 certificates without an explicit version are v1 certificates, but v1 is actually stored as 0 (just as v3 is 2). The Data.X509 API report the raw stored certificate versions, not the marketing name. Therefore, the implicit version is 0, not 1.

vincenthz commented 6 years ago

thanks @vdukhovni