Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
feat: use the Ed25519 key instead of RSA by default; removes openssl dep
Browse files Browse the repository at this point in the history
Signed-off-by: ljedrz <[email protected]>
  • Loading branch information
ljedrz committed Sep 17, 2020
1 parent dff2dfb commit 5963223
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 236 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,14 @@ jobs:

- name: Install dependencies macos
if: matrix.platform.host == 'macos-latest'
run: brew install llvm openssl
run: brew install llvm

- name: Download go-ipfs on Linux
if: matrix.platform.host == 'ubuntu-latest'
run: |
curl -L https://github.com/ipfs/go-ipfs/releases/download/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz --output go_ipfs.tar.gz
tar -xf go_ipfs.tar.gz
- name: Install dependencies windows (openssl)
uses: lukka/[email protected]
id: windows-runvcpkg
if: matrix.platform.host == 'windows-latest'
with:
vcpkgDirectory: '${{ runner.workspace }}/vcpkg'
vcpkgTriplet: 'x64-windows'
vcpkgArguments: 'openssl'
vcpkgGitCommitId: 'ffa41582f78478812c836a6e8ce315fb27431182' # ok for openssl-sys v0.9.58

- name: Install rust toolchain
uses: hecrj/setup-rust-action@v1
with:
Expand All @@ -132,13 +122,11 @@ jobs:

- name: Build (android)
if: contains(matrix.platform.target, 'android')
run: cargo ndk --android-platform 29 --target ${{ matrix.platform.target }} build --locked --workspace --exclude ipfs-http
# exclude http on android because openssl
run: cargo ndk --android-platform 29 --target ${{ matrix.platform.target }} build --locked --workspace

- name: Build other cross compilations
if: contains(matrix.platform.target, 'android') == false && matrix.platform.cross == true
run: cargo build --locked --workspace --exclude ipfs-http --target ${{ matrix.platform.target }}
# exclude http on other cross compilation targets because openssl
run: cargo build --locked --workspace --target ${{ matrix.platform.target }}

- name: Rust tests (macos)
if: matrix.platform.cross == false && matrix.platform.host == 'macos-latest'
Expand Down
56 changes: 1 addition & 55 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions conformance/patches/bits.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- node_modules/ipfsd-ctl/src/ipfsd-daemon.js
+++ node_modules/ipfsd-ctl/src/ipfsd-daemon.js
@@ -88,7 +88,6 @@ class Daemon {
const opts = merge(
{
emptyRepo: false,
- bits: this.opts.test ? 1024 : 2048,
profiles: this.opts.test ? ['test'] : []
},
typeof this.opts.ipfsOptions.init === 'boolean' ? {} : this.opts.ipfsOptions.init,
4 changes: 1 addition & 3 deletions conformance/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ const options = {
disposable: true,
ipfsHttpModule: require('ipfs-http-client'),
ipfsOptions: {
init: {
bits: 2048
}
init: true,
}
}

Expand Down
3 changes: 1 addition & 2 deletions http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ futures = { default-features = false, version = "0.3" }
humantime = { default-features = false, version = "2.0" }
hyper = { default-features = false, version = "0.13" }
ipfs = { path = "../" }
libp2p-core = { default-features = false, version = "0.22" }
mime = { default-features = false, version = "0.3" }
mpart-async = { default-features = false, version = "0.4" }
multibase = { default-features = false, version = "0.8" }
multihash = { default-features = false, version = "0.11" }
# openssl is required for rsa keygen but not used by the rust-ipfs or its dependencies
openssl = { default-features = false, version = "0.10" }
parity-multiaddr = { default-features = false, version = "0.9" }
percent-encoding = { default-features = false, version = "2.1" }
prost = { default-features = false, version = "0.6.1" }
Expand Down
Loading

0 comments on commit 5963223

Please sign in to comment.