Commit be65acb4 authored by Bernd Krietenstein's avatar Bernd Krietenstein
Browse files

Merge branch 'master' into kletterstein/openssl-sys

parents 9c30e4e4 36c474ad
Loading
Loading
Loading
Loading
+49 −63
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ jobs:
    name: rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/checkout@v3
      - uses: sfackler/actions/rustup@master
      - uses: sfackler/actions/rustfmt@master

@@ -32,23 +32,23 @@ jobs:
    name: clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/checkout@v3
      - uses: sfackler/actions/rustup@master
      - run: echo "::set-output name=version::$(rustc --version)"
      - run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
        id: rust-version
      - uses: actions/cache@v1
      - uses: actions/cache@v3
        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
      - uses: actions/cache@v3
        with:
          path: ~/.cargo/registry/cache
          key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
      - run: cargo fetch
      - uses: actions/cache@v1
      - uses: actions/cache@v3
        with:
          path: target
          key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
@@ -58,25 +58,25 @@ jobs:
    name: min-version
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/checkout@v3
      - uses: sfackler/actions/rustup@master
        with:
          version: 1.56.0
      - run: echo "::set-output name=version::$(rustc --version)"
      - run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
        id: rust-version
      - uses: actions/cache@v1
      - uses: actions/cache@v3
        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
      - uses: actions/cache@v3
        with:
          path: ~/.cargo/registry/cache
          key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
      - run: cargo fetch
      - uses: actions/cache@v1
      - uses: actions/cache@v3
        with:
          path: target
          key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
@@ -86,25 +86,25 @@ jobs:
    name: windows-vcpkg
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/checkout@v3
      - uses: sfackler/actions/rustup@master
      - run: echo "::set-output name=version::$(rustc --version)"
      - run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
        id: rust-version
      - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
      - run: vcpkg install openssl:x64-windows-static-md
      - uses: actions/cache@v1
      - uses: actions/cache@v3
        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
      - uses: actions/cache@v3
        with:
          path: ~/.cargo/registry/cache
          key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
      - run: cargo fetch
      - uses: actions/cache@v1
      - uses: actions/cache@v3
        with:
          path: target
          key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
@@ -116,23 +116,23 @@ jobs:
    name: macos-homebrew
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/checkout@v3
      - uses: sfackler/actions/rustup@master
      - run: echo "::set-output name=version::$(rustc --version)"
      - run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
        id: rust-version
      - uses: actions/cache@v1
      - uses: actions/cache@v3
        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
      - uses: actions/cache@v3
        with:
          path: ~/.cargo/registry/cache
          key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
      - run: cargo fetch
      # - uses: actions/cache@v1
      # - uses: actions/cache@v3
      #   with:
      #     path: target
      #     key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
@@ -153,14 +153,14 @@ jobs:
            - false
          library:
            - name: boringssl
              version: 5697a9202615925696f8dc7f4e286d44d474769e
              version: 93e8d4463d59d671e9c5c6171226341f04b07907
            - name: openssl
              version: vendored
            - name: openssl
              version: 3.0.5
              version: 3.1.0
              dl-path: /
            - name: openssl
              version: 1.1.1q
              version: 1.1.1t
              dl-path: /
            - name: openssl
              version: 1.1.0l
@@ -181,17 +181,7 @@ jobs:
              bindgen: true
              library:
                name: libressl
                version: 3.5.3
            - target: x86_64-unknown-linux-gnu
              bindgen: true
              library:
                name: libressl
                version: 3.6.1
            - target: x86_64-unknown-linux-gnu
              bindgen: true
              library:
                name: libressl
                version: 3.7.0
                version: 3.7.1
            - target: x86_64-unknown-linux-gnu
              bindgen: false
              library:
@@ -201,21 +191,7 @@ jobs:
              bindgen: false
              library:
                name: libressl
                version: 3.5.3
            - target: x86_64-unknown-linux-gnu
              bindgen: false
              library:
                name: libressl
                version: 3.6.1
            - target: x86_64-unknown-linux-gnu
              bindgen: false
              library:
                name: libressl
                version: 3.7.0
          exclude:
            - library:
                name: boringssl
              bindgen: true
                version: 3.7.1
      name: ${{ matrix.target }}-${{ matrix.library.name }}-${{ matrix.library.version }}-${{ matrix.bindgen }}
      runs-on: ubuntu-latest
      env:
