Skip to content

Commit db16b91

Browse files
committed
Edits
1 parent 1771607 commit db16b91

4 files changed

+18
-13
lines changed

includes/iot-hub-howto-auth-device-cert-dotnet.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ ms.custom: mqtt, devx-track-csharp, devx-track-dotnet
1414

1515
To connect a device to IoT Hub using an X.509 certificate:
1616

17-
1. Use [DeviceAuthenticationWithX509Certificate](/dotnet/api/microsoft.azure.devices.client.deviceauthenticationwithx509certificate) to create an object that contains device and certificate information that is passed as the second parameter to `DeviceClient.Create` (step 2).
17+
1. Use [DeviceAuthenticationWithX509Certificate](/dotnet/api/microsoft.azure.devices.client.deviceauthenticationwithx509certificate) to create an object that contains device and certificate information. `DeviceAuthenticationWithX509Certificate` is passed as the second parameter to `DeviceClient.Create` (step 2).
1818

19-
1. Use [DeviceClient.Create](/dotnet/api/microsoft.azure.devices.client.deviceclient.create?#microsoft-azure-devices-client-deviceclient-create(system-string-microsoft-azure-devices-client-iauthenticationmethod)) to connect the device to IoT Hub using an X.509 certificate.
19+
1. Use [DeviceClient.Create](/dotnet/api/microsoft.azure.devices.client.deviceclient.create?view=azure-dotnet&branch=main#microsoft-azure-devices-client-deviceclient-create(system-string-microsoft-azure-devices-client-iauthenticationmethod-microsoft-azure-devices-client-transporttype)) to connect the device to IoT Hub using an X.509 certificate.
2020

21-
This example shows certificate input parameter values as local variables for clarity. In a production system, store sensitive input parameters in environment variables or another more secure storage location. For example, use `Environment.GetEnvironmentVariable("HOSTNAME")` to read the host name environment variable.
22-
23-
In this example, the device and certificate information populated `auth` `DeviceAuthenticationWithX509Certificate` object is passed as to `DeviceClient.Create`. An example of `DeviceAuthenticationWithX509Certificate` information population is omitted because of the flexible nature of how the certificate information can be added.
21+
In this example, the device and certificate information has been populated in the `auth` `DeviceAuthenticationWithX509Certificate` object that is passed to `DeviceClient.Create`. An example of `DeviceAuthenticationWithX509Certificate` information population is omitted because of the flexible nature of how the certificate information can be added.
2422

2523
```csharp
2624
HostName = "xxxxx.azure-devices.net";
@@ -33,10 +31,11 @@ using var deviceClient = DeviceClient.Create(
3331
For more information about certificate authentication, see:
3432

3533
* [Authenticate identities with X.509 certificates](/azure/iot-hub/authenticate-authorize-x509)
36-
* [Create and upload certificates for testing](/azure/iot-hub/tutorial-x509-test-certs)
34+
* [Tutorial: Create and upload certificates for testing](/azure/iot-hub/tutorial-x509-test-certs)
3735
* [X509Certificate2Collection](/dotnet/api/system.security.cryptography.x509certificates.x509certificate2collection)
3836
* [X509Certificate2](/dotnet/api/system.security.cryptography.x509certificates.x509certificate2)
39-
* [Tutorial: Provision multiple X.509 devices using enrollment groups](/azure/iot-dps/tutorial-custom-hsm-enrollment-group-x509?pivots=programming-language-java)
37+
* [Tutorial: Provision multiple X.509 devices using enrollment groups](/azure/iot-dps/tutorial-custom-hsm-enrollment-group-x509?pivots=programming-language-csharp)
38+
* [OpenSSL CA](https://openssl-ca.readthedocs.io/)
4039

4140
##### Code samples
4241

includes/iot-hub-howto-auth-device-cert-java.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.date: 12/12/2024
1313

1414
To connect a device to IoT Hub using an X.509 certificate:
1515

16-
1. Build the [SSLContext](https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/SSLContext.html) object using [buildSSLContext](https://hc.apache.org/httpcomponents-core-4.4.x/current/httpcore/apidocs/org/apache/http/ssl/SSLContextBuilder.html)
16+
1. Build the [SSLContext](https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/SSLContext.html) object using [buildSSLContext](https://hc.apache.org/httpcomponents-core-4.4.x/current/httpcore/apidocs/org/apache/http/ssl/SSLContextBuilder.html).
1717
1. Add the `SSLContext` information to a [ClientOptions](/java/api/com.microsoft.azure.sdk.iot.device.clientoptions) object.
1818
1. Call [DeviceClient](/java/api/com.microsoft.azure.sdk.iot.device.deviceclient?#com-microsoft-azure-sdk-iot-device-deviceclient-deviceclient(java-lang-string-com-microsoft-azure-sdk-iot-device-iothubclientprotocol-com-microsoft-azure-sdk-iot-device-clientoptions)) using the `ClientOptions` information to create the device-to-IoT Hub connection.
1919

@@ -41,7 +41,9 @@ DeviceClient client = new DeviceClient(connString, protocol, clientOptions);
4141
For more information about certificate authentication, see:
4242

4343
* [Authenticate identities with X.509 certificates](/azure/iot-hub/authenticate-authorize-x509)
44-
* [Create and upload certificates for testing](/azure/iot-hub/tutorial-x509-test-certs)
44+
* [Tutorial: Create and upload certificates for testing](/azure/iot-hub/tutorial-x509-test-certs)
45+
* [Tutorial: Provision multiple X.509 devices using enrollment groups](/azure/iot-dps/tutorial-custom-hsm-enrollment-group-x509?pivots=programming-language-java)
46+
* [OpenSSL CA](https://openssl-ca.readthedocs.io/)
4547

4648
##### Code samples
4749

includes/iot-hub-howto-auth-device-cert-node.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ For more information about certificate authentication, see:
4141

4242
* [Authenticate identities with X.509 certificates](/azure/iot-hub/authenticate-authorize-x509)
4343
* [Create and upload certificates for testing](/azure/iot-hub/tutorial-x509-test-certs)
44+
* [Tutorial: Provision multiple X.509 devices using enrollment groups](/azure/iot-dps/tutorial-custom-hsm-enrollment-group-x509?pivots=programming-language-nodejs)
45+
* [OpenSSL CA](https://openssl-ca.readthedocs.io/)
4446

4547
##### Code samples
4648

47-
For a working sample of device X.509 certificate authentication, see [Simple sample device X.509](https://github.com/Azure/azure-iot-sdk-node/blob/main/device/samples/javascript/simple_sample_device_x509.js).
49+
For a working sample of device X.509 certificate authentication, see [Simple sample device X.509](https://github.com/Azure/azure-iot-sdk-node/blob/main/device/samples/javascript/simple_sample_device_x509.js).

includes/iot-hub-howto-auth-device-cert-python.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.manager: lizross
1111
ms.date: 12/06/2024
1212
---
1313

14-
To connect a device to IoT Hub:
14+
To connect a device to IoT Hub using an X.509 certificate:
1515

1616
1. Use [create_from_x509_certificate](/python/api/azure-iot-device/azure.iot.device.iothubdeviceclient?#azure-iot-device-iothubdeviceclient-create-from-x509-certificate) to add the X.509 certificate parameters
1717

@@ -50,8 +50,10 @@ await device_client.connect()
5050
For more information about certificate authentication, see:
5151

5252
* [Authenticate identities with X.509 certificates](/azure/iot-hub/authenticate-authorize-x509)
53-
* [Create and upload certificates for testing](/azure/iot-hub/tutorial-x509-test-certs)
53+
* [Tutorial: Create and upload certificates for testing](/azure/iot-hub/tutorial-x509-test-certs)
54+
* [Tutorial: Provision multiple X.509 devices using enrollment groups](/azure/iot-dps/tutorial-custom-hsm-enrollment-group-x509?pivots=programming-language-python)
55+
* [OpenSSL CA](https://openssl-ca.readthedocs.io/)
5456

5557
##### Code samples
5658

57-
For working samples of device X.509 certificate authentication, see the examples whose file names end in X.509 at [Async hub scenarios](https://github.com/Azure/azure-iot-sdk-python/tree/main/samples/async-hub-scenarios).
59+
For working samples of device X.509 certificate authentication, see the examples whose file names end in x509 at [Async hub scenarios](https://github.com/Azure/azure-iot-sdk-python/tree/main/samples/async-hub-scenarios).

0 commit comments

Comments
 (0)