Commit 40603199 authored by Steven Fackler's avatar Steven Fackler
Browse files

Run rustfmt on github actions

parent 72048765
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
name: CI

on:
  pull_request:
    branches:
      - master
  push:
    branches:
      - master
      - github-actions

env:
  RUSTFLAGS: -Dwarnings
  RUST_BACKTRACE: 1

jobs:
  rustfmt:
    name: rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Install Rust
        run: rustup update stable && rustup default stable
      - name: Check formatting
        run: cargo fmt --all -- --check
+1 −4
Original line number Diff line number Diff line
@@ -207,10 +207,7 @@ fn try_vcpkg() {
        .find_package("openssl");

    if let Err(e) = lib {
        println!(
            "note: vcpkg did not find openssl: {}",
            e
        );
        println!("note: vcpkg did not find openssl: {}", e);
        return;
    }

+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ extern "C" {
    pub fn EVP_DecryptFinal_ex(
        ctx: *mut EVP_CIPHER_CTX,
        outm: *mut c_uchar,
        outl: *mut c_int
        outl: *mut c_int,
    ) -> c_int;
}
cfg_if! {
+1 −3
Original line number Diff line number Diff line
@@ -142,9 +142,7 @@ extern "C" {
        buf: *mut *const u8,
        length: c_long,
    ) -> *mut PKCS8_PRIV_KEY_INFO;
    pub fn PKCS8_PRIV_KEY_INFO_free(
        p8inf: *mut PKCS8_PRIV_KEY_INFO,
    );
    pub fn PKCS8_PRIV_KEY_INFO_free(p8inf: *mut PKCS8_PRIV_KEY_INFO);

    pub fn PEM_read_bio_PKCS7(
        bio: *mut BIO,
+2 −6
Original line number Diff line number Diff line
@@ -527,10 +527,7 @@ impl PKey<Private> {
    /// Deserializes a DER-formatted PKCS#8 unencrypted private key.
    ///
    /// This method is mainly for interoperability reasons. Encrypted keyfiles should be preferred.
    pub fn private_key_from_pkcs8(
        der: &[u8],
    ) -> Result<PKey<Private>, ErrorStack>
    {
    pub fn private_key_from_pkcs8(der: &[u8]) -> Result<PKey<Private>, ErrorStack> {
        unsafe {
            ffi::init();
            let len = der.len().min(c_long::max_value() as usize) as c_long;
@@ -539,8 +536,7 @@ impl PKey<Private> {
                &mut der.as_ptr(),
                len,
            ))?;
            let res = cvt_p(ffi::EVP_PKCS82PKEY(p8inf))
                .map(|p| PKey::from_ptr(p));
            let res = cvt_p(ffi::EVP_PKCS82PKEY(p8inf)).map(|p| PKey::from_ptr(p));
            ffi::PKCS8_PRIV_KEY_INFO_free(p8inf);
            res
        }
Loading