|
9 | 9 | + [How to setup a MQTT5 builder based on desired connection method](#how-to-setup-mqtt5-builder-based-on-desired-connection-method) |
10 | 10 | * [Direct MQTT with X509-based Mutual TLS Method](#direct-mqtt-with-x509-based-mutual-tls-method) |
11 | 11 | * [Direct MQTT with Custom Authorizer Method](#direct-mqtt-with-custom-authorizer-method) |
12 | | - * [Direct MQTT with PKCS11 Method](#direct-mqtt-with-pkcs11-method) |
13 | | - * [Direct MQTT with PKCS12 Method](#direct-mqtt-with-pkcs12-method) |
| 12 | + * [Direct MQTT with PKCS11 Method (Unix Only)](#direct-mqtt-with-pkcs11-method-unix-only) |
| 13 | + * [Direct MQTT with PKCS12 Method (macOS Only)](#direct-mqtt-with-pkcs12-method-macos-only) |
14 | 14 | * [Direct MQTT with Custom Key Operations Method](#direct-mqtt-with-custom-key-operation-method) |
15 | 15 | * [Direct MQTT with Windows Certificate Store Method](#direct-mqtt-with-windows-certificate-store-method) |
16 | 16 | * [Direct MQTT with Java Keystore Method](#direct-mqtt-with-java-keystore-method) |
@@ -147,14 +147,14 @@ AwsIotMqtt5ClientBuilder builder = AwsIotMqtt5ClientBuilder.newDirectMqttBuilder |
147 | 147 |
|
148 | 148 | In both cases, the builder will construct a final CONNECT packet username field value for you based on the values configured. Do not add the token-signing fields to the value of the username that you assign within the custom authentication config structure. Similarly, do not add any custom authentication related values to the username in the CONNECT configuration optionally attached to the client configuration. The builder will do everything for you. |
149 | 149 |
|
150 | | -### **Direct MQTT with PKCS11 Method** |
| 150 | +### **Direct MQTT with PKCS11 Method (Unix Only)** |
151 | 151 |
|
152 | 152 | A MQTT5 direct connection can be made using a PKCS11 device rather than using a PEM encoded private key, the private key for mutual TLS is stored on a PKCS#11 compatible smart card or Hardware Security Module (HSM). To create a MQTT5 builder configured for this connection, see the following code: |
153 | 153 |
|
154 | 154 | ~~~ java |
155 | 155 |
|
156 | 156 | Pkcs11Lib pkcs11Lib = new Pkcs11Lib("<path to PKCS11 library>"); |
157 | | -TlsContextPkcs11Options pkcs11Options = new TlsContextPkcs11Options(pkcs11Lib)) { |
| 157 | +TlsContextPkcs11Options pkcs11Options = new TlsContextPkcs11Options(pkcs11Lib) |
158 | 158 | pkcs11Options.withCertificateFilePath("<certificate file path>"); |
159 | 159 | pkcs11Options.withUserPin("<pkcs11 user pin>"); |
160 | 160 |
|
@@ -182,7 +182,7 @@ AwsIotMqtt5ClientBuilder builder = AwsIotMqtt5ClientBuilder.newDirectMqttBuilder |
182 | 182 |
|
183 | 183 | **Note**: Currently, TLS integration with PKCS#11 is only available on Unix devices. |
184 | 184 |
|
185 | | -### **Direct MQTT with PKCS12 Method** |
| 185 | +### **Direct MQTT with PKCS12 Method (macOS only)** |
186 | 186 |
|
187 | 187 | A MQTT5 direct connection can be made using a PKCS12 file rather than using a PEM encoded private key. To create a MQTT5 builder configured for this connection, see the following code: |
188 | 188 |
|
|
0 commit comments