Skip to content

Commit

Permalink
Merge pull request #196 from JuliaWeb/jq/fix
Browse files Browse the repository at this point in the history
Change mbedtls library version to 2.13 to ensure compatibility with …
  • Loading branch information
quinnj authored Mar 6, 2019
2 parents 6a72176 + dbf06ff commit b71d85d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ os:
- osx
julia:
- 1.0
- 0.7
- 1.1
- nightly
notifications:
email: false
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
environment:
matrix:
- julia_version: 0.7
- julia_version: 1.0
- julia_version: 1.1
- julia_version: latest

platform:
Expand Down
44 changes: 22 additions & 22 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,38 @@ using BinaryProvider, Libdl
const verbose = "--verbose" in ARGS
const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr")))
products = [
LibraryProduct(prefix, String["libmbedx509"], :libmbedx509),
LibraryProduct(prefix, String["libmbedcrypto"], :libmbedcrypto),
LibraryProduct(prefix, String["libmbedtls"], :libmbedtls),
LibraryProduct(prefix, String["libmbedx509"], :libmbedx509),
]

const juliaprefix = joinpath(Sys.BINDIR, "..")

juliaproducts = Product[
LibraryProduct(juliaprefix, "libmbedx509", :libmbedx509),
LibraryProduct(juliaprefix, "libmbedcrypto", :libmbedcrypto),
LibraryProduct(juliaprefix, "libmbedtls", :libmbedtls)
LibraryProduct(juliaprefix, "libmbedcrypto", :libmbedcrypto)
LibraryProduct(juliaprefix, "libmbedx509", :libmbedx509)
]

# Download binaries from hosted location
bin_prefix = "https://github.com/JuliaWeb/MbedTLSBuilder/releases/download/v0.17.0"
bin_prefix = "https://github.com/JuliaWeb/MbedTLSBuilder/releases/download/v0.16.0"

# Listing of files generated by BinaryBuilder:
download_info = Dict(
Linux(:aarch64, libc=:glibc) => ("$bin_prefix/MbedTLS.v2.16.0.aarch64-linux-gnu.tar.gz", "aeaaabcef59f4587bbd003a3cb891d85e9d723cba641fd004bc3273bf574dad5"),
Linux(:aarch64, libc=:musl) => ("$bin_prefix/MbedTLS.v2.16.0.aarch64-linux-musl.tar.gz", "dcc4c21affc2e687ae43bac42ff9481a70e9824fc08518987b805b9e318f0068"),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/MbedTLS.v2.16.0.arm-linux-gnueabihf.tar.gz", "48cd2b4cbd9b2f4a7ab2f1060a240b1170b5807af236777602cd331c6b29c037"),
Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/MbedTLS.v2.16.0.arm-linux-musleabihf.tar.gz", "25003edb6fb346e4cd299c30b7660f6abb8e493df75fa224951d252cee4b5e28"),
Linux(:i686, libc=:glibc) => ("$bin_prefix/MbedTLS.v2.16.0.i686-linux-gnu.tar.gz", "113d3e8220ea24d2e075623cebcb2e0a1864bada52d5d9065cddc7b04ed24f1c"),
Linux(:i686, libc=:musl) => ("$bin_prefix/MbedTLS.v2.16.0.i686-linux-musl.tar.gz", "48531771fcfb69cbc79abde1c06ac74e5e5d9e24367a111eac6cbfe42e5377c8"),
Windows(:i686) => ("$bin_prefix/MbedTLS.v2.16.0.i686-w64-mingw32.tar.gz", "5be5cae452e513780380f276a19f2cd5eecbecad01728fd180b1c19022369e96"),
Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/MbedTLS.v2.16.0.powerpc64le-linux-gnu.tar.gz", "d07a85c710a82bd7ab0d9eabb469e378ce31083161ff864f157962ec018db4e2"),
MacOS(:x86_64) => ("$bin_prefix/MbedTLS.v2.16.0.x86_64-apple-darwin14.tar.gz", "8939d8b39618d9206feac886298070f5519ab13ac190b44d99da5e62b3d5fef1"),
Linux(:x86_64, libc=:glibc) => ("$bin_prefix/MbedTLS.v2.16.0.x86_64-linux-gnu.tar.gz", "f8985d86a78e03c7b7cd169c664b93ebe9eb726c652be7bb96707810b0c68bbf"),
Linux(:x86_64, libc=:musl) => ("$bin_prefix/MbedTLS.v2.16.0.x86_64-linux-musl.tar.gz", "e9a254ff953899f79b79af8f30f9a95f0acc21f44d5a3cf683cfc19b1fb21808"),
FreeBSD(:x86_64) => ("$bin_prefix/MbedTLS.v2.16.0.x86_64-unknown-freebsd11.1.tar.gz", "8c923544323c6009a46a70cedf7fb714c5d9e0f23650c2ef8b151a84bf74f527"),
Windows(:x86_64) => ("$bin_prefix/MbedTLS.v2.16.0.x86_64-w64-mingw32.tar.gz", "85b95b43014fc8370c3dd8b41f341c6849fcde12e321c24faa8a86193161252e"),
)
download_info = Dict(
Linux(:aarch64, libc=:glibc) => ("$bin_prefix/MbedTLS.v2.13.1.aarch64-linux-gnu.tar.gz", "051b7b40911154196d0378bd41a2cc0182e4c5e3aa06506702adca36a875018f"),
Linux(:aarch64, libc=:musl) => ("$bin_prefix/MbedTLS.v2.13.1.aarch64-linux-musl.tar.gz", "d031de3dd7723b647aa8dcb5fbe9777e7db0927e04a8cbf779a4a9da1f767061"),
Linux(:armv7l, libc=:glibc, call_abi=:eabihf) => ("$bin_prefix/MbedTLS.v2.13.1.arm-linux-gnueabihf.tar.gz", "77adab909961fc750579c0fec87152b74048e466d8b9ca80df6d4f286fc92101"),
Linux(:armv7l, libc=:musl, call_abi=:eabihf) => ("$bin_prefix/MbedTLS.v2.13.1.arm-linux-musleabihf.tar.gz", "a47e3d6bb09bb7564fea16dbe099e7b772f18128b99a5f92627a97dca3266f5d"),
Linux(:i686, libc=:glibc) => ("$bin_prefix/MbedTLS.v2.13.1.i686-linux-gnu.tar.gz", "d35401469c134a151ab139e0fd400729f72c223ef8c0a736a76aae63c48dfa95"),
Linux(:i686, libc=:musl) => ("$bin_prefix/MbedTLS.v2.13.1.i686-linux-musl.tar.gz", "2fa1b8674a3898eb08b3d28bd45fbfe022137a259edf407c564b5a817526647d"),
Windows(:i686) => ("$bin_prefix/MbedTLS.v2.13.1.i686-w64-mingw32.tar.gz", "5fc0d5749fe644eb60cc5dda361831c0c64e6847559d1c6b719b185979e867ae"),
Linux(:powerpc64le, libc=:glibc) => ("$bin_prefix/MbedTLS.v2.13.1.powerpc64le-linux-gnu.tar.gz", "8d36c2085f6cec55077fb7af485399a2b8d4a55033962c2a352d764fc153590f"),
MacOS(:x86_64) => ("$bin_prefix/MbedTLS.v2.13.1.x86_64-apple-darwin14.tar.gz", "907df87621d4a63e1621c585cf351cf4d34a2e880c124f04cb4b404c690cc224"),
Linux(:x86_64, libc=:glibc) => ("$bin_prefix/MbedTLS.v2.13.1.x86_64-linux-gnu.tar.gz", "46d14792f88781f19c30ec0e9fd1815d61906d9f002499d3e277e206da484a99"),
Linux(:x86_64, libc=:musl) => ("$bin_prefix/MbedTLS.v2.13.1.x86_64-linux-musl.tar.gz", "fe43ca4323d295f2a05ff1ffde8c724ea43fad6a38d5b902dc8aee47a9160ad4"),
FreeBSD(:x86_64) => ("$bin_prefix/MbedTLS.v2.13.1.x86_64-unknown-freebsd11.1.tar.gz", "537ab0cdc5fcfb0acc9bb6d013746f80007332b297f88423db1dc1306769f9b5"),
Windows(:x86_64) => ("$bin_prefix/MbedTLS.v2.13.1.x86_64-w64-mingw32.tar.gz", "99d7f51190b841731139a5a561b7ee54fe99c1688c27ca3efd75a047da88eacf"),
)

