Skip to content

Commit d7b1850

Browse files
committed
Fixed errors, minor Acrolinx fixes to improve scores
1 parent 6e05f1a commit d7b1850

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

articles/iot-hub/reference-x509-certificates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ When you upload your root certificate authority (CA) certificate or subordinate
203203
204204
- 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 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](https://github.com/Azure/azure-iot-sdk-c).
205205

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.
207207
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:
209209

210210
```bash
211211
openssl genpkey -out pop.key -algorithm RSA -pkeyopt rsa_keygen_bits:2048

articles/iot-hub/tutorial-x509-test-certs.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The following tutorial uses [OpenSSL](https://www.openssl.org/) and the [OpenSSL
4444
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:
4545

4646
- 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
4848
- Request and create a self-signed CA certificate that serves as your root CA certificate
4949

5050
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
166166
-keyout private/rootca.key
167167
```
168168
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.
170170

171171
```bash
172172
Enter PEM pass phrase:
@@ -183,7 +183,7 @@ You must first create an internal root certificate authority (CA) and a self-sig
183183
-extensions ca_ext
184184
```
185185

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.
187187
188188
```bash
189189
Using configuration from rootca.conf
@@ -201,17 +201,18 @@ You must first create an internal root certificate authority (CA) and a self-sig
201201
Data Base Updated
202202
```
203203
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).
205205
206206
## Create a subordinate CA
207207
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).
209209
210210
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:
211211
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
215216
216217
1. Start a Bash window and run the following command, replacing *{base_dir}* with the directory that contains your previously created root CA.
217218
@@ -225,7 +226,7 @@ Similar to your root CA, the files used to create and maintain your subordinate
225226
| --- | --- |
226227
| {subca_dir} | The name of the directory for the subordinate CA. For example, `subca`. |
227228
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).
229230
230231
```bash
231232
mkdir {subca_dir}
@@ -321,7 +322,7 @@ Similar to your root CA, the files used to create and maintain your subordinate
321322
-keyout private/subca.key
322323
```
323324
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.
325326

326327
```bash
327328
Enter PEM pass phrase:
@@ -338,7 +339,7 @@ Similar to your root CA, the files used to create and maintain your subordinate
338339
-extensions sub_ca_ext
339340
```
340341
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.
342343

343344
```bash
344345
Using configuration from rootca.conf
@@ -356,7 +357,7 @@ Similar to your root CA, the files used to create and maintain your subordinate
356357
Data Base Updated
357358
```
358359
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 for the certificate is present in 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 for the certificate is present in 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).
360361
361362
## Register your subordinate CA certificate to your IoT hub
362363
@@ -386,8 +387,9 @@ The client certificate must have the value of its Subject Common Name (CN) field
386387
387388
Perform the following steps to:
388389
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
391393
392394
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.
393395
@@ -411,7 +413,7 @@ Perform the following steps to:
411413
openssl req -new -key private/{device_name}.key -out {device_name}.csr
412414
```
413415
414-
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.
415417
416418
| Placeholder | Description |
417419
| --- | --- |
@@ -445,7 +447,7 @@ Perform the following steps to:
445447
-extensions client_ext
446448
```
447449
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.
449451
450452
```bash
451453
Using configuration from subca.conf
@@ -463,7 +465,7 @@ Perform the following steps to:
463465
Data Base Updated
464466
```
465467
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).
467469
468470
## Next steps
469471

0 commit comments

Comments
 (0)