Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable windows certificate store setup #271

Merged
merged 7 commits into from
Feb 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions builder/actions/setup_cross_ci_crt_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
environment variables, secrets, files, etc. that is used to build up the testing environment.
"""

# TODO: The variable is used to disable the windows certificate store test to unblock a CI failure.
# The variable should be set to TRUE after the CI is fixed.
ENABLE_WINDOWS_CERT_STORE_TEST = False


class SetupCrossCICrtEnvironment(Action):

Expand Down Expand Up @@ -145,6 +149,12 @@ def _setenv_profile_file(self, env, profile_env_name, config_env_name, access_ke
print("[ERROR]: Could not get create profile with name: " + str(profile_env_name))
raise ValueError("Exception occurred trying to create profile")

def _setup_windows_cert_store_test(self, env, certificate_env_name, cerfiticate_s3_path, store_location_env_name):
if (self.is_windows == True and ENABLE_WINDOWS_CERT_STORE_TEST == True):
self._setenv_s3(env, certificate_env_name, cerfiticate_s3_path)
helpers.create_windows_cert_store(
env, certificate_env_name, store_location_env_name)

def _common_setup(self, env):

################################################
Expand Down Expand Up @@ -224,11 +234,8 @@ def _common_setup(self, env):
self._setenv(env, "AWS_TEST_MQTT5_IOT_CORE_PKCS12_KEY_PASSWORD", "PKCS12_KEY_PASSWORD")

# Windows Key Cert
if (self.is_windows == True):
self._setenv_s3(env, "AWS_TEST_MQTT5_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS",
"s3://aws-crt-test-stuff/unit-test-pfx-no-password.pfx")
helpers.create_windows_cert_store(
env, "AWS_TEST_MQTT5_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS", "AWS_TEST_MQTT5_IOT_CORE_WINDOWS_CERT_STORE")
self._setup_windows_cert_store_test(env, "AWS_TEST_MQTT5_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS",
"s3://aws-crt-test-stuff/unit-test-pfx-no-password.pfx", "AWS_TEST_MQTT5_IOT_CORE_WINDOWS_CERT_STORE")

# X509
self._setenv_secret(env, "AWS_TEST_MQTT5_IOT_CORE_X509_ENDPOINT", "ci/mqtt5/us/x509/endpoint")
Expand Down Expand Up @@ -312,11 +319,9 @@ def _common_setup(self, env):
self._setenv(env, "AWS_TEST_MQTT311_IOT_CORE_PKCS12_KEY_PASSWORD", "PKCS12_KEY_PASSWORD")

# Windows Key Cert
if (self.is_windows == True):
self._setenv_s3(env, "AWS_TEST_MQTT311_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS",
"s3://aws-crt-test-stuff/unit-test-pfx-no-password.pfx")
helpers.create_windows_cert_store(
env, "AWS_TEST_MQTT311_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS", "AWS_TEST_MQTT311_IOT_CORE_WINDOWS_CERT_STORE")
self._setup_windows_cert_store_test(env, "AWS_TEST_MQTT311_IOT_CORE_WINDOWS_PFX_CERT_NO_PASS",
"s3://aws-crt-test-stuff/unit-test-pfx-no-password.pfx",
"AWS_TEST_MQTT311_IOT_CORE_WINDOWS_CERT_STORE")

# X509
self._setenv_secret(env, "AWS_TEST_MQTT311_IOT_CORE_X509_ENDPOINT", "ci/mqtt5/us/x509/endpoint")
Expand Down
Loading