Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPS support for the Lwt bindings #2

Merged
merged 2 commits into from
Jul 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ env:
- POST_INSTALL_HOOK="opam install --with-test httpaf-async httpaf-lwt-unix && opam exec -- make examples"
matrix:
- OCAML_VERSION="4.07"
- OCAML_VERSION="4.06"
- |
PRE_INSTALL_HOOK="sudo apt-get install -y libgmp-dev; opam install tls"
OCAML_VERSION="4.06"
- OCAML_VERSION="4.05"
15 changes: 15 additions & 0 deletions certificates/server.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQC2QEje5rwhlD2iq162+Ng3AH9BfA/jNJLDqi9VPk1eMUNGicJv
K+aOANKIsOOr9v4RiEXZSYmFEvGSy+Sf1bCDHwHLLSdNs6Y49b77POgatrVZOTRE
BE/t1soVT3a/vVJWCLtVCjm70u0S5tcfn4S6IapeIYAVAmcaqwSa+GQNoQIDAQAB
AoGAd/CShG8g/JBMh9Nz/8KAuKHRHc2BvysIM1C62cSosgaFmdRrazJfBrEv3Nlc
2/0uc2dVYIxuvm8bIFqi2TWOdX9jWJf6oXwEPXCD0SaDbJTaoh0b+wjyHuaGlttY
Ztvmf8mK1BOhyl3vNMxh/8Re0dGvGgPZHpn8zanaqfGVz+ECQQDngieUpwzxA0QZ
GZKRYhHoLEaPiQzBaXphqWcCLLN7oAKxZlUCUckxRRe0tKINf0cB3Kr9gGQjPpm0
YoqXo8mNAkEAyYgdd+JDi9FH3Cz6ijvPU0hYkriwTii0V09+Ar5DvYQNzNEIEJu8
Q3Yte/TPRuK8zhnp97Bsy9v/Ji/LSWbtZQJBAJe9y8u3otfmWCBLjrIUIcCYJLe4
ENBFHp4ctxPJ0Ora+mjkthuLF+BfdSZQr1dBcX1a8giuuvQO+Bgv7r9t75ECQC7F
omEyaA7JEW5uGe9/Fgz0G2ph5rkdBU3GKy6jzcDsJu/EC6UfH8Bgawn7tSd0c/E5
Xm2Xyog9lKfeK8XrV2kCQQCTico5lQPjfIwjhvn45ALc/0OrkaK0hQNpXgUNFJFQ
tuX2WMD5flMyA5PCx5XBU8gEMHYa8Kr5d6uoixnbS0cZ
-----END RSA PRIVATE KEY-----
15 changes: 15 additions & 0 deletions certificates/server.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-----BEGIN CERTIFICATE-----
MIICYzCCAcwCCQDLbE6ES1ih1DANBgkqhkiG9w0BAQUFADB2MQswCQYDVQQGEwJB
VTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0
cyBQdHkgTHRkMRUwEwYDVQQDDAxZT1VSIE5BTUUhISExGDAWBgkqhkiG9w0BCQEW
CW1lQGJhci5kZTAeFw0xNDAyMTcyMjA4NDVaFw0xNTAyMTcyMjA4NDVaMHYxCzAJ
BgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5l
dCBXaWRnaXRzIFB0eSBMdGQxFTATBgNVBAMMDFlPVVIgTkFNRSEhITEYMBYGCSqG
SIb3DQEJARYJbWVAYmFyLmRlMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2
QEje5rwhlD2iq162+Ng3AH9BfA/jNJLDqi9VPk1eMUNGicJvK+aOANKIsOOr9v4R
iEXZSYmFEvGSy+Sf1bCDHwHLLSdNs6Y49b77POgatrVZOTREBE/t1soVT3a/vVJW
CLtVCjm70u0S5tcfn4S6IapeIYAVAmcaqwSa+GQNoQIDAQABMA0GCSqGSIb3DQEB
BQUAA4GBAIo4ZppIlp3JRyltRC1/AyCC0tsh5TdM3W7258wdoP3lEe08UlLwpnPc
aJ/cX8rMG4Xf4it77yrbVrU3MumBEGN5TW4jn4+iZyFbp6TT3OUF55nsXDjNHBbu
deDVpGuPTI6CZQVhU5qEMF3xmlokG+VV+HCDTglNQc+fdLM0LoNF
-----END CERTIFICATE-----
7 changes: 5 additions & 2 deletions esy.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@
"@opam/faraday-async": "*",
"@opam/faraday-lwt-unix": "*",
"@opam/async": "*",
"@opam/mirage-conduit": "*"
"@opam/mirage-conduit": "*",
"@opam/tls-lwt": "*",
"@opam/lwt_ssl": "*",
"@opam/ssl": " >= 0.5.8"
},
"devDependencies": {
"@opam/alcotest": "*",
"@opam/merlin": "*",
"@opam/odoc": "*"
},
"resolutions": {
"@opam/conf-autoconf": "esy-packages/esy-autoconf#71a8836",
"@opam/conf-openssl": "esy-packages/esy-openssl#dafe9ad",
"@opam/mirage-conduit": {
"source": "mirage/ocaml-conduit:mirage-conduit.opam#0ce7ce3",
"override": {
Expand Down
180 changes: 164 additions & 16 deletions esy.lock/index.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
{
"checksum": "949caf211198825a6a9e6df70dd8d0ad",
"checksum": "2286a1d0333bbcf7c85298e4210aa0ce",
"root": "httpaf@link-dev:./esy.json",
"node": {
"yarn-pkg-config@github:esy-ocaml/yarn-pkg-config#cca65f99674ed2d954d28788edeb8c57fada5ed0@d41d8cd9": {
"id":
"yarn-pkg-config@github:esy-ocaml/yarn-pkg-config#cca65f99674ed2d954d28788edeb8c57fada5ed0@d41d8cd9",
"name": "yarn-pkg-config",
"version":
"github:esy-ocaml/yarn-pkg-config#cca65f99674ed2d954d28788edeb8c57fada5ed0",
"source": {
"type": "install",
"source": [
"github:esy-ocaml/yarn-pkg-config#cca65f99674ed2d954d28788edeb8c57fada5ed0"
]
},
"overrides": [],
"dependencies": [],
"devDependencies": []
},
"[email protected]@d41d8cd9": {
"id": "[email protected]@d41d8cd9",
"name": "ocaml",
Expand All @@ -24,8 +40,10 @@
"overrides": [],
"dependencies": [
"[email protected]@d41d8cd9",
"@opam/tls-lwt@github:dune-universe/ocaml-tls:tls-lwt.opam#9761033@d41d8cd9",
"@opam/ssl@opam:0.5.8@d93fd163",
"@opam/mirage-conduit@github:mirage/ocaml-conduit:mirage-conduit.opam#0ce7ce3@d2859b4f",
"@opam/lwt@opam:4.2.1@c1888ec9",
"@opam/lwt_ssl@opam:1.1.2@ac833920", "@opam/lwt@opam:4.2.1@c1888ec9",
"@opam/faraday-lwt-unix@opam:0.7.0@b0dea04f",
"@opam/faraday-async@opam:0.7.0@9afefd91",
"@opam/faraday@opam:0.7.0@6026a81f",
Expand Down Expand Up @@ -508,6 +526,35 @@
"@opam/lwt@opam:4.2.1@c1888ec9", "@opam/cstruct@opam:4.0.0@27f747cf"
]
},
"@opam/tls-lwt@github:dune-universe/ocaml-tls:tls-lwt.opam#9761033@d41d8cd9": {
"id":
"@opam/tls-lwt@github:dune-universe/ocaml-tls:tls-lwt.opam#9761033@d41d8cd9",
"name": "@opam/tls-lwt",
"version": "github:dune-universe/ocaml-tls:tls-lwt.opam#9761033",
"source": {
"type": "install",
"source": [ "github:dune-universe/ocaml-tls:tls-lwt.opam#9761033" ]
},
"overrides": [],
"dependencies": [
"@opam/x509@opam:0.6.3@79901d68",
"@opam/tls@github:dune-universe/ocaml-tls:tls.opam#9761033@d41d8cd9",
"@opam/sexplib@opam:v0.12.0@c65643bb",
"@opam/result@opam:1.4@7add0d71",
"@opam/nocrypto@github:TheLortex/ocaml-nocrypto:nocrypto.opam#df2348d@d86b9d71",
"@opam/lwt@opam:4.2.1@c1888ec9", "@opam/dune@opam:1.10.0@b15ce221",
"@opam/cstruct@opam:4.0.0@27f747cf",
"@esy-ocaml/[email protected]@d41d8cd9"
],
"devDependencies": [
"@opam/x509@opam:0.6.3@79901d68",
"@opam/tls@github:dune-universe/ocaml-tls:tls.opam#9761033@d41d8cd9",
"@opam/sexplib@opam:v0.12.0@c65643bb",
"@opam/result@opam:1.4@7add0d71",
"@opam/nocrypto@github:TheLortex/ocaml-nocrypto:nocrypto.opam#df2348d@d86b9d71",
"@opam/lwt@opam:4.2.1@c1888ec9", "@opam/cstruct@opam:4.0.0@27f747cf"
]
},
"@opam/tls@github:dune-universe/ocaml-tls:tls.opam#9761033@d41d8cd9": {
"id":
"@opam/tls@github:dune-universe/ocaml-tls:tls.opam#9761033@d41d8cd9",
Expand Down Expand Up @@ -690,6 +737,35 @@
"[email protected]@d41d8cd9", "@opam/base@opam:v0.12.2@e209c8f2"
]
},
"@opam/ssl@opam:0.5.8@d93fd163": {
"id": "@opam/ssl@opam:0.5.8@d93fd163",
"name": "@opam/ssl",
"version": "opam:0.5.8",
"source": {
"type": "install",
"source": [
"archive:https://opam.ocaml.org/cache/md5/4b/4b2cd1e21f25989b958e880f7b4791d1#md5:4b2cd1e21f25989b958e880f7b4791d1",
"archive:https://github.com/savonet/ocaml-ssl/archive/0.5.8.tar.gz#md5:4b2cd1e21f25989b958e880f7b4791d1"
],
"opam": {
"name": "ssl",
"version": "0.5.8",
"path": "esy.lock/opam/ssl.0.5.8"
}
},
"overrides": [],
"dependencies": [
"[email protected]@d41d8cd9", "@opam/dune@opam:1.10.0@b15ce221",
"@opam/conf-openssl@archive:https://github.com/openssl/openssl/archive/OpenSSL_1_1_1c.tar.gz#sha1:eb59b090bd757e30b676fb5e80c25ddb5a2f9511@ee5c2c69",
"@opam/base-unix@opam:base@87d0b2eb",
"@esy-ocaml/[email protected]@d41d8cd9"
],
"devDependencies": [
"[email protected]@d41d8cd9",
"@opam/conf-openssl@archive:https://github.com/openssl/openssl/archive/OpenSSL_1_1_1c.tar.gz#sha1:eb59b090bd757e30b676fb5e80c25ddb5a2f9511@ee5c2c69",
"@opam/base-unix@opam:base@87d0b2eb"
]
},
"@opam/splittable_random@opam:v0.12.0@0c34c3be": {
"id": "@opam/splittable_random@opam:v0.12.0@0c34c3be",
"name": "@opam/splittable_random",
Expand Down Expand Up @@ -2975,6 +3051,35 @@
"[email protected]@d41d8cd9", "@opam/sexplib0@opam:v0.12.0@e823b4e9"
]
},
"@opam/lwt_ssl@opam:1.1.2@ac833920": {
"id": "@opam/lwt_ssl@opam:1.1.2@ac833920",
"name": "@opam/lwt_ssl",
"version": "opam:1.1.2",
"source": {
"type": "install",
"source": [
"archive:https://opam.ocaml.org/cache/md5/d2/d239353b1e7c6e3fd4192c71a3b25ce2#md5:d239353b1e7c6e3fd4192c71a3b25ce2",
"archive:https://github.com/aantron/lwt_ssl/archive/1.1.2.tar.gz#md5:d239353b1e7c6e3fd4192c71a3b25ce2"
],
"opam": {
"name": "lwt_ssl",
"version": "1.1.2",
"path": "esy.lock/opam/lwt_ssl.1.1.2"
}
},
"overrides": [],
"dependencies": [
"[email protected]@d41d8cd9", "@opam/ssl@opam:0.5.8@d93fd163",
"@opam/lwt@opam:4.2.1@c1888ec9",
"@opam/jbuilder@opam:transition@58bdfe0a",
"@opam/base-unix@opam:base@87d0b2eb",
"@esy-ocaml/[email protected]@d41d8cd9"
],
"devDependencies": [
"[email protected]@d41d8cd9", "@opam/ssl@opam:0.5.8@d93fd163",
"@opam/lwt@opam:4.2.1@c1888ec9", "@opam/base-unix@opam:base@87d0b2eb"
]
},
"@opam/lwt@opam:4.2.1@c1888ec9": {
"id": "@opam/lwt@opam:4.2.1@c1888ec9",
"name": "@opam/lwt",
Expand Down Expand Up @@ -3163,27 +3268,26 @@
"@opam/bigarray-compat@opam:1.0.0@77cde57f"
]
},
"@opam/hashcons@opam:1.3@35d35e80": {
"id": "@opam/hashcons@opam:1.3@35d35e80",
"@opam/hashcons@opam:1.0.1@30492c11": {
"id": "@opam/hashcons@opam:1.0.1@30492c11",
"name": "@opam/hashcons",
"version": "opam:1.3",
"version": "opam:1.0.1",
"source": {
"type": "install",
"source": [
"archive:https://opam.ocaml.org/cache/md5/88/88b93515dd2667c4944574dfb50352bf#md5:88b93515dd2667c4944574dfb50352bf",
"archive:https://github.com/backtracking/ocaml-hashcons/archive/1.3.tar.gz#md5:88b93515dd2667c4944574dfb50352bf"
"archive:https://opam.ocaml.org/cache/md5/ca/caa6378c30d69baaf703e5f8b903a493#md5:caa6378c30d69baaf703e5f8b903a493",
"archive:https://github.com/dsheets/ocaml-hashcons/releases/download/1.0.1/ocaml-hashcons-1.0.1.tar.gz#md5:caa6378c30d69baaf703e5f8b903a493"
],
"opam": {
"name": "hashcons",
"version": "1.3",
"path": "esy.lock/opam/hashcons.1.3"
"version": "1.0.1",
"path": "esy.lock/opam/hashcons.1.0.1"
}
},
"overrides": [],
"dependencies": [
"[email protected]@d41d8cd9", "@opam/ocamlfind@opam:1.8.0@f744a0c5",
"@opam/conf-which@opam:1@56319cdb",
"@opam/conf-autoconf@github:esy-packages/esy-autoconf#71a8836@d41d8cd9",
"@esy-ocaml/[email protected]@d41d8cd9"
],
"devDependencies": [ "[email protected]@d41d8cd9" ]
Expand Down Expand Up @@ -3515,7 +3619,7 @@
"@opam/result@opam:1.4@7add0d71", "@opam/re@opam:1.9.0@7f4a36a5",
"@opam/ppx_cstruct@opam:5.0.0@cea738b4",
"@opam/ipaddr@opam:3.1.0@e0ecc70f",
"@opam/hashcons@opam:1.3@35d35e80",
"@opam/hashcons@opam:1.0.1@30492c11",
"@opam/dune@opam:1.10.0@b15ce221",
"@opam/cstruct@opam:4.0.0@27f747cf",
"@opam/base64@opam:3.2.0@e1bac209",
Expand All @@ -3526,7 +3630,7 @@
"@opam/result@opam:1.4@7add0d71", "@opam/re@opam:1.9.0@7f4a36a5",
"@opam/ppx_cstruct@opam:5.0.0@cea738b4",
"@opam/ipaddr@opam:3.1.0@e0ecc70f",
"@opam/hashcons@opam:1.3@35d35e80",
"@opam/hashcons@opam:1.0.1@30492c11",
"@opam/cstruct@opam:4.0.0@27f747cf",
"@opam/base64@opam:3.2.0@e1bac209"
]
Expand Down Expand Up @@ -3748,6 +3852,31 @@
"dependencies": [ "@esy-ocaml/[email protected]@d41d8cd9" ],
"devDependencies": []
},
"@opam/conf-pkg-config@opam:1.1@da0b7ce6": {
"id": "@opam/conf-pkg-config@opam:1.1@da0b7ce6",
"name": "@opam/conf-pkg-config",
"version": "opam:1.1",
"source": {
"type": "install",
"source": [ "no-source:" ],
"opam": {
"name": "conf-pkg-config",
"version": "1.1",
"path": "esy.lock/opam/conf-pkg-config.1.1"
}
},
"overrides": [
{
"opamoverride":
"esy.lock/overrides/opam__s__conf_pkg_config_opam__c__1.1_opam_override"
}
],
"dependencies": [
"yarn-pkg-config@github:esy-ocaml/yarn-pkg-config#cca65f99674ed2d954d28788edeb8c57fada5ed0@d41d8cd9",
"@esy-ocaml/[email protected]@d41d8cd9"
],
"devDependencies": []
},
"@opam/conf-perl@opam:1@3174af0e": {
"id": "@opam/conf-perl@opam:1@3174af0e",
"name": "@opam/conf-perl",
Expand All @@ -3765,6 +3894,25 @@
"dependencies": [ "@esy-ocaml/[email protected]@d41d8cd9" ],
"devDependencies": []
},
"@opam/conf-openssl@archive:https://github.com/openssl/openssl/archive/OpenSSL_1_1_1c.tar.gz#sha1:eb59b090bd757e30b676fb5e80c25ddb5a2f9511@ee5c2c69": {
"id":
"@opam/conf-openssl@archive:https://github.com/openssl/openssl/archive/OpenSSL_1_1_1c.tar.gz#sha1:eb59b090bd757e30b676fb5e80c25ddb5a2f9511@ee5c2c69",
"name": "@opam/conf-openssl",
"version":
"archive:https://github.com/openssl/openssl/archive/OpenSSL_1_1_1c.tar.gz#sha1:eb59b090bd757e30b676fb5e80c25ddb5a2f9511",
"source": {
"type": "install",
"source": [
"archive:https://github.com/openssl/openssl/archive/OpenSSL_1_1_1c.tar.gz#sha1:eb59b090bd757e30b676fb5e80c25ddb5a2f9511"
]
},
"overrides": [ "esy.lock/overrides/ee5c2c6906d87e3ea9a19e8e3dac5ec6" ],
"dependencies": [
"@opam/conf-pkg-config@opam:1.1@da0b7ce6",
"@opam/conf-autoconf@github:esy-packages/esy-autoconf:package.json#71a8836@d41d8cd9"
],
"devDependencies": []
},
"@opam/conf-m4@opam:1@dd7dde42": {
"id": "@opam/conf-m4@opam:1@dd7dde42",
"name": "@opam/conf-m4",
Expand Down Expand Up @@ -3807,14 +3955,14 @@
],
"devDependencies": []
},
"@opam/conf-autoconf@github:esy-packages/esy-autoconf#71a8836@d41d8cd9": {
"@opam/conf-autoconf@github:esy-packages/esy-autoconf:package.json#71a8836@d41d8cd9": {
"id":
"@opam/conf-autoconf@github:esy-packages/esy-autoconf#71a8836@d41d8cd9",
"@opam/conf-autoconf@github:esy-packages/esy-autoconf:package.json#71a8836@d41d8cd9",
"name": "@opam/conf-autoconf",
"version": "github:esy-packages/esy-autoconf#71a8836",
"version": "github:esy-packages/esy-autoconf:package.json#71a8836",
"source": {
"type": "install",
"source": [ "github:esy-packages/esy-autoconf#71a8836" ]
"source": [ "github:esy-packages/esy-autoconf:package.json#71a8836" ]
},
"overrides": [],
"dependencies": [],
Expand Down
39 changes: 39 additions & 0 deletions esy.lock/opam/conf-pkg-config.1.1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
opam-version: "2.0"
maintainer: "[email protected]"
authors: ["Francois Berenger"]
homepage: "http://www.freedesktop.org/wiki/Software/pkg-config/"
bug-reports: "https://github.com/ocaml/opam-repository/issues"
license: "GPL"
build: [
["pkg-config" "--help"]
]
install: [
["ln" "-s" "/usr/local/bin/pkgconf" "%{bin}%/pkg-config"] {os = "openbsd"}
]
remove: [
["rm" "-f" "%{bin}%/pkg-config"] {os = "openbsd"}
]
post-messages: [
"conf-pkg-config: A symlink to /usr/local/bin/pkgconf has been installed in the OPAM bin directory (%{bin}%) on your PATH as 'pkg-config'. This is necessary for correct operation." {os = "openbsd"}
]
depexts: [
["pkg-config"] {os-distribution = "debian"}
["pkg-config"] {os-distribution = "ubuntu"}
["pkg-config"] {os-distribution = "arch"}
["pkgconfig"] {os-distribution = "fedora"}
["pkgconfig"] {os-distribution = "centos"}
["pkgconfig"] {os-distribution = "mageia"}
["pkgconfig"] {os-distribution = "rhel"}
["pkgconfig"] {os-distribution = "ol"}
["pkgconfig"] {os-distribution = "alpine"}
["devel/pkgconf"] {os = "freebsd"}
["devel/pkgconf"] {os = "openbsd"}
["pkg-config"] {os = "macos" & os-distribution = "homebrew"}
["pkgconf"] {os = "freebsd"}
["pkg-config"] {os-distribution = "cygwinports"}
]
synopsis: "Virtual package relying on pkg-config installation"
description: """
This package can only install if the pkg-config package is installed
on the system."""
flags: conf
Loading