@@ -224,9 +200,9 @@ jobs:
        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: actions/checkout@v3
        - uses: sfackler/actions/rustup@master
        - run: echo "::set-output name=version::$(rustc --version)"
        - run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
          id: rust-version
        - run: rustup target add ${{ matrix.target }}
        - name: Install packages
@@ -246,7 +222,7 @@ jobs:
            sudo apt-get update
            sudo apt-get install -y $packages
        - run: sudo apt-get remove -y libssl-dev
        - uses: actions/cache@v2
        - uses: actions/cache@v3
          with:
            path: /opt/openssl
            key: openssl-${{ matrix.target }}-${{ matrix.library.name }}-${{ matrix.library.version }}-2
@@ -308,16 +284,26 @@ jobs:
              make install_sw
              ;;
            "boringssl")
              sed -i rust/CMakeLists.txt -e '1s%^%include_directories(../include)\n%'
              cpu=`echo ${{ matrix.target }} | cut -d - -f 1`
              mkdir build
              cd build

              echo "set(CMAKE_SYSTEM_NAME Linux)" > toolchain.cmake
              echo "set(CMAKE_SYSTEM_PROCESSOR $cpu)" >> toolchain.cmake
              echo "set(triple ${{ matrix.target }})" >> toolchain.cmake
              echo 'set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} '$OS_FLAGS '" CACHE STRING "c++ flags")' >> toolchain.cmake
              echo 'set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   '$OS_FLAGS '" CACHE STRING "c flags")' >> toolchain.cmake
              echo 'set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} '$OS_FLAGS '" CACHE STRING "asm flags")' >> toolchain.cmake
              cmake -DRUST_BINDINGS="${{ matrix.target }}" -B $OPENSSL_DIR -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake
              make -C $OPENSSL_DIR

              cmake .. -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DRUST_BINDINGS="${{ matrix.target }}" -DCMAKE_INSTALL_PREFIX="${OPENSSL_DIR}" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake
              make -j "$(nproc)"
              make install

              # Copy stuff around so it's all as the build system expects.
              cp -r rust/ "$OPENSSL_DIR/rust"
              mkdir -p "$OPENSSL_DIR/crypto/"
              mkdir -p "$OPENSSL_DIR/ssl/"
              cp "$OPENSSL_DIR/lib/libcrypto.a" "$OPENSSL_DIR/crypto/"
              cp "$OPENSSL_DIR/lib/libssl.a" "$OPENSSL_DIR/ssl/"
            esac

          if: matrix.library.version != 'vendored' && !steps.openssl-cache.outputs.cache-hit
