Skip to content

Commit b302438

Browse files
committed
Run pkcs7 signedData stream through make check so it asserts the real verify result
1 parent fd9727c commit b302438

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

.github/examples-manifest.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,8 @@ examples:
266266
profile: pkcs7
267267
wolfssl_ref: master
268268
deps: [zlib1g-dev]
269-
run:
270-
# last line of the real path; the not-compiled-in branch returns 0 without it
271-
- exec: [./signedData-stream, content.txt]
272-
expect: "bytes from file"
269+
# make check asserts the real verify result, not a mid-stream "bytes from file"
270+
mode: check
273271

274272
# Both commands come from pkcs7/README.md "Creating an SMIME bundle and
275273
# verifying it"; smime-verify consumes the bundle smime writes.

pkcs7/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ clean:
5757
authEnvelopedDataKARI.der authEnvelopedDataKTRI.der \
5858
authEnvelopedDataORI.der authEnvelopedDataPWRI.der encryptedData.der \
5959
authEnvelopedDataKEKRI.der compressedData.der \
60-
smime-created.p7s
60+
smime-created.p7s stream.log
6161

62-
check: SHELL := /bin/bash
63-
check: .SHELLFLAGS := -eo pipefail -c
62+
# Redirect then grep (no pipe) so signedData-stream's nonzero exit fails the
63+
# recipe, there is no SIGPIPE on the dump, and it works under BSD make too.
6464
check: signedData-stream
65-
./signedData-stream content.txt | grep -q 'Successfully verified SignedData bundle'
65+
./signedData-stream content.txt > stream.log
66+
grep -q 'Successfully verified SignedData bundle' stream.log
6667
@echo "PASS: pkcs7-signeddata-stream checks"

0 commit comments

Comments
 (0)