Skip to content

Commit

Permalink
Bump version v0.9.1 (#94)
Browse files Browse the repository at this point in the history
* Bump version
* Fixed test file order read issues

---------

Signed-off-by: AssemblyJohn <[email protected]>
  • Loading branch information
AssemblyJohn authored Oct 23, 2024
1 parent 5c0b665 commit 049d691
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.14)

project(everest-evse_security VERSION 0.8
project(everest-evse_security VERSION 0.9.1
DESCRIPTION "Implementation of EVSE related security operations"
LANGUAGES CXX C
)
Expand Down
21 changes: 15 additions & 6 deletions tests/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,16 +288,25 @@ TEST_F(EvseSecurityTestsMulti, verify_multi_root_leaf_retrieval) {
// We have 2 leafs
ASSERT_EQ(result.info.size(), 2);

ASSERT_EQ(fs::path("certs/client/csms/CSMS_LEAF.pem"), result.info[0].certificate_single.value());
ASSERT_EQ(fs::path("certs/client/csms/SECC_LEAF_GRIDSYNC.pem"), result.info[1].certificate_single.value());
fs::path leaf_csms = fs::path("certs/client/csms/CSMS_LEAF.pem");
fs::path leaf_grid = fs::path("certs/client/csms/SECC_LEAF_GRIDSYNC.pem");

// File order is not guaranteed
ASSERT_TRUE(leaf_csms == result.info[0].certificate_single.value() ||
leaf_grid == result.info[0].certificate_single.value());
ASSERT_TRUE(leaf_csms == result.info[1].certificate_single.value() ||
leaf_grid == result.info[1].certificate_single.value());

ASSERT_TRUE(result.info[0].certificate_root.has_value());
ASSERT_TRUE(result.info[1].certificate_root.has_value());

ASSERT_TRUE(equal_certificate_strings(result.info[0].certificate_root.value(),
read_file_to_string("certs/ca/v2g/V2G_ROOT_CA.pem")));
ASSERT_TRUE(equal_certificate_strings(result.info[1].certificate_root.value(),
read_file_to_string("certs/ca/v2g/V2G_ROOT_GRIDSYNC_CA.pem")));
std::string root_v2g = read_file_to_string("certs/ca/v2g/V2G_ROOT_CA.pem");
std::string root_grid = read_file_to_string("certs/ca/v2g/V2G_ROOT_GRIDSYNC_CA.pem");

ASSERT_TRUE(equal_certificate_strings(result.info[0].certificate_root.value(), root_v2g) ||
equal_certificate_strings(result.info[0].certificate_root.value(), root_grid));
ASSERT_TRUE(equal_certificate_strings(result.info[1].certificate_root.value(), root_v2g) ||
equal_certificate_strings(result.info[1].certificate_root.value(), root_grid));
}

TEST_F(EvseSecurityTests, verify_normal_keygen) {
Expand Down

0 comments on commit 049d691

Please sign in to comment.