@@ -325,20 +311,20 @@ jobs:
            mkdir -p .cargo
            echo '[patch.crates-io]' > .cargo/config.toml
            echo 'bssl-sys = { path = "'$OPENSSL_DIR'/rust" }' >> .cargo/config.toml
          if: matrix.library.name == 'boringssl'
        - uses: actions/cache@v1
          if: matrix.library.name == 'boringssl' && !matrix.bindgen
        - uses: actions/cache@v3
          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
        - uses: actions/cache@v3
          with:
            path: ~/.cargo/registry/cache
            key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
        - run: cargo fetch
        - uses: actions/cache@v1
        - uses: actions/cache@v3
          with:
            path: target
            key: target-${{ matrix.target }}-${{ matrix.bindgen }}-${{ matrix.library.name }}-${{ matrix.library.version }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
@@ -347,14 +333,14 @@ jobs:
            if [[ "${{ matrix.library.version }}" == "vendored" ]]; then
              features="--features vendored"
            fi
            if [[ "${{ matrix.bindgen }}" == "true" ]]; then
            if [[ "${{ matrix.bindgen }}" == "true" && "${{ matrix.library.name }}" != "boringssl" ]]; then
              features="$features --features bindgen"
            fi
            cargo run --manifest-path=systest/Cargo.toml --target ${{ matrix.target }} $features
          if: matrix.library.name != 'boringssl'
        - name: Test openssl
          run: |
            if [[ "${{ matrix.library.name }}" == "boringssl" ]]; then
            if [[ "${{ matrix.library.name }}" == "boringssl" && "${{ matrix.bindgen }}" != "true" ]]; then
              features="--features unstable_boringssl"
            fi
            if [[ "${{ matrix.library.version }}" == "vendored" ]]; then
+2 −2
Original line number Diff line number Diff line
[package]
name = "openssl-macros"
version = "0.1.0"
version = "0.1.1"
edition = "2018"
license = "MIT/Apache-2.0"
description = "Internal macros used by the openssl crate."
@@ -11,4 +11,4 @@ proc-macro = true
[dependencies]
proc-macro2 = "1"
quote = "1"
syn = { version = "1", features = ["full"] }
syn = { version = "2", features = ["full"] }
+2 −0
Original line number Diff line number Diff line
#![allow(clippy::uninlined_format_args)]

use proc_macro::TokenStream;
use proc_macro2::Ident;
use quote::quote;
+53 −1
Original line number Diff line number Diff line
@@ -2,6 +2,54 @@

## [Unreleased]

## [v0.9.84] - 2023-04-01

### Added

* Added `ASN1_INTEGER_dup` and `ASN1_INTEGER_cmp`.
* Added `stack_st_X509_NAME_ENTRY`.
* Added `DIST_POINT_NAME`, `DIST_POINT`, `stack_st_DIST_POINT`, `DIST_POINT_free`, and `DIST_POINT_NAME_free`.

## [v0.9.83] - 2023-03-23

### Fixed

* Fixed version checks for LibreSSL.

### Added

* Added `i2d_X509_EXTENSION`.
* Added `GENERAL_NAME_new`.

## [v0.9.82] - 2023-03-19

### Added

* Added support for LibreSSL 3.7.1.
* Added support for X25519 and Ed25519 on LibreSSL and BoringSSL.

## [v0.9.81] - 2023-03-14

### Fixed

Fixed builds against OpenSSL built with `no-cast`.

### Added

* Added experimental bindgen support for BoringSSL.
* Added `X509_VERIFY_PARAM_set_auth_level`, `X509_VERIFY_PARAM_get_auth_level`, and `X509_VERIFY_PARAM_set_purpose`.
* Added `X509_PURPOSE_*` consts.
* Added `X509_NAME_add_entry`.
* Added `X509_load_crl_file`.
* Added `SSL_set_cipher_list`, `SSL_set_ssl_method`, `SSL_use_PrivateKey_file`, `SSL_use_PrivateKey`, `SSL_use_certificate`, `SSL_use_certificate_chain_file`, `SSL_set_client_CA_list`, `SSL_add_client_CA`, and `SSL_set0_verify_cert_store`.
* Added `X509_PURPOSE`, `X509_STORE_set_purpose`, and `X509_STORE_set_trust`.
* Added `SSL_CTX_set_num_tickets`, `SSL_set_num_tickets`, `SSL_CTX_get_num_tickets`, and `SSL_get_num_tickets`.
* Added `CMS_verify`.

### Removed

* Removed an unnecessary link to libatomic for 32-bit android targets.

## [v0.9.80] - 2022-12-20

### Fixed
@@ -370,7 +418,11 @@
* 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.80..master
[Unreleased]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.84..master
[v0.9.84]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.83...openssl-sys-v0.9.84
[v0.9.83]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.82...openssl-sys-v0.9.83
[v0.9.82]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.81...openssl-sys-v0.9.82
[v0.9.81]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.80...openssl-sys-v0.9.81
[v0.9.80]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.79...openssl-sys-v0.9.80
[v0.9.79]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.78...openssl-sys-v0.9.79
[v0.9.78]: https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.77...openssl-sys-v0.9.78
+3 −3
Original line number Diff line number Diff line
[package]
name = "openssl-sys"
version = "0.9.80"
version = "0.9.84"
authors = [
    "Alex Crichton <alex@alexcrichton.com>",
    "Steven Fackler <sfackler@gmail.com>",
@@ -12,6 +12,7 @@ readme = "README.md"
categories = ["cryptography", "external-ffi-bindings"]
links = "openssl"
build = "build/main.rs"
edition = "2018"

[features]
vendored = ['openssl-src']
@@ -22,11 +23,10 @@ libc = "0.2"
bssl-sys = { version = "0.1.0", optional = true }

[build-dependencies]
bindgen = { version = "0.60.1", optional = true }
bindgen = { version = "0.64.0", optional = true, features = ["experimental"] }
cc = "1.0"
openssl-src = { version = "111", optional = true }
pkg-config = "0.3.9"
autocfg = "1.0"

[target.'cfg(target_env = "msvc")'.build-dependencies]
vcpkg = "0.2.8"
Loading