Bug #102347 Wrong parameter names in 5.7 Connecting Securely Using SSL
Submitted: 22 Jan 2021 15:09 Modified: 2 Feb 2021 17:01
Reporter: Piotr Pabis Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Documentation Severity:S3 (Non-critical)
Version:5.1, 8 OS:Any
Assigned to: CPU Architecture:Any
Tags: documentation

[22 Jan 2021 15:09] Piotr Pabis
Description:
5.7 Connecting Securely Using SSL
The examples (parameters) are the following:

Setting up Client Authentication (correct, both are about client's Key Store)

```
Setting the system properties directly in the client code:
System.setProperty("javax.net.ssl.keyStore","path_to_keystore_file"); 
System.setProperty("javax.net.ssl.keyStorePassword","mypassword");
Through Connector/J connection properties:
clientCertificateKeyStoreUrl=file:path_to_truststore_file 
clientCertificateKeyStorePassword=mypassword
```

Setting up Server Authentication (*incorrect*, one is about Trust Store, another about client's Key Store)
```
Setting the system properties directly in the client code:
System.setProperty("javax.net.ssl.trustStore","path_to_truststore_file"); 
System.setProperty("javax.net.ssl.trustStorePassword","mypassword");
Setting the Connector/J connection properties:
clientCertificateKeyStoreUrl=file:path_to_truststore_file 
clientCertificateKeyStorePassword=mypassword
```

How to repeat:
Just open the documentation in the section 5.7 of both versions: 5.1 and 8.

Suggested fix:
Change in "Setting up Server Authentication"
```
clientCertificateKeyStoreUrl=file:path_to_truststore_file 
clientCertificateKeyStorePassword=mypassword
```
to
```
trustCertificateKeyStoreUrl=file:path_to_truststore_file 
trustCertificateKeyStorePassword=mypassword
```

Based on https://github.com/mysql/mysql-connector-j/blob/release/8.0/src/main/core-api/java/com/mys...
[25 Jan 2021 7:30] MySQL Verification Team
Hello Piotr Pabis,

Thank you for the report and feedback.

regards,
Umesh
[2 Feb 2021 17:01] Daniel So
Posted by developer:
 
The manuals have been corrected as suggested. Thanks for the bug report!