Skip to content

Commit

Permalink
x509-tsp: enable CI
Browse files Browse the repository at this point in the history
This enables CI on x509-tsp. It also fixes tests that broke with #1130

Fixes #1176

Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
  • Loading branch information
baloo committed Aug 1, 2023
1 parent 0345720 commit b476c2e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 4 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/x509-tsp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: x509-tsp

on:
pull_request:
paths:
- ".github/workflows/x509-tsp.yml"
- "const-oid/**"
- "cmpv2/**"
- "cms/**"
- "der/**"
- "spki/**"
- "x509-cert/**"
- "x509-tsp/**"
- "Cargo.*"
push:
branches: master

defaults:
run:
working-directory: x509-tsp

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"

jobs:
minimal-versions:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}

test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.65.0 # MSRV
- stable
steps:
- uses: actions/checkout@v3

- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack test --feature-powerset
5 changes: 1 addition & 4 deletions x509-tsp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,7 @@ mod tests {
GeneralName::DirectoryName(n) => n,
_ => panic!(),
};
assert_eq!(
dn.to_string(),
"C=US,STATEORPROVINCENAME=Some-State,O=Test,CN=Test TSA"
);
assert_eq!(dn.to_string(), "CN=Test TSA,O=Test,ST=Some-State,C=US");
assert_eq!(
tst.message_imprint.hashed_message.as_bytes(),
hex!("ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad")
Expand Down

0 comments on commit b476c2e

Please sign in to comment.