11/*
2- * Copyright 2020-2025 Comcast Cable Communications Management, LLC
2+ * Copyright 2020-2026 Comcast Cable Communications Management, LLC
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
2121#include " root_keystore.h"
2222#include " gtest/gtest.h"
2323#include < cstdlib>
24+ #include < stdlib.h>
2425
2526namespace {
2627 TEST (Pkcs12Test, parsePkcs12) {
@@ -39,6 +40,11 @@ namespace {
3940 }
4041
4142 TEST (Pkcs12Test, parseEmbeddedPkcs12) {
43+ // This code tests whether the embedded keystore is loaded and therefore
44+ // requires these environment variables to be unset.
45+ unsetenv (" ROOT_KEYSTORE_PASSWORD" );
46+ unsetenv (" ROOT_KEYSTORE" );
47+
4248 uint8_t key[SYM_256_KEY_SIZE];
4349 size_t key_length = SYM_256_KEY_SIZE;
4450 char name[MAX_NAME_SIZE];
@@ -66,6 +72,11 @@ namespace {
6672 }
6773
6874 TEST (Pkcs12Test, parseEmbeddedPkcs12Common) {
75+ // This code tests whether the embedded keystore is loaded and therefore
76+ // requires these environment variables to be unset.
77+ unsetenv (" ROOT_KEYSTORE_PASSWORD" );
78+ unsetenv (" ROOT_KEYSTORE" );
79+
6980 uint8_t key[SYM_256_KEY_SIZE];
7081 size_t key_length = SYM_256_KEY_SIZE;
7182 char name[MAX_NAME_SIZE];
0 commit comments