diff --git a/core/libgamestream/src/mkcert.c b/core/libgamestream/src/mkcert.c index 0817bad82..43ed1890d 100644 --- a/core/libgamestream/src/mkcert.c +++ b/core/libgamestream/src/mkcert.c @@ -74,6 +74,10 @@ static int mkcert_generate_impl(mbedtls_pk_context *key, mbedtls_x509write_cert char not_before[16], not_after[16]; strftime(not_before, 16, "%Y%m%d%H%M%S", ptr_time); ptr_time->tm_year += NUM_YEARS; + if (ptr_time->tm_mon == 1 && ptr_time->tm_mday == 29) { + // Don't ever set the date to February 29th, to avoid leap year issues + ptr_time->tm_mday = 28; + } strftime(not_after, 16, "%Y%m%d%H%M%S", ptr_time); if ((ret = mbedtls_x509write_crt_set_validity(crt, not_before, not_after)) != 0) { mbedtls_strerror(ret, buf, 512); diff --git a/core/libgamestream/tests/CMakeLists.txt b/core/libgamestream/tests/CMakeLists.txt index 7e6abb019..bbf6aedc0 100644 --- a/core/libgamestream/tests/CMakeLists.txt +++ b/core/libgamestream/tests/CMakeLists.txt @@ -2,18 +2,4 @@ if (NOT BUILD_TESTS) return() endif () -find_package(OpenSSL 1.0) - -if (NOT OPENSSL_FOUND) - message(WARNING "OpenSSL not found, skipping tests") - return() -endif () - -foreach (suite_name aes challenge hash sign) - add_executable(test-gamestream-crypt-${suite_name} ${suite_name}.c ${CMAKE_CURRENT_SOURCE_DIR}/../src/set_error.c) - target_include_directories(test-gamestream-crypt-${suite_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../libgamestream ${CMAKE_CURRENT_SOURCE_DIR}/../src) - target_link_libraries(test-gamestream-crypt-${suite_name} PRIVATE ${OPENSSL_LIBRARIES}) - target_link_libraries(test-gamestream-crypt-${suite_name} PRIVATE ${MBEDCRYPTO_LIBRARY} ${MBEDX509_LIBRARY}) - target_include_directories(test-gamestream-crypt-${suite_name} SYSTEM PRIVATE ${MBEDTLS_INCLUDE_DIRS}) - add_test(test-gamestream-crypt-${suite_name} test-gamestream-crypt-${suite_name}) -endforeach () \ No newline at end of file +add_subdirectory(crypt) \ No newline at end of file diff --git a/core/libgamestream/tests/crypt/CMakeLists.txt b/core/libgamestream/tests/crypt/CMakeLists.txt new file mode 100644 index 000000000..552ef4929 --- /dev/null +++ b/core/libgamestream/tests/crypt/CMakeLists.txt @@ -0,0 +1,15 @@ +find_package(OpenSSL 1.0) + +if (NOT OPENSSL_FOUND) + message(WARNING "OpenSSL not found, skipping tests") + return() +endif () + +foreach (suite_name aes challenge hash sign) + add_executable(test-gamestream-crypt-${suite_name} ${suite_name}.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/set_error.c) + target_include_directories(test-gamestream-crypt-${suite_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../libgamestream ${CMAKE_CURRENT_SOURCE_DIR}/../../src) + target_link_libraries(test-gamestream-crypt-${suite_name} PRIVATE ${OPENSSL_LIBRARIES}) + target_link_libraries(test-gamestream-crypt-${suite_name} PRIVATE ${MBEDCRYPTO_LIBRARY} ${MBEDX509_LIBRARY}) + target_include_directories(test-gamestream-crypt-${suite_name} SYSTEM PRIVATE ${MBEDTLS_INCLUDE_DIRS}) + add_test(test-gamestream-crypt-${suite_name} test-gamestream-crypt-${suite_name}) +endforeach () \ No newline at end of file diff --git a/core/libgamestream/tests/aes.c b/core/libgamestream/tests/crypt/aes.c similarity index 100% rename from core/libgamestream/tests/aes.c rename to core/libgamestream/tests/crypt/aes.c diff --git a/core/libgamestream/tests/challenge.c b/core/libgamestream/tests/crypt/challenge.c similarity index 100% rename from core/libgamestream/tests/challenge.c rename to core/libgamestream/tests/crypt/challenge.c diff --git a/core/libgamestream/tests/hash.c b/core/libgamestream/tests/crypt/hash.c similarity index 100% rename from core/libgamestream/tests/hash.c rename to core/libgamestream/tests/crypt/hash.c diff --git a/core/libgamestream/tests/sign.c b/core/libgamestream/tests/crypt/sign.c similarity index 100% rename from core/libgamestream/tests/sign.c rename to core/libgamestream/tests/crypt/sign.c diff --git a/src/app/ui/launcher/pair.dialog.h b/src/app/ui/launcher/pair.dialog.h index 9612139fa..ed6c52f52 100644 --- a/src/app/ui/launcher/pair.dialog.h +++ b/src/app/ui/launcher/pair.dialog.h @@ -4,6 +4,4 @@ #include "lvgl.h" -extern const lv_fragment_class_t pair_dialog_class; - void pair_dialog_open(const uuidstr_t *uuid); \ No newline at end of file