aws-samples / iot-dotnet-publisher-consumer

A prescriptive guidance on how an AWS device IOT publisher and consumer can be implemented using Microsoft .NET and .NET core framework.
Apache License 2.0
55 stars 15 forks source link

Sample Code for non-PFX certificate usage #12

Open jkoplo opened 3 years ago

jkoplo commented 3 years ago

I have sample code for connecting to AWS IoT using the cert files directly (and not using OpenSSL to convert to a PFX). I'd like to contribute this for connecting both with M2MQTT and MQTTNet.

It resolves some open issues in other projects (#927, #721) but since it's AWS IoT specific I think it probably belongs in this repo.

My only hesitation is that the README is already pretty long and adding more sections/branches for different ways of handling certs and also implementations with MQTTNet alongside M2MQTT is a pretty big restructure. There's also some folder restructuring that might be needed.

Basically there would be 4 factors, leading to 16 different examples if I follow the standard of one csproj/folder per example:

  1. Core OR Framework
  2. Publisher OR Subscriber
  3. Certs OR pfx
  4. MQTTNet OR M2MQTT

Would you be okay with me reorganizing the folder structure and maybe combining examples into a few projects? I think Publisher and Subscriber could easily be in the same project and the Cert/pfx code could just be commented out or branched based on a boolean.

Thoughts?