Skip to content

Commit

Permalink
Add windows cert section to mqtt5 user guide (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfod authored Feb 27, 2024
1 parent bd1e54e commit 4061e4c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions MQTT5-UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* [Direct MQTT with Custom Authentication](#direct-mqtt-with-custom-authentication)
* [Direct MQTT with PKCS11](#direct-mqtt-with-pkcs11-method)
* [Direct MQTT with PKCS12](#direct-mqtt-with-pkcs12-method)
* [Direct MQTT with Windows Certificate Store Method](#direct-mqtt-with-windows-certificate-store-method)
* [HTTP Proxy](#http-proxy)
* [Browser](#browser)
* [MQTT over Websockets with Sigv4 authentication](#mqtt-over-websockets-with-sigv4-authentication-1)
Expand Down Expand Up @@ -298,6 +299,23 @@ A MQTT5 direct connection can be made using a PKCS12 file rather than using a PE

Note: Currently, TLS integration with PKCS#12 is only available on MacOS devices.

#### Direct MQTT with Windows Certificate Store Method

A MQTT5 direct connection can be made with mutual TLS with the certificate and private key in the Windows certificate store,
rather than simply being files on disk. To create a MQTT5 builder configured for this connection, see the following code:

```typescript
// Certificate store path below is an example.
let certificateStorePath : string = "CurrentUser\\MY\\A11F8A9B5DF5B98BA3508FBCA575D09570E0D2C6";
let builder = AwsIotMqtt5ClientConfigBuilder.newDirectMqttBuilderWithMtlsFromWindowsCertStorePath(
"<account-specific endpoint>",
certificateStorePath
);
let client : Mqtt5Client = new mqtt5.Mqtt5Client(builder.build());
```

Note: Windows Certificate Store connection support is only available on Windows devices.

#### HTTP Proxy
No matter what your connection transport or authentication method is, you may connect through an HTTP proxy
by applying proxy configuration to the builder:
Expand Down

0 comments on commit 4061e4c

Please sign in to comment.