Skip to content
Open
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
31 changes: 30 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,33 @@ jobs:
path: target
key: target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
- run: cargo test --features vendored
- run: cargo test --features vendored

mbedtls:
name: test-mbedtls
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: sfackler/actions/rustup@master
with:
version: 1.63.0
- run: echo "::set-output name=version::$(rustc --version)"
id: rust-version
# trigger mbedtls implementation
- run: sed -i 's/target_env = "sgx"/target_env = "gnu"/' {Cargo.toml,src/lib.rs,src/test.rs}
- uses: actions/cache@v1
with:
path: ~/.cargo/registry/index
key: index-${{ runner.os }}-mbdetls-${{ github.run_number }}
restore-keys: |
index-${{ runner.os }}-mbedtls-
- run: cargo generate-lockfile
- uses: actions/cache@v1
with:
path: ~/.cargo/registry/cache
key: registry-${{ runner.os }}-mbedtls-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
- run: cargo fetch
- uses: actions/cache@v1
with:
path: target
key: target-${{ runner.os }}-mbedtls-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
- run: cargo test --features alpn --lib
10 changes: 9 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,20 @@ tempfile = "3.1.0"
[target.'cfg(target_os = "windows")'.dependencies]
schannel = "0.1.17"

[target.'cfg(not(any(target_os = "windows", target_os = "macos", target_os = "ios")))'.dependencies]
[target.'cfg(not(any(target_os = "windows", target_os = "macos", target_os = "ios", target_env = "sgx")))'.dependencies]
log = "0.4.5"
openssl = "0.10.29"
openssl-sys = "0.9.55"
openssl-probe = "0.1"

[target.'cfg(target_env = "sgx")'.dependencies]
mbedtls = { version = "0.9.1", features = ["std", "rdrand", "mpi_force_c_code" ], default-features = false }
pkcs5 = { version = "0.7.1", features = ["alloc", "pbes2"] }
p12 = "0.6.3"
yasna = "0.5"

[dev-dependencies]
lazy_static = "1.4.0"
tempfile = "3.0"
test-cert-gen = "0.9"
ureq = "2.6"
Loading