summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2026-04-21 05:18:35 +0000
committertb <>2026-04-21 05:18:35 +0000
commite49896f3e98ab36fd145e494a248c83a5a46a84b (patch)
treee13ebbc4cb887082c382ccd43592dd4cd60530c2 /src
parent052c4cf7f1328bcebfedf3eb9c2c76290dad8e7d (diff)
downloadopenbsd-e49896f3e98ab36fd145e494a248c83a5a46a84b.tar.gz
openbsd-e49896f3e98ab36fd145e494a248c83a5a46a84b.tar.bz2
openbsd-e49896f3e98ab36fd145e494a248c83a5a46a84b.zip
pkcs7test: factor main into a helper so we can add some unit tests easily
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libcrypto/pkcs7/pkcs7test.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/pkcs7/pkcs7test.c b/src/regress/lib/libcrypto/pkcs7/pkcs7test.c
index 28e0f67aee..88126ea082 100644
--- a/src/regress/lib/libcrypto/pkcs7/pkcs7test.c
+++ b/src/regress/lib/libcrypto/pkcs7/pkcs7test.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkcs7test.c,v 1.5 2021/04/07 17:21:40 tb Exp $ */ 1/* $OpenBSD: pkcs7test.c,v 1.6 2026/04/21 05:18:35 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -123,8 +123,8 @@ message_compare(const char *out, size_t len)
123 } 123 }
124} 124}
125 125
126int 126static int
127main(int argc, char **argv) 127pkcs7_basics(void)
128{ 128{
129 BIO *bio_in, *bio_content, *bio_out, *bio_cert, *bio_pkey; 129 BIO *bio_in, *bio_content, *bio_out, *bio_cert, *bio_pkey;
130 STACK_OF(X509) *certs; 130 STACK_OF(X509) *certs;
@@ -299,3 +299,13 @@ main(int argc, char **argv)
299 299
300 return 0; 300 return 0;
301} 301}
302
303int
304main(int argc, char **argv)
305{
306 int failed = 0;
307
308 failed |= pkcs7_basics();
309
310 return failed;
311}