aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/x509_test.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2020-12-09 16:19:03 +0000
committerMichael Brown <mcb30@ipxe.org>2020-12-09 16:45:50 +0000
commit3475f9162b84ce21327244ebce20ae29db6d7ac8 (patch)
tree39f7a31165e66cf82d92f5d8d536e9b18b248c76 /src/tests/x509_test.c
parente3eedb0be581b7f3df70e8150c7adfcf275506b8 (diff)
downloadipxe-3475f9162b84ce21327244ebce20ae29db6d7ac8.tar.gz
[x509] Make root of trust a reference-counted structure
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/tests/x509_test.c')
-rw-r--r--src/tests/x509_test.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tests/x509_test.c b/src/tests/x509_test.c
index 2915b9068..256c3e85e 100644
--- a/src/tests/x509_test.c
+++ b/src/tests/x509_test.c
@@ -674,6 +674,7 @@ static struct x509_chain empty_store = {
/** Root certificate list containing the iPXE self-test root CA */
static struct x509_root test_root = {
+ .refcnt = REF_INIT ( ref_no_free ),
.digest = &x509_test_algorithm,
.count = 1,
.fingerprints = root_crt_fingerprint,
@@ -681,6 +682,7 @@ static struct x509_root test_root = {
/** Root certificate list containing the iPXE self-test intermediate CA */
static struct x509_root intermediate_root = {
+ .refcnt = REF_INIT ( ref_no_free ),
.digest = &x509_test_algorithm,
.count = 1,
.fingerprints = intermediate_crt_fingerprint,
@@ -695,6 +697,7 @@ static uint8_t dummy_fingerprint[] =
/** Certificate store containing a dummy fingerprint */
static struct x509_root dummy_root = {
+ .refcnt = REF_INIT ( ref_no_free ),
.digest = &x509_test_algorithm,
.count = 1,
.fingerprints = dummy_fingerprint,