Skip to content

Commit

Permalink
Fix DPS registration over HTTP with escaped characters in the registr…
Browse files Browse the repository at this point in the history
…ation Id
  • Loading branch information
David R. Williamson committed Jan 10, 2023
1 parent 8aab065 commit b325056
Show file tree
Hide file tree
Showing 5 changed files with 239 additions and 275 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void RunSample()
/// <param name="registrationId">The registration Id of the key to create.</param>
/// <returns>The key for the specified device Id registration in the enrollment group.</returns>
/// <seealso>
/// https://docs.microsoft.com/en-us/azure/iot-edge/how-to-auto-provision-symmetric-keys?view=iotedge-2018-06#derive-a-device-key
/// https://docs.microsoft.com/azure/iot-edge/how-to-auto-provision-symmetric-keys?view=iotedge-2018-06#derive-a-device-key
/// </seealso>
private static string ComputeDerivedSymmetricKey(string enrollmentKey, string registrationId)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public async Task RunSampleAsync()

private ProvisioningTransportHandler GetTransportHandler()
{
Console.WriteLine($"Using transport type {_parameters.TransportType}.");
return _parameters.TransportType switch
{
TransportType.Mqtt => new ProvisioningTransportHandlerMqtt(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootDir>$(MSBuildProjectDirectory)\..\..\..\..</RootDir>
<LangVersion>8.0</LangVersion>
</PropertyGroup>

Expand Down
Loading

0 comments on commit b325056

Please sign in to comment.