Merged
Conversation
added 24 commits
May 25, 2021 20:40
Contributor
Author
|
This isn't building right now because there's a compatibility issue with the scotty-tls in hackage and warp: scotty-web/scotty-tls#8 https://gitpod.io#snapshot/d3211af8-74e6-496a-adbb-8bf4a3d67660 |
added 3 commits
May 29, 2021 00:38
added 7 commits
June 4, 2021 18:51
Contributor
Author
|
TLS usage: # Generate a certificate. Self-signed example:
openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr \
-subj "/C=GB/ST=London/L=London/O=Acme Widgets/OU=IT Department/CN=localhost"
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
# Change owner uid of the certificate and key to `1000` to match cryptol user in container image:
chown 1000 server.crt server.key
# Start server:
docker run --rm -ti --detach \
-v $PWD/server.crt:/home/cryptol/server.crt \
-v $PWD/server.key:/home/cryptol/server.key \
-e TLS_ENABLE=1 \
-p 443:8080 \
ghcr.io/galoisinc/cryptol-remote-api:tls-demo
# Connect to server
curl -k \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-XPOST \
-d '{"jsonrpc":"2.0","id":1,"method":"load module","params":{"module name":"Cryptol","state":null}}' \
https://localhost/Result: {
"result": {
"state": "81ecbea3-6a4c-49a3-abe3-853b90cb18cb",
"stdout": "",
"stderr": "",
"answer": []
},
"jsonrpc": "2.0",
"id": 1
} |
Contributor
|
GaloisInc/argo#165 has been merged - of note:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use scotty-tls to add TLS support to cryptol-remote-api.
scotty-tls updated in hackageAMK: we basically inlined the one function needed to enable TLS in argo, so this isn't an issue anymorehttps://hackage.haskell.org/package/scotty-tls-0.4.2curl -kequivalent in python: Allow Python client to connect to server with self-signed certificate argo#168 @pnwamkCloses #1008