You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-hub/reference-x509-certificates.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,9 +203,9 @@ When you upload your root certificate authority (CA) certificate or subordinate
203
203
204
204
- If you're using the PowerShell script supplied by Microsoft, run `New-CACertsVerificationCert "<verification code>"` to create a certificate named `VerifyCert4.cer`, replacing `<verification code>` with the previously generated verification code. For more information, see [Managing test CA certificates forsamples and tutorials](https://github.com/Azure/azure-iot-sdk-c/blob/main/tools/CACertificates/CACertificateOverview.md)in the GitHub repository for the [Azure IoT Hub Device SDK for C](https://github.com/Azure/azure-iot-sdk-c).
205
205
206
-
- If you're using the Bash script supplied by Microsoft, run ./certGen.sh create_verification_certificate "<verification code>" to create a certificate named verification-code.cert.pem, replacing <verification code> with the previously generated verification code. For more information, see [Managing test CA certificates for samples and tutorials](https://github.com/Azure/azure-iot-sdk-c/blob/main/tools/CACertificates/CACertificateOverview.md) in the GitHub repository for the Azure IoT Hub Device SDK for C.
206
+
- If you're using the Bash script supplied by Microsoft, run `./certGen.sh create_verification_certificate "<verification code>"` to create a certificate named verification-code.cert.pem, replacing `<verification code>` with the previously generated verification code. For more information, see [Managing test CA certificates for samples and tutorials](https://github.com/Azure/azure-iot-sdk-c/blob/main/tools/CACertificates/CACertificateOverview.md) in the GitHub repository for the Azure IoT Hub Device SDK for C.
207
207
208
-
- If you're using OpenSSL to generate your certificates, you must first generate a private key, then generate a certificate signing request (CSR) file. In the following example, replace <verification code> with the previously generated verification code:
208
+
- If you're using OpenSSL to generate your certificates, you must first generate a private key, then generate a certificate signing request (CSR) file. In the following example, replace `<verification code>` with the previously generated verification code:
Copy file name to clipboardExpand all lines: articles/iot-hub/tutorial-x509-test-certs.md
+19-17Lines changed: 19 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ The following tutorial uses [OpenSSL](https://www.openssl.org/) and the [OpenSSL
44
44
You must first create an internal root certificate authority (CA) and a self-signed root CA certificate, to serve as a trust anchor from which you can create other certificates for testing. The files used to create and maintain your internal root CA are stored in a folder structure and initialized as part of this process. Perform the following steps to:
45
45
46
46
- Create and initialize the folders and files used by your root CA
47
-
- Create a configuration file used by OpenSSL to configure your root CA, as well as certificates created with your root CA
47
+
- Create a configuration file used by OpenSSL to configure your root CA and certificates created with your root CA
48
48
- Request and create a self-signed CA certificate that serves as your root CA certificate
49
49
50
50
1. Start a Bash window and run the following command, replacing *{base_dir}* with the desired directory in which to create the root CA.
@@ -166,7 +166,7 @@ You must first create an internal root certificate authority (CA) and a self-sig
166
166
-keyout private/rootca.key
167
167
```
168
168
169
-
You're prompted to enter a PEM pass phrase, as shown below, for the private key file. Enter and confirm a pass phrase to generate your private key and CSR.
169
+
You're prompted to enter a PEM pass phrase, as shown in the following example, for the private key file. Enter and confirm a pass phrase to generate your private key and CSR.
170
170
171
171
```bash
172
172
Enter PEM pass phrase:
@@ -183,7 +183,7 @@ You must first create an internal root certificate authority (CA) and a self-sig
183
183
-extensions ca_ext
184
184
```
185
185
186
-
You're prompted to provide the PEM pass phrase, as shown below, for the private key file. After providing the pass phrase, OpenSSL generates a certificate, then prompts you to sign and commit the certificate for your root CA. Specify *y* for both prompts to generate the self-signed certificate for your root CA.
186
+
You're prompted to provide the PEM pass phrase, as shown in the following example, for the private key file. After providing the pass phrase, OpenSSL generates a certificate, then prompts you to sign and commit the certificate for your root CA. Specify *y* for both prompts to generate the self-signed certificate for your root CA.
187
187
188
188
```bash
189
189
Using configuration from rootca.conf
@@ -201,17 +201,18 @@ You must first create an internal root certificate authority (CA) and a self-sig
201
201
Data Base Updated
202
202
```
203
203
204
-
After the certificate database is updated, confirm that both the certificate file, *rootca.crt*, is present in the *rootca* directory and the PEM certificate (.pem) file for the certificate is present in the *rootca/certs* directory. The file name of the .pem file matches the serial number of the root CA certificate. For more information about the formats of the certificate files, see [X.509 certificates](reference-x509-certificates.md#certificate-formats).
204
+
After updating the certificate database, confirm that both the certificate file, *rootca.crt*, is present in the *rootca* directory and the PEM certificate (.pem) file for the certificate is present in the *rootca/certs* directory. The file name of the .pem file matches the serial number of the root CA certificate. For more information about the formats of the certificate files, see [X.509 certificates](reference-x509-certificates.md#certificate-formats).
205
205
206
206
## Create a subordinate CA
207
207
208
-
After you've created your internal root CA, you should create a subordinate CA to use as an *intermediate CA* with which to sign client certificates for your devices. In theory, you don't need to create a subordinate CA; you can upload your root CA certificate to your IoT hub and sign client certificates directly from your root CA. However, using a subordinate CA as an intermediate CA to sign client certificates more closely simulates a recommended production environment, in which your root CA is kept offline. An intermediate CA can in turn sign another intermediate CA, and so on, until the last intermediate CA terminates this process by signing a client certificate for your device into a cascaded hierarchy of certificates known as a *certificate chain of trust*. In a production environment, the certificate chain of trust allows a delegation of trust towards signing devices. For more information about signing devices into a certificate chain of trust, see [Authenticate devices using X.509 CA certificates](iot-hub-x509ca-overview.md#sign-devices-into-the-certificate-chain-of-trust).
208
+
After you've created your internal root CA, you should create a subordinate CA to use as an *intermediate CA* with which to sign client certificates for your devices. In theory, you don't need to create a subordinate CA; you can upload your root CA certificate to your IoT hub and sign client certificates directly from your root CA. However, using a subordinate CA as an intermediate CA to sign client certificates more closely simulates a recommended production environment, in which your root CA is kept offline. You can also use a subordinate CA to sign another subordinate CA, which in turn can sign another subordinate CA, and so on to create a hierarchy of intermediate CAs as part of a *certificate chain of trust.* In a production environment, the certificate chain of trust allows a delegation of trust towards signing devices. For more information about signing devices into a certificate chain of trust, see [Authenticate devices using X.509 CA certificates](iot-hub-x509ca-overview.md#sign-devices-into-the-certificate-chain-of-trust).
209
209
210
210
Similar to your root CA, the files used to create and maintain your subordinate CA are stored in a folder structure and initialized as part of this process. Perform the following steps to:
211
211
212
-
- Create and initialize the folders and files used by your subordinate CA
213
-
- Create a configuration file used by OpenSSL to configure your subordinate CA, as well as certificates created with your subordinate CA
214
-
- Request and create a CA certificate signed by your root CA that serves as your subordinate CA certificate
212
+
> [!div class="checklist"]
213
+
> * Create and initialize the folders and files used by your subordinate CA
214
+
> * Create a configuration file used by OpenSSL to configure your subordinate CA and certificates created with your subordinate CA
215
+
> * Request and create a CA certificate signed by your root CA that serves as your subordinate CA certificate
215
216
216
217
1. Start a Bash window and run the following command, replacing *{base_dir}* with the directory that contains your previously created root CA.
217
218
@@ -225,7 +226,7 @@ Similar to your root CA, the files used to create and maintain your subordinate
225
226
| --- | --- |
226
227
| {subca_dir} | The name of the directory for the subordinate CA. For example, `subca`. |
227
228
228
-
This step creates a directory structure and support files for the subordinate CA similar to that created for the root CA in [Create a root CA](#create-a-root-ca).
229
+
This step creates a directory structure and support files for the subordinate CA similar to the folder structure and files created for the root CA in [Create a root CA](#create-a-root-ca).
229
230
230
231
```bash
231
232
mkdir {subca_dir}
@@ -321,7 +322,7 @@ Similar to your root CA, the files used to create and maintain your subordinate
321
322
-keyout private/subca.key
322
323
```
323
324
324
-
You're prompted to enter a PEM pass phrase, as shown below, for the private key file. Enter and verify a pass phrase to generate your private key and CSR.
325
+
You're prompted to enter a PEM pass phrase, as shown in the following example, for the private key file. Enter and verify a pass phrase to generate your private key and CSR.
325
326
326
327
```bash
327
328
Enter PEM pass phrase:
@@ -338,7 +339,7 @@ Similar to your root CA, the files used to create and maintain your subordinate
338
339
-extensions sub_ca_ext
339
340
```
340
341
341
-
You're prompted to enter the pass phrase, as shown below, for the private key file of your root CA. After you enter the pass phrase, OpenSSL generates and displays the details of the certificate, then prompts you to sign and commit the certificate for your subordinate CA. Specify *y*for both prompts to generate the certificate for your subordinate CA.
342
+
You're prompted to enter the pass phrase, as shown in the following example, for the private key file of your root CA. After you enter the pass phrase, OpenSSL generates and displays the details of the certificate, then prompts you to sign and commit the certificate for your subordinate CA. Specify *y*for both prompts to generate the certificate for your subordinate CA.
342
343
343
344
```bash
344
345
Using configuration from rootca.conf
@@ -356,7 +357,7 @@ Similar to your root CA, the files used to create and maintain your subordinate
356
357
Data Base Updated
357
358
```
358
359
359
-
After the certificate database is updated, confirm that the certificate file, *subca.crt*, is present in the subordinate CA directory and that the PEM certificate (.pem) file forthe certificate is presentin the *rootca/certs* directory. The file name of the .pem file matches the serial number of the subordinate CA certificate. For more information about the formats of the certificate files, see [X.509 certificates](reference-x509-certificates.md#certificate-formats).
360
+
After updating the certificate database, confirm that the certificate file, *subca.crt*, is present in the subordinate CA directory and that the PEM certificate (.pem) file forthe certificate is presentin the *rootca/certs* directory. The file name of the .pem file matches the serial number of the subordinate CA certificate. For more information about the formats of the certificate files, see [X.509 certificates](reference-x509-certificates.md#certificate-formats).
360
361
361
362
## Register your subordinate CA certificate to your IoT hub
362
363
@@ -386,8 +387,9 @@ The client certificate must have the value of its Subject Common Name (CN) field
386
387
387
388
Perform the following steps to:
388
389
389
-
- Create a private key and certificate signing request (CSR) for a client certificate
390
-
- Create a client certificate signed by your subordinate CA certificate
390
+
> [!div class="checklist"]
391
+
> * Create a private key and certificate signing request (CSR) for a client certificate
392
+
> * Create a client certificate signed by your subordinate CA certificate
391
393
392
394
1. Start a Bash window and run the following command, replacing *{base_dir}* with the directory that contains your previously created root CA and subordinate CA.
393
395
@@ -411,7 +413,7 @@ Perform the following steps to:
You're prompted to provide certificate details, as shown below. Replace the following placeholders with the corresponding values.
416
+
You're prompted to provide certificate details, as shown in the following example. Replace the following placeholders with the corresponding values.
415
417
416
418
| Placeholder | Description |
417
419
| --- | --- |
@@ -445,7 +447,7 @@ Perform the following steps to:
445
447
-extensions client_ext
446
448
```
447
449
448
-
You're prompted to enter the pass phrase, as shown below, for the private key file of your subordinate CA. After you enter the pass phrase, OpenSSL generates and displays the details of the certificate, then prompts you to sign and commit the client certificate for your device. Specify *y* for both prompts to generate the client certificate.
450
+
You're prompted to enter the pass phrase, as shown in the following example, for the private key file of your subordinate CA. After you enter the pass phrase, OpenSSL generates and displays the details of the certificate, then prompts you to sign and commit the client certificate for your device. Specify *y* for both prompts to generate the client certificate.
449
451
450
452
```bash
451
453
Using configuration from subca.conf
@@ -463,7 +465,7 @@ Perform the following steps to:
463
465
Data Base Updated
464
466
```
465
467
466
-
After the certificate database is updated, confirm that the certificate file for the client certificate is present in the subordinate CA directory and that the PEM certificate (.pem) file for the client certificate is present in the *certs* subdirectory of the subordinate CA directory. The file name of the .pem file matches the serial number of the client certificate. For more information about the formats of the certificate files, see [X.509 certificates](reference-x509-certificates.md#certificate-formats).
468
+
After updating the certificate database, confirm that the certificate file for the client certificate is present in the subordinate CA directory and that the PEM certificate (.pem) file for the client certificate is present in the *certs* subdirectory of the subordinate CA directory. The file name of the .pem file matches the serial number of the client certificate. For more information about the formats of the certificate files, see [X.509 certificates](reference-x509-certificates.md#certificate-formats).
0 commit comments