Loading .circleci/config.ymldeleted 100644 → 0 +0 −317 Original line number Diff line number Diff line version: 2.1 jobs: linux: parameters: target: type: string library: type: string default: "" dl_path: type: string default: "" version: type: string default: "" vendored: type: boolean default: false no_run: type: boolean default: false image: type: string default: 1.36.0 minimal_build: type: boolean default: false docker: - image: rust:<< parameters.image >> environment: RUST_BACKTRACE: 1 OPENSSL_DIR: /opt/openssl CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_AR: arm-linux-gnueabihf-ar CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER: qemu-arm-static steps: - checkout - run: apt-get update - run: apt-get remove -y libssl-dev - run: | case "<< parameters.target >>" in "i686-unknown-linux-gnu") apt-get install -y --no-install-recommends gcc-multilib ;; "x86_64-unknown-linux-musl") apt-get install -y --no-install-recommends musl-tools ;; "arm-unknown-linux-gnueabihf") dpkg --add-architecture armhf apt-get update apt-get install -y --no-install-recommends \ gcc-arm-linux-gnueabihf \ libc6-dev:armhf \ qemu-user-static ;; "x86_64-unknown-linux-gnu") exit 0 esac rustup target add << parameters.target >> - unless: condition: << parameters.vendored >> steps: - restore_cache: key: openssl-<< parameters.target >>-<< parameters.library >>-<< parameters.version >> - run: | if [ -d "$OPENSSL_DIR" ]; then exit 0 fi case "<< parameters.library >>" in "libressl") URL="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-<< parameters.version >>.tar.gz" ;; "openssl") URL="https://openssl.org/source<< parameters.dl_path >>/openssl-<< parameters.version >>.tar.gz" ;; esac case "<< parameters.target >>" in "x86_64-unknown-linux-gnu") OS_COMPILER=linux-x86_64 OS_FLAGS="" ;; "i686-unknown-linux-gnu") OS_COMPILER=linux-elf OS_FLAGS=-m32 ;; "arm-unknown-linux-gnueabihf") OS_COMPILER=linux-armv4 OS_FLAGS="" export AR=arm-linux-gnueabihf-ar export CC=arm-linux-gnueabihf-gcc ;; esac mkdir /tmp/build cd /tmp/build curl -L $URL | tar --strip-components=1 -xzf - case "<< parameters.library >>" in "openssl") ./Configure --prefix=$OPENSSL_DIR $OS_COMPILER -fPIC -g $OS_FLAGS no-shared ;; "libressl") ./configure --prefix=$OPENSSL_DIR --disable-shared --with-pic ;; esac make make install_sw - save_cache: key: openssl-<< parameters.target >>-<< parameters.library >>-<< parameters.version >> paths: - /opt/openssl - restore_cache: key: registry - run: cargo generate-lockfile - when: condition: << parameters.minimal_build >> steps: - run: cargo update -p pkg-config --precise 0.3.14 - save_cache: key: registry-{{ .BuildNum }} paths: - /usr/local/cargo/registry/index - restore_cache: key: deps-<< parameters.image >>-<< parameters.target >>-<< parameters.library >>-<< parameters.version >>-{{ checksum "Cargo.lock" }} - run: | cargo build \ --manifest-path=openssl/Cargo.toml \ <<# parameters.vendored >>--features vendored<</ parameters.vendored >> \ --target << parameters.target >> - unless: condition: << parameters.minimal_build >> steps: - run: | cargo run \ --manifest-path=systest/Cargo.toml \ <<# parameters.vendored >>--features vendored<</ parameters.vendored >> \ --target << parameters.target >> - run: | cargo test \ --manifest-path=openssl-errors/Cargo.toml \ <<# parameters.vendored >>--features openssl-sys/vendored<</ parameters.vendored >> \ --target << parameters.target >> \ <<# parameters.no_run >>--no-run<</ parameters.no_run >> - run: | ulimit -c unlimited cargo test \ --manifest-path=openssl/Cargo.toml \ <<# parameters.vendored >>--features vendored<</ parameters.vendored >> \ --target << parameters.target >> \ <<# parameters.no_run >>--no-run<</ parameters.no_run >> - save_cache: key: deps-<< parameters.image >>-<< parameters.target >>-<< parameters.library >>-<< parameters.version >>-{{ checksum "Cargo.lock" }} paths: - /usr/local/cargo/registry/cache - target - run: command: | mkdir -p /tmp/core_dumps find . -name "core.*" -exec cp \{\} /tmp/core_dumps \; cp target/<< parameters.target >>/debug/openssl-* /tmp/core_dumps when: on_fail - store_artifacts: path: /tmp/core_dumps macos: parameters: vendored: type: boolean default: false image: type: string default: 1.36.0 macos: xcode: "12.2.0" environment: RUST_BACKTRACE: 1 steps: - checkout - run: curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain << parameters.image >> - run: sudo ln -s ~/.cargo/bin/* /usr/local/bin - run: cargo generate-lockfile - restore_cache: key: deps-<< parameters.image >>-macos-<< parameters.vendored >>-{{ checksum "Cargo.lock" }} - run: | cargo run \ --manifest-path=systest/Cargo.toml \ <<# parameters.vendored >> --features vendored <</ parameters.vendored >> - run: | cargo test \ --manifest-path=openssl-errors/Cargo.toml \ <<# parameters.vendored >> --features openssl-sys/vendored <</ parameters.vendored >> - run: | cargo test \ --manifest-path=openssl/Cargo.toml \ <<# parameters.vendored >> --features vendored <</ parameters.vendored >> - save_cache: key: deps-<< parameters.image >>-macos-<< parameters.vendored >>-{{ checksum "Cargo.lock" }} paths: - ~/.cargo/registry/cache - target openssl_300: &openssl_300 library: openssl version: 3.0.0-alpha13 openssl_111: &openssl_111 library: openssl version: 1.1.1i openssl_110: &openssl_110 library: openssl version: 1.1.0l dl_path: /old/1.1.0 openssl_102: &openssl_102 library: openssl version: 1.0.2u dl_path: /old/1.0.2 openssl_101: &openssl_101 library: openssl version: 1.0.1u dl_path: /old/1.0.1 workflows: test: jobs: - linux: name: musl-vendored target: x86_64-unknown-linux-musl vendored: true - linux: name: x86_64-vendored target: x86_64-unknown-linux-gnu vendored: true - linux: <<: *openssl_300 name: x86_64-openssl-3.0.0 target: x86_64-unknown-linux-gnu - linux: <<: *openssl_111 name: x86_64-openssl-1.1.1 target: x86_64-unknown-linux-gnu - linux: <<: *openssl_110 name: x86_64-openssl-1.1.0 target: x86_64-unknown-linux-gnu - linux: <<: *openssl_102 name: x86_64-openssl-1.0.2 target: x86_64-unknown-linux-gnu - linux: <<: *openssl_101 name: x86_64-openssl-1.0.1 target: x86_64-unknown-linux-gnu - linux: name: i686-vendored target: i686-unknown-linux-gnu vendored: true - linux: <<: *openssl_300 name: i686-openssl-3.0.0 target: i686-unknown-linux-gnu - linux: <<: *openssl_111 name: i686-openssl-1.1.1 target: i686-unknown-linux-gnu - linux: <<: *openssl_110 name: i686-openssl-1.1.0 target: i686-unknown-linux-gnu - linux: <<: *openssl_102 name: i686-openssl-1.0.2 target: i686-unknown-linux-gnu - linux: name: armhf-vendored target: arm-unknown-linux-gnueabihf vendored: true no_run: true - linux: <<: *openssl_300 name: armhf-openssl-3.0.0 target: arm-unknown-linux-gnueabihf no_run: true - linux: <<: *openssl_111 name: armhf-openssl-1.1.1 target: arm-unknown-linux-gnueabihf no_run: true - linux: <<: *openssl_110 name: armhf-openssl-1.1.0 target: arm-unknown-linux-gnueabihf no_run: true - linux: <<: *openssl_102 name: armhf-openssl-1.0.2 target: arm-unknown-linux-gnueabihf no_run: true - linux: name: x86_64-libressl-2.5 target: x86_64-unknown-linux-gnu library: libressl version: 2.5.5 - linux: name: x86_64-libressl-3.3.1 target: x86_64-unknown-linux-gnu library: libressl version: 3.3.1 - macos: name: macos - macos: name: macos-vendored vendored: true .github/workflows/ci.yml +213 −63 Original line number Diff line number Diff line Loading @@ -18,78 +18,60 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Rust run: rustup update --no-self-update stable && rustup default stable - name: Check formatting run: cargo fmt --all -- --check - uses: sfackler/actions/rustup@master - uses: sfackler/actions/rustfmt@master clippy: name: clippy runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Rust run: rustup update --no-self-update stable && rustup default stable - name: Get rust version - uses: sfackler/actions/rustup@master - run: echo "::set-output name=version::$(rustc --version)" id: rust-version run: echo "::set-output name=version::$(rustc --version)" - name: Cache cargo index uses: actions/cache@v1 - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - name: Create lockfile run: cargo generate-lockfile - name: Cache cargo registry uses: actions/cache@v1 - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Fetch dependencies run: cargo fetch - name: Cache target directory uses: actions/cache@v1 - run: cargo fetch - uses: actions/cache@v1 with: path: target key: clippy-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Run clippy run: cargo clippy --all --all-targets key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo clippy --all --all-targets min-version: name: min-version runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Rust run: rustup update --no-self-update 1.36.0 && rustup default 1.36.0 - name: Get rust version - uses: sfackler/actions/rustup@master - run: echo "::set-output name=version::$(rustc --version)" id: rust-version run: echo "::set-output name=version::$(rustc --version)" - name: Cache cargo index uses: actions/cache@v1 - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - name: Create lockfile run: cargo generate-lockfile - name: Cache cargo registry uses: actions/cache@v1 - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Fetch dependencies run: cargo fetch - name: Cache target directory uses: actions/cache@v1 - run: cargo fetch - uses: actions/cache@v1 with: path: target key: min-version-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Check openssl run: cargo check -p openssl key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo check -p openssl windows-vcpkg: name: windows-vcpkg Loading @@ -98,39 +80,207 @@ jobs: VCPKGRS_DYNAMIC: 1 steps: - uses: actions/checkout@v2 - name: Install Rust run: rustup update --no-self-update stable && rustup default stable - name: Get rust version - uses: sfackler/actions/rustup@master - run: echo "::set-output name=version::$(rustc --version)" id: rust-version run: echo "::set-output name=version::$(rustc --version)" - name: Set vcpkg root run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append - name: Install OpenSSL run: vcpkg install openssl:x64-windows - name: Cache cargo index uses: actions/cache@v1 - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append - run: vcpkg install openssl:x64-windows - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - name: Create lockfile run: cargo generate-lockfile - name: Cache cargo registry uses: actions/cache@v1 - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Fetch dependencies run: cargo fetch - name: Cache target directory uses: actions/cache@v1 - run: cargo fetch - uses: actions/cache@v1 with: path: target key: min-version-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo run -p systest - run: cargo test -p openssl - run: cargo test -p openssl-errors macos-homebrew: name: macos-homebrew runs-on: macos-latest steps: - uses: actions/checkout@v2 - uses: sfackler/actions/rustup@master - run: echo "::set-output name=version::$(rustc --version)" id: rust-version - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo fetch - uses: actions/cache@v1 with: path: target key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo run -p systest - run: cargo test -p openssl - run: cargo test -p openssl-errors linux: strategy: fail-fast: false matrix: target: - x86_64-unknown-linux-gnu - i686-unknown-linux-gnu - arm-unknown-linux-gnueabihf library: - name: openssl version: vendored - name: openssl version: 3.0.0-alpha13 dl-path: / - name: openssl version: 1.1.1j dl-path: / - name: openssl version: 1.1.0l dl-path: /old/1.1.0 - name: openssl version: 1.0.2u dl-path: /old/1.0.2 - name: openssl version: 1.0.1u dl-path: /old/1.0.1 include: - target: x86_64-unknown-linux-gnu library: name: libressl version: 2.5.5 - target: x86_64-unknown-linux-gnu library: name: libressl version: 3.3.1 name: ${{ matrix.target }}-${{ matrix.library.name }}-${{ matrix.library.version }} runs-on: ubuntu-latest env: OPENSSL_DIR: /opt/openssl CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_AR: arm-linux-gnueabihf-ar CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER: qemu-arm -L /usr/arm-linux-gnueabihf steps: - uses: actions/checkout@v2 - uses: sfackler/actions/rustup@master - run: echo "::set-output name=version::$(rustc --version)" id: rust-version - run: rustup target add ${{ matrix.target }} - name: Install packages run: | case "${{ matrix.target }}" in "x86_64-unknown-linux-gnu") exit 0 ;; "i686-unknown-linux-gnu") packages="gcc-multilib" ;; "arm-unknown-linux-gnueabihf") packages="gcc-arm-linux-gnueabihf qemu-user" ;; esac sudo apt-get update sudo apt-get install -y $packages - uses: actions/cache@v2 with: path: /opt/openssl key: openssl-${{ matrix.target }}-${{ matrix.library.name }}-${{ matrix.library.version }} if: matrix.library.version != 'vendored' id: openssl-cache - name: Build OpenSSL run: | case "${{ matrix.library.name }}" in "openssl") url="https://openssl.org/source${{ matrix.library.dl-path }}/openssl-${{ matrix.library.version }}.tar.gz" ;; "libressl") url="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${{ matrix.library.version }}.tar.gz" ;; esac case "${{ matrix.target}}" in "x86_64-unknown-linux-gnu") OS_COMPILER=linux-x86_64 OS_FLAGS="" ;; "i686-unknown-linux-gnu") OS_COMPILER=linux-elf OS_FLAGS=-m32 ;; "arm-unknown-linux-gnueabihf") OS_COMPILER=linux-armv4 OS_FLAGS="" export AR=arm-linux-gnueabihf-ar export CC=arm-linux-gnueabihf-gcc ;; esac mkdir /tmp/build cd /tmp/build curl -L $url | tar --strip-components=1 -xzf - case "${{ matrix.library.name }}" in "openssl") ./Configure --prefix=$OPENSSL_DIR $OS_COMPILER -fPIC -g $OS_FLAGS no-shared ;; "libressl") ./configure --prefix=$OPENSSL_DIR --disable-shared --with-pic ;; esac make make install_sw if: matrix.library.version != 'vendored' && !steps.openssl-cache.outputs.cache-hit - run: echo "RUST_TEST_THREADS=1" >> $GITHUB_ENV if: matrix.target == 'arm-unknown-linux-gnueabihf' - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo fetch - uses: actions/cache@v1 with: path: target key: target-${{ matrix.target }}-${{ matrix.library.name }}-${{ matrix.library.version }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Run systest run: cargo run -p systest run: | if [[ "${{ matrix.library.version }}" == "vendored" ]]; then features="--features vendored" fi cargo run --manifest-path=systest/Cargo.toml --target ${{ matrix.target }} $features - name: Test openssl run: cargo test -p openssl run: | if [[ "${{ matrix.library.version }}" == "vendored" ]]; then features="--features vendored" fi cargo test --manifest-path=openssl/Cargo.toml --target ${{ matrix.target }} $features - name: Test openssl-errors run: cargo test -p openssl-errors run: | if [[ "${{ matrix.library.version }}" == "vendored" ]]; then features="--features openssl-sys/vendored" fi cargo test --manifest-path=openssl-errors/Cargo.toml --target ${{ matrix.target }} $features README.md +0 −1 Original line number Diff line number Diff line # rust-openssl [](https://circleci.com/gh/sfackler/rust-openssl) [](https://crates.io/crates/openssl) OpenSSL bindings for the Rust programming language. Loading openssl-sys/CHANGELOG.md +17 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,21 @@ ## [Unreleased] ## [v0.9.61] - 2021-03-13 ### Added * Added support for automatic detection of OpenSSL installations via pkgsrc and MacPorts on macOS. * Added various `V_ASN1_*` constants. * Added `DH_generate_parameters_ex`. * Added `EC_POINT_is_at_infinity` and `EC_POINT_is_on_curve`. * Added `EVP_CIPHER_nid`. * Added `EVP_sm3`. * Added `NID_*` constants related to SM3. * Added `PKCS7_get0_signers`. * Added `EVP_PKEY_CTX_set0_rsa_oaep_label`. * Added `ACCESS_DESCRIPTION` and `ACCESS_DESCRIPTION_free`. ## [v0.9.60] - 2020-12-24 ### Added Loading Loading @@ -163,7 +178,8 @@ * Added `X509_verify` and `X509_REQ_verify`. * Added `EVP_MD_type` and `EVP_GROUP_get_curve_name`. [Unreleased]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.60...master [Unreleased]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.61...master [v0.9.61]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.60...openssl-sys-v0.9.61 [v0.9.60]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.59...openssl-sys-v0.9.60 [v0.9.59]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.58...openssl-sys-v0.9.59 [v0.9.58]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.57...openssl-sys-v0.9.58 Loading openssl-sys/Cargo.toml +1 −1 Original line number Diff line number Diff line [package] name = "openssl-sys" version = "0.9.60" version = "0.9.61" authors = ["Alex Crichton <alex@alexcrichton.com>", "Steven Fackler <sfackler@gmail.com>"] license = "MIT" Loading Loading
.circleci/config.ymldeleted 100644 → 0 +0 −317 Original line number Diff line number Diff line version: 2.1 jobs: linux: parameters: target: type: string library: type: string default: "" dl_path: type: string default: "" version: type: string default: "" vendored: type: boolean default: false no_run: type: boolean default: false image: type: string default: 1.36.0 minimal_build: type: boolean default: false docker: - image: rust:<< parameters.image >> environment: RUST_BACKTRACE: 1 OPENSSL_DIR: /opt/openssl CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_AR: arm-linux-gnueabihf-ar CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER: qemu-arm-static steps: - checkout - run: apt-get update - run: apt-get remove -y libssl-dev - run: | case "<< parameters.target >>" in "i686-unknown-linux-gnu") apt-get install -y --no-install-recommends gcc-multilib ;; "x86_64-unknown-linux-musl") apt-get install -y --no-install-recommends musl-tools ;; "arm-unknown-linux-gnueabihf") dpkg --add-architecture armhf apt-get update apt-get install -y --no-install-recommends \ gcc-arm-linux-gnueabihf \ libc6-dev:armhf \ qemu-user-static ;; "x86_64-unknown-linux-gnu") exit 0 esac rustup target add << parameters.target >> - unless: condition: << parameters.vendored >> steps: - restore_cache: key: openssl-<< parameters.target >>-<< parameters.library >>-<< parameters.version >> - run: | if [ -d "$OPENSSL_DIR" ]; then exit 0 fi case "<< parameters.library >>" in "libressl") URL="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-<< parameters.version >>.tar.gz" ;; "openssl") URL="https://openssl.org/source<< parameters.dl_path >>/openssl-<< parameters.version >>.tar.gz" ;; esac case "<< parameters.target >>" in "x86_64-unknown-linux-gnu") OS_COMPILER=linux-x86_64 OS_FLAGS="" ;; "i686-unknown-linux-gnu") OS_COMPILER=linux-elf OS_FLAGS=-m32 ;; "arm-unknown-linux-gnueabihf") OS_COMPILER=linux-armv4 OS_FLAGS="" export AR=arm-linux-gnueabihf-ar export CC=arm-linux-gnueabihf-gcc ;; esac mkdir /tmp/build cd /tmp/build curl -L $URL | tar --strip-components=1 -xzf - case "<< parameters.library >>" in "openssl") ./Configure --prefix=$OPENSSL_DIR $OS_COMPILER -fPIC -g $OS_FLAGS no-shared ;; "libressl") ./configure --prefix=$OPENSSL_DIR --disable-shared --with-pic ;; esac make make install_sw - save_cache: key: openssl-<< parameters.target >>-<< parameters.library >>-<< parameters.version >> paths: - /opt/openssl - restore_cache: key: registry - run: cargo generate-lockfile - when: condition: << parameters.minimal_build >> steps: - run: cargo update -p pkg-config --precise 0.3.14 - save_cache: key: registry-{{ .BuildNum }} paths: - /usr/local/cargo/registry/index - restore_cache: key: deps-<< parameters.image >>-<< parameters.target >>-<< parameters.library >>-<< parameters.version >>-{{ checksum "Cargo.lock" }} - run: | cargo build \ --manifest-path=openssl/Cargo.toml \ <<# parameters.vendored >>--features vendored<</ parameters.vendored >> \ --target << parameters.target >> - unless: condition: << parameters.minimal_build >> steps: - run: | cargo run \ --manifest-path=systest/Cargo.toml \ <<# parameters.vendored >>--features vendored<</ parameters.vendored >> \ --target << parameters.target >> - run: | cargo test \ --manifest-path=openssl-errors/Cargo.toml \ <<# parameters.vendored >>--features openssl-sys/vendored<</ parameters.vendored >> \ --target << parameters.target >> \ <<# parameters.no_run >>--no-run<</ parameters.no_run >> - run: | ulimit -c unlimited cargo test \ --manifest-path=openssl/Cargo.toml \ <<# parameters.vendored >>--features vendored<</ parameters.vendored >> \ --target << parameters.target >> \ <<# parameters.no_run >>--no-run<</ parameters.no_run >> - save_cache: key: deps-<< parameters.image >>-<< parameters.target >>-<< parameters.library >>-<< parameters.version >>-{{ checksum "Cargo.lock" }} paths: - /usr/local/cargo/registry/cache - target - run: command: | mkdir -p /tmp/core_dumps find . -name "core.*" -exec cp \{\} /tmp/core_dumps \; cp target/<< parameters.target >>/debug/openssl-* /tmp/core_dumps when: on_fail - store_artifacts: path: /tmp/core_dumps macos: parameters: vendored: type: boolean default: false image: type: string default: 1.36.0 macos: xcode: "12.2.0" environment: RUST_BACKTRACE: 1 steps: - checkout - run: curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain << parameters.image >> - run: sudo ln -s ~/.cargo/bin/* /usr/local/bin - run: cargo generate-lockfile - restore_cache: key: deps-<< parameters.image >>-macos-<< parameters.vendored >>-{{ checksum "Cargo.lock" }} - run: | cargo run \ --manifest-path=systest/Cargo.toml \ <<# parameters.vendored >> --features vendored <</ parameters.vendored >> - run: | cargo test \ --manifest-path=openssl-errors/Cargo.toml \ <<# parameters.vendored >> --features openssl-sys/vendored <</ parameters.vendored >> - run: | cargo test \ --manifest-path=openssl/Cargo.toml \ <<# parameters.vendored >> --features vendored <</ parameters.vendored >> - save_cache: key: deps-<< parameters.image >>-macos-<< parameters.vendored >>-{{ checksum "Cargo.lock" }} paths: - ~/.cargo/registry/cache - target openssl_300: &openssl_300 library: openssl version: 3.0.0-alpha13 openssl_111: &openssl_111 library: openssl version: 1.1.1i openssl_110: &openssl_110 library: openssl version: 1.1.0l dl_path: /old/1.1.0 openssl_102: &openssl_102 library: openssl version: 1.0.2u dl_path: /old/1.0.2 openssl_101: &openssl_101 library: openssl version: 1.0.1u dl_path: /old/1.0.1 workflows: test: jobs: - linux: name: musl-vendored target: x86_64-unknown-linux-musl vendored: true - linux: name: x86_64-vendored target: x86_64-unknown-linux-gnu vendored: true - linux: <<: *openssl_300 name: x86_64-openssl-3.0.0 target: x86_64-unknown-linux-gnu - linux: <<: *openssl_111 name: x86_64-openssl-1.1.1 target: x86_64-unknown-linux-gnu - linux: <<: *openssl_110 name: x86_64-openssl-1.1.0 target: x86_64-unknown-linux-gnu - linux: <<: *openssl_102 name: x86_64-openssl-1.0.2 target: x86_64-unknown-linux-gnu - linux: <<: *openssl_101 name: x86_64-openssl-1.0.1 target: x86_64-unknown-linux-gnu - linux: name: i686-vendored target: i686-unknown-linux-gnu vendored: true - linux: <<: *openssl_300 name: i686-openssl-3.0.0 target: i686-unknown-linux-gnu - linux: <<: *openssl_111 name: i686-openssl-1.1.1 target: i686-unknown-linux-gnu - linux: <<: *openssl_110 name: i686-openssl-1.1.0 target: i686-unknown-linux-gnu - linux: <<: *openssl_102 name: i686-openssl-1.0.2 target: i686-unknown-linux-gnu - linux: name: armhf-vendored target: arm-unknown-linux-gnueabihf vendored: true no_run: true - linux: <<: *openssl_300 name: armhf-openssl-3.0.0 target: arm-unknown-linux-gnueabihf no_run: true - linux: <<: *openssl_111 name: armhf-openssl-1.1.1 target: arm-unknown-linux-gnueabihf no_run: true - linux: <<: *openssl_110 name: armhf-openssl-1.1.0 target: arm-unknown-linux-gnueabihf no_run: true - linux: <<: *openssl_102 name: armhf-openssl-1.0.2 target: arm-unknown-linux-gnueabihf no_run: true - linux: name: x86_64-libressl-2.5 target: x86_64-unknown-linux-gnu library: libressl version: 2.5.5 - linux: name: x86_64-libressl-3.3.1 target: x86_64-unknown-linux-gnu library: libressl version: 3.3.1 - macos: name: macos - macos: name: macos-vendored vendored: true
.github/workflows/ci.yml +213 −63 Original line number Diff line number Diff line Loading @@ -18,78 +18,60 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Rust run: rustup update --no-self-update stable && rustup default stable - name: Check formatting run: cargo fmt --all -- --check - uses: sfackler/actions/rustup@master - uses: sfackler/actions/rustfmt@master clippy: name: clippy runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Rust run: rustup update --no-self-update stable && rustup default stable - name: Get rust version - uses: sfackler/actions/rustup@master - run: echo "::set-output name=version::$(rustc --version)" id: rust-version run: echo "::set-output name=version::$(rustc --version)" - name: Cache cargo index uses: actions/cache@v1 - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - name: Create lockfile run: cargo generate-lockfile - name: Cache cargo registry uses: actions/cache@v1 - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Fetch dependencies run: cargo fetch - name: Cache target directory uses: actions/cache@v1 - run: cargo fetch - uses: actions/cache@v1 with: path: target key: clippy-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Run clippy run: cargo clippy --all --all-targets key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo clippy --all --all-targets min-version: name: min-version runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Rust run: rustup update --no-self-update 1.36.0 && rustup default 1.36.0 - name: Get rust version - uses: sfackler/actions/rustup@master - run: echo "::set-output name=version::$(rustc --version)" id: rust-version run: echo "::set-output name=version::$(rustc --version)" - name: Cache cargo index uses: actions/cache@v1 - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - name: Create lockfile run: cargo generate-lockfile - name: Cache cargo registry uses: actions/cache@v1 - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Fetch dependencies run: cargo fetch - name: Cache target directory uses: actions/cache@v1 - run: cargo fetch - uses: actions/cache@v1 with: path: target key: min-version-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Check openssl run: cargo check -p openssl key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo check -p openssl windows-vcpkg: name: windows-vcpkg Loading @@ -98,39 +80,207 @@ jobs: VCPKGRS_DYNAMIC: 1 steps: - uses: actions/checkout@v2 - name: Install Rust run: rustup update --no-self-update stable && rustup default stable - name: Get rust version - uses: sfackler/actions/rustup@master - run: echo "::set-output name=version::$(rustc --version)" id: rust-version run: echo "::set-output name=version::$(rustc --version)" - name: Set vcpkg root run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append - name: Install OpenSSL run: vcpkg install openssl:x64-windows - name: Cache cargo index uses: actions/cache@v1 - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append - run: vcpkg install openssl:x64-windows - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - name: Create lockfile run: cargo generate-lockfile - name: Cache cargo registry uses: actions/cache@v1 - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Fetch dependencies run: cargo fetch - name: Cache target directory uses: actions/cache@v1 - run: cargo fetch - uses: actions/cache@v1 with: path: target key: min-version-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo run -p systest - run: cargo test -p openssl - run: cargo test -p openssl-errors macos-homebrew: name: macos-homebrew runs-on: macos-latest steps: - uses: actions/checkout@v2 - uses: sfackler/actions/rustup@master - run: echo "::set-output name=version::$(rustc --version)" id: rust-version - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo fetch - uses: actions/cache@v1 with: path: target key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo run -p systest - run: cargo test -p openssl - run: cargo test -p openssl-errors linux: strategy: fail-fast: false matrix: target: - x86_64-unknown-linux-gnu - i686-unknown-linux-gnu - arm-unknown-linux-gnueabihf library: - name: openssl version: vendored - name: openssl version: 3.0.0-alpha13 dl-path: / - name: openssl version: 1.1.1j dl-path: / - name: openssl version: 1.1.0l dl-path: /old/1.1.0 - name: openssl version: 1.0.2u dl-path: /old/1.0.2 - name: openssl version: 1.0.1u dl-path: /old/1.0.1 include: - target: x86_64-unknown-linux-gnu library: name: libressl version: 2.5.5 - target: x86_64-unknown-linux-gnu library: name: libressl version: 3.3.1 name: ${{ matrix.target }}-${{ matrix.library.name }}-${{ matrix.library.version }} runs-on: ubuntu-latest env: OPENSSL_DIR: /opt/openssl CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_AR: arm-linux-gnueabihf-ar CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER: qemu-arm -L /usr/arm-linux-gnueabihf steps: - uses: actions/checkout@v2 - uses: sfackler/actions/rustup@master - run: echo "::set-output name=version::$(rustc --version)" id: rust-version - run: rustup target add ${{ matrix.target }} - name: Install packages run: | case "${{ matrix.target }}" in "x86_64-unknown-linux-gnu") exit 0 ;; "i686-unknown-linux-gnu") packages="gcc-multilib" ;; "arm-unknown-linux-gnueabihf") packages="gcc-arm-linux-gnueabihf qemu-user" ;; esac sudo apt-get update sudo apt-get install -y $packages - uses: actions/cache@v2 with: path: /opt/openssl key: openssl-${{ matrix.target }}-${{ matrix.library.name }}-${{ matrix.library.version }} if: matrix.library.version != 'vendored' id: openssl-cache - name: Build OpenSSL run: | case "${{ matrix.library.name }}" in "openssl") url="https://openssl.org/source${{ matrix.library.dl-path }}/openssl-${{ matrix.library.version }}.tar.gz" ;; "libressl") url="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${{ matrix.library.version }}.tar.gz" ;; esac case "${{ matrix.target}}" in "x86_64-unknown-linux-gnu") OS_COMPILER=linux-x86_64 OS_FLAGS="" ;; "i686-unknown-linux-gnu") OS_COMPILER=linux-elf OS_FLAGS=-m32 ;; "arm-unknown-linux-gnueabihf") OS_COMPILER=linux-armv4 OS_FLAGS="" export AR=arm-linux-gnueabihf-ar export CC=arm-linux-gnueabihf-gcc ;; esac mkdir /tmp/build cd /tmp/build curl -L $url | tar --strip-components=1 -xzf - case "${{ matrix.library.name }}" in "openssl") ./Configure --prefix=$OPENSSL_DIR $OS_COMPILER -fPIC -g $OS_FLAGS no-shared ;; "libressl") ./configure --prefix=$OPENSSL_DIR --disable-shared --with-pic ;; esac make make install_sw if: matrix.library.version != 'vendored' && !steps.openssl-cache.outputs.cache-hit - run: echo "RUST_TEST_THREADS=1" >> $GITHUB_ENV if: matrix.target == 'arm-unknown-linux-gnueabihf' - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo fetch - uses: actions/cache@v1 with: path: target key: target-${{ matrix.target }}-${{ matrix.library.name }}-${{ matrix.library.version }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Run systest run: cargo run -p systest run: | if [[ "${{ matrix.library.version }}" == "vendored" ]]; then features="--features vendored" fi cargo run --manifest-path=systest/Cargo.toml --target ${{ matrix.target }} $features - name: Test openssl run: cargo test -p openssl run: | if [[ "${{ matrix.library.version }}" == "vendored" ]]; then features="--features vendored" fi cargo test --manifest-path=openssl/Cargo.toml --target ${{ matrix.target }} $features - name: Test openssl-errors run: cargo test -p openssl-errors run: | if [[ "${{ matrix.library.version }}" == "vendored" ]]; then features="--features openssl-sys/vendored" fi cargo test --manifest-path=openssl-errors/Cargo.toml --target ${{ matrix.target }} $features
README.md +0 −1 Original line number Diff line number Diff line # rust-openssl [](https://circleci.com/gh/sfackler/rust-openssl) [](https://crates.io/crates/openssl) OpenSSL bindings for the Rust programming language. Loading
openssl-sys/CHANGELOG.md +17 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,21 @@ ## [Unreleased] ## [v0.9.61] - 2021-03-13 ### Added * Added support for automatic detection of OpenSSL installations via pkgsrc and MacPorts on macOS. * Added various `V_ASN1_*` constants. * Added `DH_generate_parameters_ex`. * Added `EC_POINT_is_at_infinity` and `EC_POINT_is_on_curve`. * Added `EVP_CIPHER_nid`. * Added `EVP_sm3`. * Added `NID_*` constants related to SM3. * Added `PKCS7_get0_signers`. * Added `EVP_PKEY_CTX_set0_rsa_oaep_label`. * Added `ACCESS_DESCRIPTION` and `ACCESS_DESCRIPTION_free`. ## [v0.9.60] - 2020-12-24 ### Added Loading Loading @@ -163,7 +178,8 @@ * Added `X509_verify` and `X509_REQ_verify`. * Added `EVP_MD_type` and `EVP_GROUP_get_curve_name`. [Unreleased]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.60...master [Unreleased]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.61...master [v0.9.61]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.60...openssl-sys-v0.9.61 [v0.9.60]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.59...openssl-sys-v0.9.60 [v0.9.59]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.58...openssl-sys-v0.9.59 [v0.9.58]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.57...openssl-sys-v0.9.58 Loading
openssl-sys/Cargo.toml +1 −1 Original line number Diff line number Diff line [package] name = "openssl-sys" version = "0.9.60" version = "0.9.61" authors = ["Alex Crichton <alex@alexcrichton.com>", "Steven Fackler <sfackler@gmail.com>"] license = "MIT" Loading