diff --git a/builder/actions/setup_cross_ci_crt_environment.py b/builder/actions/setup_cross_ci_crt_environment.py index 6aedaaa78..bdd43a074 100644 --- a/builder/actions/setup_cross_ci_crt_environment.py +++ b/builder/actions/setup_cross_ci_crt_environment.py @@ -223,14 +223,12 @@ def _common_setup(self, env): "s3://aws-crt-test-stuff/unit-test-key-pkcs12.pem") self._setenv(env, "AWS_TEST_MQTT5_IOT_CORE_PKCS12_KEY_PASSWORD", "PKCS12_KEY_PASSWORD") - # TODO: The windows certificate env var is disabled as it is failing in CI. We will bring it back once - # it is fixed. - # # 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") + # 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") # X509 self._setenv_secret(env, "AWS_TEST_MQTT5_IOT_CORE_X509_ENDPOINT", "ci/mqtt5/us/x509/endpoint") @@ -313,14 +311,12 @@ def _common_setup(self, env): "s3://aws-crt-test-stuff/unit-test-key-pkcs12.pem") self._setenv(env, "AWS_TEST_MQTT311_IOT_CORE_PKCS12_KEY_PASSWORD", "PKCS12_KEY_PASSWORD") - # TODO: The windows certificate env var is disabled as it is failing in CI. We will bring it back once - # it is fixed. # 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") + 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") # X509 self._setenv_secret(env, "AWS_TEST_MQTT311_IOT_CORE_X509_ENDPOINT", "ci/mqtt5/us/x509/endpoint") diff --git a/builder/actions/setup_cross_ci_helpers.py b/builder/actions/setup_cross_ci_helpers.py index 968426028..846220fe8 100644 --- a/builder/actions/setup_cross_ci_helpers.py +++ b/builder/actions/setup_cross_ci_helpers.py @@ -20,6 +20,9 @@ def create_windows_cert_store(env, certificate_env, location_env): return pfx_cert_path = env.shell.getenv(certificate_env) + # quick test + env.shell.exec("powershell.exe",["$env:PSModulePath=[Environment]::GetEnvironmentVariable('PSModulePath', 'Machine')"], check=True) + # Import the PFX into the Windows Certificate Store # (Passing '$mypwd' is required even though it is empty and our certificate has no password. It fails CI otherwise) import_pfx_arguments = [