diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4bad35c..c1033ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,245 +1,21 @@ +name: CI + on: push: - paths-ignore: - - '.github/**' - - 'ci/**' - - 'examples/**' - - '**.md' + branches: ['**'] pull_request: - paths-ignore: - - '.github/**' - - 'ci/**' - - 'examples/**' - - '**.md' workflow_dispatch: -name: CI - -env: - BREW_REPO: jmgilman/homebrew-apps - RUST_TOOLCHAIN: stable - TOOLCHAIN_PROFILE: minimal - jobs: check: - name: Run cargo check - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Load cache - uses: actions/cache@v2 + - uses: actions/checkout@v6 + - uses: dtolnay/rust-toolchain@1.90.0 with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - profile: ${{ env.TOOLCHAIN_PROFILE }} - toolchain: ${{ env.RUST_TOOLCHAIN }} - override: true - - name: Run cargo check - uses: actions-rs/cargo@v1 - with: - command: check - - lints: - name: Run cargo fmt and cargo clippy - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Load cache - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - profile: ${{ env.TOOLCHAIN_PROFILE }} - toolchain: ${{ env.RUST_TOOLCHAIN }} - override: true components: rustfmt, clippy - - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - name: Run cargo clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: -- -D warnings - test: - name: Run cargo test - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Load cache - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - profile: ${{ env.TOOLCHAIN_PROFILE }} - toolchain: ${{ env.RUST_TOOLCHAIN }} - override: true - - name: Run cargo test - uses: actions-rs/cargo@v1 - env: - RUST_TEST_THREADS: 1 - with: - command: test - publish: - name: Publish to crates.io - runs-on: ubuntu-latest - if: startsWith(github.event.ref, 'refs/tags/v') - needs: [test, lints, check] - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - profile: ${{ env.TOOLCHAIN_PROFILE }} - toolchain: ${{ env.RUST_TOOLCHAIN }} - override: true - - uses: katyo/publish-crates@v1 - with: - registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} - build: - name: Build binaries - runs-on: ${{ matrix.job.os }} - if: startsWith(github.event.ref, 'refs/tags/v') - needs: [test, lints, check] - strategy: - matrix: - job: - - { os: ubuntu-20.04, target: aarch64-unknown-linux-gnu, use-cross: true } - - { os: macos-10.15 , target: x86_64-apple-darwin } - - { os: windows-2019, target: x86_64-pc-windows-msvc } - - { os: ubuntu-20.04, target: x86_64-unknown-linux-gnu } - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - target: ${{ matrix.job.target }} - override: true - profile: ${{ env.TOOLCHAIN_PROFILE }} - - name: Build - uses: actions-rs/cargo@v1 - with: - use-cross: ${{ matrix.job.use-cross }} - command: build - args: --release --target=${{ matrix.job.target }} - - name: Archive build result - if: startsWith(matrix.job.os, 'ubuntu') || startsWith(matrix.job.os, 'macos') - run: tar -czvf target/${{ matrix.job.target }}.tar.gz target/${{ matrix.job.target }}/release/vssh - - name: Zip build result - if: startsWith(matrix.job.os, 'windows') - run: 7z a -tzip target/${{ matrix.job.target }}.zip target/${{ matrix.job.target }}/release/vssh.exe - - name: Upload build result as artifact - uses: actions/upload-artifact@v2 - with: - name: build-artifacts - path: target/${{ matrix.job.target }}.* - release: - name: Create release - runs-on: ubuntu-latest - needs: [test, lints, check, build] - if: startsWith(github.event.ref, 'refs/tags/v') - steps: - - name: Create release directory - run: mkdir release - - name: Download build artifacts - uses: actions/download-artifact@v2 - with: - name: build-artifacts - path: release - - name: Generate checksum - uses: jmgilman/actions-generate-checksum@v1 - with: - patterns: | - release/*.zip - release/*.tar.gz - - name: Create release with artifact - uses: softprops/action-gh-release@v1 - with: - files: | - release/* - checksum.txt - brew: - name: Push updated Homebrew formula - runs-on: ubuntu-latest - needs: [test, lints, check, build, release] - if: startsWith(github.event.ref, 'refs/tags/v') - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Set version - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Set repo name - id: repo-name - run: echo "::set-output name=value::$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" - - name: Fetch checksum file - uses: dsaltares/fetch-gh-release-asset@master - with: - file: checksum.txt - target: checksum.txt - version: tags/${{ env.RELEASE_VERSION }} - - name: Fetch checksums - id: checksums - run: | - APPLE=$(cat checksum.txt | grep release/x86_64-apple-darwin.tar.gz | cut -d " " -f 1) - LINUX=$(cat checksum.txt | grep release/x86_64-unknown-linux-gnu.tar.gz | cut -d " " -f 1) - - echo "::set-output name=sha256_apple::$APPLE" - echo "::set-output name=sha256_linux::$LINUX" - - name: Build formula - uses: cuchi/jinja2-action@v1.2.0 - with: - template: ci/brew.rb.j2 - output_file: ${{ steps.repo-name.outputs.value }}.rb - strict: true - variables: | - SHA256_APPLE=${{ steps.checksums.outputs.sha256_apple }} - SHA256_LINUX=${{ steps.checksums.outputs.sha256_linux }} - VERSION=${{ env.RELEASE_VERSION }} - - name: Encode formula with base64 - id: encode - run: | - BASE64=$(base64 -w 0 ${{ steps.repo-name.outputs.value }}.rb) - echo "::set-output name=base64::$BASE64" - - name: Dispatch update to homebrew tap repository - uses: peter-evans/repository-dispatch@v1 - with: - token: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} - repository: ${{ env.BREW_REPO }} - event-type: update - client-payload: | - { - "content": "${{ steps.encode.outputs.base64 }}", - "name": "${{ steps.repo-name.outputs.value }}", - "version": "${{ env.RELEASE_VERSION }}" - } - - name: Upload formula as artifact - uses: actions/upload-artifact@v2 - with: - name: formula - path: ${{ steps.repo-name.outputs.value }}.rb \ No newline at end of file + - run: cargo check --locked + - run: cargo fmt --all -- --check + - run: cargo clippy --locked -- -D warnings + - name: Run unit tests + run: cargo test --locked --bin vssh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 382536c..0a21a68 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,83 +1,94 @@ -on: +name: Release + +on: + push: + tags: ['v*'] workflow_dispatch: inputs: tag: - description: 'Release tag' + description: Release tag required: true -name: Manual Release +permissions: + contents: read jobs: + verify: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v6 + with: + ref: ${{ github.event.inputs.tag || github.ref }} + - uses: dtolnay/rust-toolchain@1.90.0 + - run: cargo test --locked --bin vssh + build: - name: Build and release binaries - runs-on: ${{ matrix.job.os }} strategy: + fail-fast: false matrix: - job: - - { os: ubuntu-24.04, target: aarch64-unknown-linux-gnu, use-cross: true } - - { os: ubuntu-24.04, target: x86_64-unknown-linux-gnu } - - { os: ubuntu-22.04, target: aarch64-unknown-linux-gnu, use-cross: true } - - { os: ubuntu-22.04, target: x86_64-unknown-linux-gnu } - - { os: macos-latest , target: x86_64-apple-darwin } - - { os: macos-latest , target: aarch64-apple-darwin } - - { os: windows-latest, target: x86_64-pc-windows-msvc } + include: + - os: ubuntu-24.04 + target: x86_64-unknown-linux-gnu + - os: ubuntu-24.04-arm + target: aarch64-unknown-linux-gnu + - os: macos-15-intel + target: x86_64-apple-darwin + - os: macos-15 + target: aarch64-apple-darwin + - os: windows-2022 + target: x86_64-pc-windows-msvc + runs-on: ${{ matrix.os }} steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v6 with: - toolchain: stable - target: ${{ matrix.job.target }} - override: true - profile: minimal - - name: Build - uses: actions-rs/cargo@v1 + ref: ${{ github.event.inputs.tag || github.ref }} + - uses: dtolnay/rust-toolchain@1.90.0 with: - use-cross: ${{ matrix.job.use-cross }} - command: build - args: --release --target=${{ matrix.job.target }} - - name: Archive build result - if: startsWith(matrix.job.os, 'ubuntu') || startsWith(matrix.job.os, 'macos') - run: tar -C target/${{ matrix.job.target }}/release -czvf target/${{ matrix.job.os }}-${{ matrix.job.target }}.tar.gz vssh - - name: Zip build result - if: startsWith(matrix.job.os, 'windows') - run: 7z a target/${{ matrix.job.os }}-${{ matrix.job.target }}.zip ./target/${{ matrix.job.target }}/release/vssh.exe - - name: Upload build result as artifact - if: startsWith(matrix.job.os, 'ubuntu') || startsWith(matrix.job.os, 'macos') - uses: actions/upload-artifact@v4 + targets: ${{ matrix.target }} + - name: Match tag to package version + shell: bash + env: + RELEASE_TAG: ${{ github.event.inputs.tag || github.ref_name }} + run: | + version=$(grep -m1 '^version = ' Cargo.toml | cut -d '"' -f2) + test "$RELEASE_TAG" = "v$version" + - run: cargo build --release --locked --target ${{ matrix.target }} + - name: Package binary + shell: bash + run: | + mkdir -p dist + if [[ "${{ runner.os }}" == Windows ]]; then + cp "target/${{ matrix.target }}/release/vssh.exe" dist/ + (cd dist && 7z a -tzip "${{ matrix.target }}.zip" vssh.exe) + rm dist/vssh.exe + else + tar -czf "dist/${{ matrix.target }}.tar.gz" -C "target/${{ matrix.target }}/release" vssh + fi + - uses: actions/upload-artifact@v7 with: - name: build-artifact-${{ matrix.job.os }}-${{ matrix.job.target }} - path: target/${{ matrix.job.os}}-${{ matrix.job.target }}.tar.gz - - name: Upload build result as artifact - if: startsWith(matrix.job.os, 'windows') - uses: actions/upload-artifact@v4 - with: - name: build-artifact-${{ matrix.job.os }}-${{ matrix.job.target }} - path: target/${{ matrix.job.os}}-${{ matrix.job.target }}.zip + name: build-${{ matrix.target }} + path: dist/* + if-no-files-found: error + release: - name: Create release - runs-on: ubuntu-latest - needs: [build] + needs: [verify, build] + runs-on: ubuntu-24.04 + permissions: + contents: write steps: - - name: Create release directory - run: mkdir release - - name: Download build artifacts - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 with: - pattern: build-artifact-* + pattern: build-* path: release merge-multiple: true - - name: Generate checksum - uses: jmgilman/actions-generate-checksum@v1 - with: - patterns: | - release/*.zip - release/*.tar.gz - - name: Create release with artifact - uses: softprops/action-gh-release@v2 + - name: Verify assets and generate checksums + run: | + test "$(find release -maxdepth 1 -type f | wc -l)" -eq 5 + cd release + sha256sum ./*.tar.gz ./*.zip > checksum.txt + - uses: softprops/action-gh-release@v3 with: - tag_name: ${{ github.event.inputs.tag }} - files: | - release/* - checksum.txt \ No newline at end of file + tag_name: ${{ github.event.inputs.tag || github.ref_name }} + files: release/* + fail_on_unmatched_files: true + generate_release_notes: true diff --git a/Cargo.lock b/Cargo.lock index cfbd2a7..879d1d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -154,12 +154,41 @@ dependencies = [ "syn 2.0.98", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "aws-lc-rs" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b281d307588d634de920874890732659e2e7672f72b5e10e81badc1a8a83621e" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bff6c3b54fad79a2e60b8102caf565819711497c1f5f092f49508e2f5c31b27" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", + "pkg-config", +] + [[package]] name = "backtrace" version = "0.3.74" @@ -193,6 +222,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + [[package]] name = "bitflags" version = "1.3.2" @@ -201,9 +236,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.8.0" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" [[package]] name = "block-buffer" @@ -296,10 +331,13 @@ checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" [[package]] name = "cc" -version = "1.2.15" +version = "1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af" +checksum = "54413ede23c2daf518f35156dfde027feb2374004d63bd497f983c8db9c0e313" dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", "shlex", ] @@ -382,6 +420,15 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + [[package]] name = "colorchoice" version = "1.0.3" @@ -502,12 +549,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.14.4" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", + "darling_core 0.20.11", + "darling_macro 0.20.11", ] [[package]] @@ -526,16 +573,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.4" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 1.0.109", + "strsim 0.11.1", + "syn 2.0.98", ] [[package]] @@ -551,44 +598,44 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.14.4" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ - "darling_core 0.14.4", + "darling_core 0.20.11", "quote", - "syn 1.0.109", + "syn 2.0.98", ] [[package]] name = "derive_builder" -version = "0.12.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.12.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" dependencies = [ - "darling 0.14.4", + "darling 0.20.11", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.98", ] [[package]] name = "derive_builder_macro" -version = "0.12.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 1.0.109", + "syn 2.0.98", ] [[package]] @@ -726,6 +773,12 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "dyn-clone" version = "1.0.18" @@ -769,6 +822,12 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +[[package]] +name = "find-msvc-tools" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25905e51abafe4dcea6c15fec58c57b601cdbd0ee53d22ea1d3016c587d39b" + [[package]] name = "float-cmp" version = "0.10.0" @@ -784,21 +843,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.1" @@ -814,6 +858,12 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "futures" version = "0.3.31" @@ -949,6 +999,17 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi", +] + [[package]] name = "gimli" version = "0.31.1" @@ -974,7 +1035,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.13.2", "ignore", "walkdir", ] @@ -1110,7 +1171,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.5.8", "tokio", "tower-service", "tracing", @@ -1119,13 +1180,14 @@ dependencies = [ [[package]] name = "hyper" -version = "1.6.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +checksum = "27b501faa50e7a26c3d3560ca625132f4078a17771f4810baf70475ae48cbe43" dependencies = [ + "atomic-waker", "bytes", "futures-channel", - "futures-util", + "futures-core", "http 1.2.0", "http-body 1.0.1", "httparse", @@ -1158,30 +1220,13 @@ checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", "http 1.2.0", - "hyper 1.6.0", + "hyper 1.11.1", "hyper-util", - "rustls 0.23.23", + "rustls 0.23.28", "rustls-pki-types", "tokio", "tokio-rustls 0.26.1", "tower-service", - "webpki-roots 0.26.8", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper 1.6.0", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", ] [[package]] @@ -1199,18 +1244,23 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.10" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff" dependencies = [ + "base64 0.23.1", "bytes", "futures-channel", "futures-util", "http 1.2.0", "http-body 1.0.1", - "hyper 1.6.0", + "httparse", + "hyper 1.11.1", + "ipnet", + "libc", + "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.5", "tokio", "tower-service", "tracing", @@ -1437,19 +1487,78 @@ dependencies = [ "cesu8", "cfg-if", "combine", - "jni-sys", + "jni-sys 0.3.0", "log", "thiserror 1.0.69", "walkdir", "windows-sys 0.45.0", ] +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys 0.4.1", + "log", + "simd_cesu8", + "thiserror 2.0.11", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.98", +] + [[package]] name = "jni-sys" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.98", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + [[package]] name = "js-sys" version = "0.3.77" @@ -1468,9 +1577,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.170" +version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" [[package]] name = "libredox" @@ -1478,7 +1587,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.13.2", "libc", ] @@ -1577,23 +1686,6 @@ dependencies = [ "syn 2.0.98", ] -[[package]] -name = "native-tls" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "ndk-context" version = "0.1.1" @@ -1643,7 +1735,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.13.2", "block2", "libc", "objc2", @@ -1664,59 +1756,11 @@ version = "1.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" -[[package]] -name = "openssl" -version = "0.10.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" -dependencies = [ - "bitflags 2.8.0", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.98", -] - [[package]] name = "openssl-probe" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" - -[[package]] -name = "openssl-src" -version = "300.4.2+3.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168ce4e058f975fe43e89d9ccf78ca668601887ae736090aacc23ae353c298e2" -dependencies = [ - "cc", -] - -[[package]] -name = "openssl-sys" -version = "0.9.106" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" -dependencies = [ - "cc", - "libc", - "openssl-src", - "pkg-config", - "vcpkg", -] +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" [[package]] name = "option-ext" @@ -1892,8 +1936,8 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.23", - "socket2", + "rustls 0.23.28", + "socket2 0.5.8", "thiserror 2.0.11", "tokio", "tracing", @@ -1905,12 +1949,13 @@ version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ + "aws-lc-rs", "bytes", "getrandom 0.2.15", "rand 0.8.5", "ring 0.17.11", "rustc-hash", - "rustls 0.23.23", + "rustls 0.23.28", "rustls-pki-types", "slab", "thiserror 2.0.11", @@ -1928,7 +1973,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2", + "socket2 0.5.8", "tracing", "windows-sys 0.59.0", ] @@ -1942,6 +1987,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "rand" version = "0.7.3" @@ -2019,7 +2070,7 @@ version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82b568323e98e49e2a0899dcee453dd679fae22d69adf9b11dd508d1549b7e2f" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.13.2", ] [[package]] @@ -2112,7 +2163,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustls 0.21.12", - "rustls-pemfile 1.0.4", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", @@ -2125,54 +2176,43 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.4", + "webpki-roots", "winreg", ] [[package]] name = "reqwest" -version = "0.12.12" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" +checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029" dependencies = [ - "base64 0.22.1", + "base64 0.23.1", "bytes", "futures-core", - "futures-util", "http 1.2.0", "http-body 1.0.1", "http-body-util", - "hyper 1.6.0", + "hyper 1.11.1", "hyper-rustls 0.27.5", - "hyper-tls", "hyper-util", - "ipnet", "js-sys", "log", - "mime", - "native-tls", - "once_cell", "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.23", - "rustls-pemfile 2.2.0", + "rustls 0.23.28", "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", + "rustls-platform-verifier", "sync_wrapper 1.0.2", "tokio", - "tokio-native-tls", "tokio-rustls 0.26.1", "tower", + "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.26.8", - "windows-registry", ] [[package]] @@ -2237,17 +2277,26 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rustify" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759a090a17ce545d1adcffcc48207d5136c8984d8153bd8247b1ad4a71e49f5f" +checksum = "4800ce4c1cc2fec12c559dae2ddbf0e17fcee7569b796e6d75898efef443368b" dependencies = [ "anyhow", "async-trait", "bytes", "http 1.2.0", - "reqwest 0.12.12", + "reqwest 0.13.5", "rustify_derive", "serde", "serde_json", @@ -2259,9 +2308,9 @@ dependencies = [ [[package]] name = "rustify_derive" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f07d43b2dbdbd99aaed648192098f0f413b762f0f352667153934ef3955f1793" +checksum = "78ea7fda74240f7410d0198b603a8a2f662acc7d76b6667a49f9b162cd8d9b4f" dependencies = [ "proc-macro2", "quote", @@ -2277,7 +2326,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.13.2", "errno", "libc", "linux-raw-sys", @@ -2298,34 +2347,37 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.23" +version = "0.23.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" +checksum = "7160e3e10bf4535308537f3c4e1641468cd0e485175d6163087c0393c7d46643" dependencies = [ + "aws-lc-rs", "once_cell", - "ring 0.17.11", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki 0.103.3", "subtle", "zeroize", ] [[package]] -name = "rustls-pemfile" -version = "1.0.4" +name = "rustls-native-certs" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" dependencies = [ - "base64 0.21.7", + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", ] [[package]] name = "rustls-pemfile" -version = "2.2.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "rustls-pki-types", + "base64 0.21.7", ] [[package]] @@ -2337,6 +2389,33 @@ dependencies = [ "web-time", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1167586491e2b18b8bfbb293e8180ec17c201c4f076d7cb3070ca964e7598f98" +dependencies = [ + "core-foundation 0.10.0", + "core-foundation-sys", + "jni 0.22.4", + "log", + "once_cell", + "rustls 0.23.28", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki 0.103.3", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eec689c0bc40ff2458a5977b6619cb718087084a18e02a131c599b62d05e1a5f" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -2349,10 +2428,11 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.8" +version = "0.103.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" dependencies = [ + "aws-lc-rs", "ring 0.17.11", "rustls-pki-types", "untrusted 0.9.0", @@ -2416,12 +2496,12 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.1" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags 2.8.0", - "core-foundation 0.9.4", + "bitflags 2.13.2", + "core-foundation 0.10.0", "core-foundation-sys", "libc", "security-framework-sys", @@ -2429,14 +2509,20 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.14.0" +version = "2.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" dependencies = [ "core-foundation-sys", "libc", ] +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + [[package]] name = "serde" version = "1.0.218" @@ -2549,9 +2635,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" [[package]] name = "signal-hook-registry" @@ -2562,6 +2648,22 @@ dependencies = [ "libc", ] +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + [[package]] name = "siphasher" version = "1.0.1" @@ -2593,6 +2695,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + [[package]] name = "spin" version = "0.5.2" @@ -2841,7 +2953,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.8", "tokio-macros", "windows-sys 0.52.0", ] @@ -2857,16 +2969,6 @@ dependencies = [ "syn 2.0.98", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.24.1" @@ -2883,7 +2985,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls 0.23.23", + "rustls 0.23.28", "tokio", ] @@ -2963,6 +3065,24 @@ dependencies = [ "tower-service", ] +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags 2.13.2", + "bytes", + "futures-util", + "http 1.2.0", + "http-body 1.0.1", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -3140,29 +3260,28 @@ checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "vaultrs" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81eb4d9221ca29bad43d4b6871b6d2e7656e1af2cfca624a87e5d17880d831d" +checksum = "30ffcc0e81025065dda612ec1e26a3d81bb16ef3062354873d17a35965d68522" dependencies = [ "async-trait", - "bytes", "derive_builder", "http 1.2.0", - "reqwest 0.12.12", + "reqwest 0.13.5", "rustify", "rustify_derive", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.11", "tracing", "url", ] [[package]] name = "vaultrs-login" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebea0e41e05615ec854d63e757b41aa19728b299b929bb0bca65c259c241974" +checksum = "07e1837d6b2f1d4ad66e552b1f3795c52c44da8e414de55896cb491f84030bba" dependencies = [ "async-trait", "serde", @@ -3186,7 +3305,7 @@ dependencies = [ [[package]] name = "vaultssh" -version = "0.2.0" +version = "0.3.0" dependencies = [ "anyhow", "assert_cmd", @@ -3197,7 +3316,6 @@ dependencies = [ "dialoguer", "dirs 6.0.0", "mockall", - "openssl", "phf", "predicates", "rpassword", @@ -3215,12 +3333,6 @@ dependencies = [ "webbrowser", ] -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version_check" version = "0.9.5" @@ -3376,7 +3488,7 @@ dependencies = [ "block2", "core-foundation 0.10.0", "home", - "jni", + "jni 0.21.1", "log", "ndk-context", "objc2", @@ -3386,19 +3498,19 @@ dependencies = [ ] [[package]] -name = "webpki-roots" -version = "0.25.4" +name = "webpki-root-certs" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b" +dependencies = [ + "rustls-pki-types", +] [[package]] name = "webpki-roots" -version = "0.26.8" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" -dependencies = [ - "rustls-pki-types", -] +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "winapi" @@ -3441,34 +3553,10 @@ dependencies = [ ] [[package]] -name = "windows-registry" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" -dependencies = [ - "windows-result", - "windows-strings", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-result" -version = "0.2.0" +name = "windows-link" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result", - "windows-targets 0.52.6", -] +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-sys" @@ -3506,6 +3594,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -3709,7 +3806,7 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.13.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 59880db..789b577 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vaultssh" -version = "0.2.0" +version = "0.3.0" authors = ["Joshua Gilman ", "Chris Wiggins "] description = "A small CLI wrapper for authenticating with SSH keys from Hashicorp Vault." license = "MIT" @@ -19,7 +19,6 @@ console = "0.15.10" dialoguer = "0.11.0" dirs = "6.0.0" mockall = "0.13.1" -openssl = { version = "0.10", features = ["vendored"] } phf = { version = "0.11.3", features = ["macros"] } rpassword = "7.3.1" serde = "1.0.218" @@ -29,8 +28,8 @@ text_io = "0.1.12" thiserror = "2.0.11" tokio = { version = "1.43.0", features = ["full"] } toml = "0.8.20" -vaultrs = { version = "0.7.4" } -vaultrs-login = { version = "0.2.3", features = ["oidc"] } +vaultrs = "0.8.0" +vaultrs-login = { version = "0.2.4", features = ["oidc"] } webbrowser = "1.0.3" [dev-dependencies] @@ -39,5 +38,5 @@ assert_fs = "1.1.2" async-trait = "0.1.86" mockall = "0.13.1" predicates = "3.1.3" -rustify = "0.6.1" +rustify = "0.7.0" vaultrs-test = "0.2.2" diff --git a/README.md b/README.md index 2193e64..6daa212 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,12 @@ therefore compatible with all standard ssh flags. ## Installation +Download a prebuilt `vssh` archive for your platform from the +[vgrid GitHub releases](https://github.com/vgrid/vaultssh/releases). + +The following commands install the upstream project's releases, not this +fork's GitHub release: + ``` cargo install vaultssh ``` @@ -126,6 +132,20 @@ authentication method will pre-fill the login prompt to make logging in easier. However, all other auth methods are still available if desired (i.e. setting defaults does not skip any prompts). +## Vault TLS certificates + +Connections to Vault verify its HTTPS certificate by default. With the current +Vault client, macOS uses the system trust store (including Keychain), while +Linux/WSL uses its system CA certificates. If your Vault server uses a private +certificate authority, it must be trusted on each system where `vssh` runs. + +On WSL, install the CA certificate into the distribution's CA store or set +`VAULT_CACERT` to a PEM file containing it. As a last resort, +`VAULT_SKIP_VERIFY=1` disables certificate verification. Setting it to `0` or +leaving it unset keeps verification enabled. Do not carry over the old +`VAULT_SKIP_VERIFY=0` workaround: the previous Vault client interpreted it +backwards. + ## Contributing Check out the [issues][2] for items neeeding attention or submit your own and @@ -138,4 +158,4 @@ then: 5. Create a new Pull Request [1]: https://www.vaultproject.io/ -[2]: https://github.com/jmgilman/vaultssh/issues \ No newline at end of file +[2]: https://github.com/jmgilman/vaultssh/issues diff --git a/src/config.rs b/src/config.rs index 86acc8a..94fa200 100644 --- a/src/config.rs +++ b/src/config.rs @@ -89,7 +89,7 @@ pub fn merge(opts: Opts, config: Config) -> Result { )?, basic: merge_option( "basic", - opts.basic.then(|| true), + opts.basic.then_some(true), None, config.basic, Some(false), @@ -114,7 +114,7 @@ pub fn merge(opts: Opts, config: Config) -> Result { oidc: config.oidc, persist: merge_option( "persist", - opts.persist.then(|| true), + opts.persist.then_some(true), None, config.persist, Some(false), diff --git a/src/main.rs b/src/main.rs index c32743a..5985647 100644 --- a/src/main.rs +++ b/src/main.rs @@ -229,9 +229,10 @@ async fn check_status(client: &VaultClient) -> Result<()> { vaultrs::sys::ServerStatus::UNINITIALIZED => { Err(anyhow!("The Vault server is not initialized")) } - status => { - Err(anyhow!("The Vault server is in an invalid state: {:?}", status)) - }, + status => Err(anyhow!( + "The Vault server is in an invalid state: {:?}", + status + )), } } @@ -358,3 +359,46 @@ fn write_key(path: PathBuf, contents: &str) -> Result<()> { std::fs::write(path, contents) .map_err(|e| anyhow! { ClientError::FileWriteError { source: e, path: path_str}}) } + +#[cfg(test)] +mod tls_tests { + use vaultrs::client::VaultClientSettingsBuilder; + + #[test] + fn vault_certificate_verification_is_enabled_unless_explicitly_skipped() { + let previous = std::env::var_os("VAULT_SKIP_VERIFY"); + + std::env::remove_var("VAULT_SKIP_VERIFY"); + assert!( + VaultClientSettingsBuilder::default() + .address("https://vault.example.com") + .build() + .unwrap() + .verify + ); + + std::env::set_var("VAULT_SKIP_VERIFY", "0"); + assert!( + VaultClientSettingsBuilder::default() + .address("https://vault.example.com") + .build() + .unwrap() + .verify + ); + + std::env::set_var("VAULT_SKIP_VERIFY", "1"); + assert!( + !VaultClientSettingsBuilder::default() + .address("https://vault.example.com") + .build() + .unwrap() + .verify + ); + + if let Some(value) = previous { + std::env::set_var("VAULT_SKIP_VERIFY", value); + } else { + std::env::remove_var("VAULT_SKIP_VERIFY"); + } + } +}