Skip to content

Commit

Permalink
Fix to make sure Windows installer can setup with symmetric key provi…
Browse files Browse the repository at this point in the history
…sioning mode (#1446) (#1447)

The fix entails removing the "device_id" from the yaml selection regex. Device id was removed from the provisioning settings however was left behind in this install script. This issue was discovered in E2E tests as part of test coverage improvements.
  • Loading branch information
mrohera authored Jul 16, 2019
1 parent c29d894 commit 602472f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/windows/setup/IotEdgeSecurityDaemon.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,7 @@ function Set-ProvisioningMode {
}
else {
$attestationMethod = Get-DpsProvisioningSettings
$selectionRegex = '(?:[^\S\n]*#[^\S\n]*)?provisioning:\s*#?\s*source:\s*".*"\s*#?\s*global_endpoint:\s*".*"\s*#?\s*scope_id:\s*".*"\s*#?\s*attestation:\s*#?\s*method:\s*"' + $attestationMethod + '"\s*#?\s*registration_id:\s*".*"\s*#?\s*device_id:\s*".*"'
$selectionRegex = '(?:[^\S\n]*#[^\S\n]*)?provisioning:\s*#?\s*source:\s*".*"\s*#?\s*global_endpoint:\s*".*"\s*#?\s*scope_id:\s*".*"\s*#?\s*attestation:\s*#?\s*method:\s*"' + $attestationMethod + '"\s*#?\s*registration_id:\s*".*"'

if ($attestationMethod -eq 'symmetric_key') {
$selectionRegex += '\s*#?\s*symmetric_key:\s".*"'
Expand Down

0 comments on commit 602472f

Please sign in to comment.