0
votes

I am following the directions here: https://docs.microsoft.com/en-us/azure/iot-edge/how-to-create-transparent-gateway.

When I create the certificates using OpenSSL and the 'New-CACertsEdgeDevice myGateway' commands, I end up with an Elliptical Curve based private key which fails when I configure the edge gateway with the message

"Currently RSA is only supported".

I modified the New-CACertsCertChain script in ca-certs.ps1 (set the $useEcc var to $false) and reran. The script succeeds, but now the New-CACertsEdgeDevice script fails with:

New-SelfSignedCertificate : Cannot convert 'System.Object[]' to the type 'Microsoft.CertificateServices.Commands.Certificate' required by parameter 'Signer'. Specified method is not supported.

Any idea what I am doing wrong?

2

2 Answers

0
votes

I found an answer to this, although I am still not sure of the root cause.

These steps allowed me to create certificates that worked...

I kept the change I made to the New-CACertsCertChain (mentioned above)

I erased all the previous certs from the machine cert store

Then I closed the existing PowerShell console and started a new admin one.

I installed OpenSSL from here: https://sourceforge.net/projects/openssl/ @ this directory: C:\utils\openssl\bin

I set up the environment paths as follows: $ENV:PATH += ";C:\utils\openssl\bin" $ENV:OPENSSL_CONF="C:\utils\openssl\bin\openssl.cnf"

After that I continued with the articles directions and it worked. I did get a warning about not finding C:/OpenSSL/openssl.cnf, but I ignored it.

0
votes

I do not think you are doing anything wrong.

It appears that there is a problem with the powershell scripts. The good news is that there is a fix to the instructions at the Azure IoT C SDK GitHub branch CACertToolEdge which you can sync out and re-try.

I have filed an issue here: https://github.com/Azure/azure-iot-sdk-c/issues/337 to have this corrected.

Edit: Jan 09 2018: It appears that the scripts have fixed and you shouldn't run into this specific problem.