forked from Azure/azure-sdk-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Samples reorganization and readme adjusts (Azure#851)
* Samples reorganization and readme adjusts * Update README.md Co-authored-by: danewalton <[email protected]> * Update README.md Co-authored-by: danewalton <[email protected]> * Update sdk/docs/iot/README.md Co-authored-by: danewalton <[email protected]> * Update sdk/docs/iot/README.md Co-authored-by: danewalton <[email protected]> * Update sdk/samples/iot/hub/linux/how_to_iot_hub_samples_linux.md Co-authored-by: danewalton <[email protected]> * Update sdk/samples/iot/readme.md Co-authored-by: danewalton <[email protected]> Co-authored-by: Wellington Duraes <[email protected]> Co-authored-by: danewalton <[email protected]>
- Loading branch information
1 parent
2f1e51d
commit 2d589c9
Showing
9 changed files
with
179 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@REM Copyright (c) Microsoft Corporation. All rights reserved. | ||
@REM SPDX-License-Identifier MIT | ||
|
||
@echo off | ||
|
||
openssl ecparam -out device_ec_key.pem -name prime256v1 -genkey | ||
IF %ERRORLEVEL% NEQ 0 ( | ||
echo Failed generating certificate key | ||
exit b 1 | ||
) | ||
|
||
openssl req -new -days 365 -nodes -x509 -key device_ec_key.pem -out device_ec_cert.pem -config x509_config.cfg -subj CN=paho-sample-device1 | ||
IF %ERRORLEVEL% NEQ 0 ( | ||
echo Failed generating certificate | ||
exit b 1 | ||
) | ||
|
||
openssl x509 -noout -text -in device_ec_cert.pem | ||
|
||
type device_ec_cert.pem device_cert_store.pem | ||
type device_ec_key.pem device_cert_store.pem | ||
|
||
echo. | ||
echo It is NOT recommended to use OpenSSL on Windows or OSX. Recommended TLS stacks are | ||
echo Microsoft Windows SChannel httpsdocs.microsoft.comen-uswindowswin32comschannel | ||
echo OR | ||
echo Apple Secure Transport httpsdeveloper.apple.comdocumentationsecuritysecure_transport | ||
echo If using OpenSSL, it is recommended to use the OpenSSL Trusted CA store configured on your system. | ||
echo. | ||
echo If required (for example on Windows), download the Baltimore PEM CA from httpswww.digicert.comdigicert-root-certificates.htm to the current folder. | ||
echo Once it is downloaded, run the following command to set the environment variable for the samples | ||
echo. | ||
echo set AZ_IOT_DEVICE_X509_TRUST_PEM_FILE=%CD%BaltimoreCyberTrustRoot.crt.pem | ||
echo. | ||
echo Sample certificate generated | ||
echo Use the following command to set the environment variable for the samples | ||
echo. | ||
echo set AZ_IOT_DEVICE_X509_CERT_PEM_FILE=%CD%device_cert_store.pem | ||
echo. | ||
echo Use the following fingerprint when creating your device in IoT Hub | ||
|
||
FOR F tokens= %%a in ('openssl x509 -noout -fingerprint -in device_ec_cert.pem') do SET output=%%a | ||
set fingerprint=%output=% | ||
|
||
echo %fingerprint% | ||
|
||
echo %fingerprint% fingerprint.txt | ||
|
||
echo. | ||
echo The fingerprint has also been placed in fingerprint.txt for future reference |
Oops, something went wrong.