commercialhaskell / commercialhaskell/stack

Option to disable certificate checks

Open
#5,669 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

My situation: Trying to get CI on GitLab.com (not mine instance) working. It's stable Windows 10 version (1809, same as MS distributes as VM images).

```
2022-01-03 15:33:08.214245: [debug] Parsing cabal file for regex-posix (from Hackage)
2022-01-03 15:33:08.292369: [info] Cabal file info not found for regex-posix-0.96.0.0@sha256:bd870f983a21bb474bd96449736f011c599981ce70da808a21ec1a28292e5481,2861, updating
2022-01-03 15:33:08.292369: [info] Selected mirror https://hackage.haskell.org/
2022-01-03 15:33:08.292369: [info] Downloading root
2022-01-03 15:33:08.392479: [error] HttpExceptionRequest Request {
host = "hackage.haskell.org"
port = 443
secure = True
requestHeaders = [("Accept-Encoding",""),("User-Agent","Haskell pantry package")]
path = "/root.json"
queryString = ""
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
(InternalException (HandshakeFailed (Error_Protocol ("certificate has unknown CA",True,UnknownCa))))
Cleaning up file based variables
00:07
ERROR: Job failed: exit status 1
```

From what I read, the "solution" is to either update Windows or open sites in Internet Explorer. I don't know how to do that from powershell (not sure if even possible on the GitLab runner; I tried [this](https://stackoverflow.com/questions/32654493/stack-haskell-throws-tlsexception-in-windows/69611484#69611484) which didn't work). I don't care about (in)security of the runner, it's isolated, I won't use any artifacts from it (I just want a check that it compiles and runs on Windows) and is time-limited.

**I believe for cases such these an option to disable all certificate checks should be added, something akin to `--no-check-certificate` in `wget` or `-k`/`--insecure` in `curl`.**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.