haskell-tls / hs-certificate

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

Build failure on Windows with bytestring >= 0.10 #21

Closed ygale closed 11 years ago

ygale commented 11 years ago

The code for the Windows system cert store - which I realize is (temporarily?) commented out in certificate 1.3.8 - does not compile with bytestring >= 0.10. The reason is that System.Certificate.X509.Win32 uses the low-level ByteString function memcpy whose type signature changed slightly.

We need to use certificate 1.2.* due to complex indirect dependencies, and none of those are buildable anymore on Windows for this reason. Is it possible to issue a maintenance release, say 1.2.9, that fixes this problem? I'm pretty sure all you need is a fromIntegral somewhere to make it build for all versions of bytestring. I'll send you a pull request if you'd like. Or just comment out the entire module for now and replace it with the stub, as in 1.3.8. Thanks.

vincenthz commented 11 years ago

i've uploaded a 1.2.9 with a fromintegral fix on memcpy, but you should really consider upgrading. The system certificate never worked on windows so far, i just fixed it couple of days ago actually in x509-system (certificate has been splitted after 1.3.x in multiple x509-* packages).

https://github.com/vincenthz/hs-certificate/commit/06e8c7fd0575360fbc7317b3c1c2cd2e46008877

vincenthz commented 11 years ago

out of curiosity, what's the reason why you're stuck on this ancient version ? you mentioned indirect dependencies, so which packages is blocking you from getting newer version ?

ygale commented 11 years ago

Thanks. Could be. We're not actually using system certificates on Windows AFAIK. We just need the package to build.

This came up in the context of a large and complex web app based on Yesod. Yesod 1.1 by default pulls in an older version of certificates via a long and complicated chain of dependencies. Porting from yesod 1.1 to the current 1.2 will take some work, and we haven't gotten around to it yet. Furthermore, we will still need to support released versions based on pre-1.2 Yesod for some time to come.