# First, check to see if we're all satisfied
gpl = haskey(ENV, "USE_GPL_MBEDTLS")
Expand All @@ -54,10 +54,10 @@ if any(!satisfied(p; verbose=verbose) for p in products) || forcebuild
products = juliaproducts
elseif !done || forcebuild
@info "attempting source build"
VERSION = "2.16.0"
VERSION = "2.13.0"
url, hash = haskey(ENV, "USE_GPL_MBEDTLS") ?
("https://tls.mbed.org/download/mbedtls-$VERSION-gpl.tgz", "c8d7a4696287cb9533c455bdd65859106dbdd4472c125194387486e6d4df2799") :
("https://tls.mbed.org/download/mbedtls-$VERSION-apache.tgz", "e3dab56e9093c790b7d5e0f7eb19451010fe680649d25cf1dcca9d5441669ae2")
("https://tls.mbed.org/download/mbedtls-$VERSION-gpl.tgz", "a08ddf08aae55fc4f48fbc6281fcb08bc5c53ed53ffd15355ee0d75ec32b53ae") :
("https://tls.mbed.org/download/mbedtls-$VERSION-apache.tgz", "593b4e4d2e1629fc407ab4750d69fa309a0ddb66565dc3deb5b60eddbdeb06da")
download_verify(url, hash, joinpath(@__DIR__, "mbedtls.tgz"), force=true, verbose=true)
unpack(joinpath(@__DIR__, "mbedtls.tgz"), @__DIR__; verbose=true)
withenv("VERSION"=>VERSION) do
Expand Down
7 changes: 6 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
using MbedTLS, Test, Random
using MbedTLS, Test, Random, Distributed

# by adding a single worker, we load the julia-shipped mbedtls binaries and thus ensure
# the rest of the MbedTLS.jl tests run propertly even in the presence of alternative
# versioned mbedtls libraries
addprocs(1)

import Sockets: connect

Expand Down

0 comments on commit b71d85d

Please sign in to comment.