| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 
 | ### Please describe the problem.
When creating a https webdav repository under openbsd it complains that /etc/ssl/certs doesn't exist. This is true considering all certs are stored in /etc/ssl/cert.pem.
After /etc/ssl/certs is created it complains about that the certificate has an unknown CA, for obvious reasons.
A workaround is to symlink /etc/ssl/cert.pem in /etc/ssl/certs
### What steps will reproduce the problem?
See below
### What version of git-annex are you using? On what operating system?
5.20140129 under OpenBSD 5.4
### Please provide any additional information below.
[[!format sh """
# If you can, paste a complete transcript of the problem occurring here.
# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log
WEBDAV_USERNAME=<username> WEBDAV_PASSWORD=<password> git annex initremote box.com type=webdav url=https://dav.box.com/dav/Documents chunksize=100mb encryption=hybrid keyid=<key> mac=HMACSHA512
initremote box.com (encryption setup) (hybrid cipher with gpg key <key>) (testing WebDAV server...)
git-annex: WebDAV failed to write file: /etc/ssl/certs/: getDirectoryContents: does not exist (No such file or directory): user error
failed
git-annex: initremote: 1 failed
# End of transcript or log.
"""]]
> This needs to be fixed in the haskell certificate library.
> I have filed a bug there:
> <https://github.com/vincenthz/hs-certificate/issues/26>
> 
> Patch would probably be pretty simple. Based on description, something like
> this:
[[!format patch """
diff --git a/System/Certificate/X509/Unix.hs b/System/Certificate/X509/Unix.hs
index 8463465..74316e9 100644
--- a/System/Certificate/X509/Unix.hs
+++ b/System/Certificate/X509/Unix.hs
@@ -50,7 +50,7 @@ listDirectoryCerts path = (map (path </>) . filter isCert <$> getDirectoryConten
           isCert x = (not $ isPrefixOf "." x) && (not $ isHashedFile x)
 
 getSystemCertificateStore :: IO CertificateStore
-getSystemCertificateStore = makeCertificateStore . concat <$> (getSystemPath >>= listDirectoryCerts >>= mapM readCertificates)
+getSystemCertificateStore = makeCertificateStore <$> readCertificates "/etc/ssl/cert.pem"
 
 getSystemPath :: IO FilePath
 getSystemPath = E.catch (getEnv envPathOverride) inDefault
"""]]
> 
> [[closing|done]] as no changes to git-annex can fix this. --[[Joey]] 
 |