Skip to content

Commit

Permalink
Document that OS trust store is used, not Java TrustStore (#673)
Browse files Browse the repository at this point in the history
  • Loading branch information
graebm committed Sep 5, 2023
1 parent c58f5fc commit 3778794
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,21 @@ a classifier-based jar, you must specify the classifier name yourself.
- `aws.crt.memory.tracing` - May be: "0" (default, no tracing), "1" (track bytes), "2" (more detail).
Allows the CRT.nativeMemory() and CRT.dumpNativeMemory() functions to report native memory usage.

## Mac-Only TLS Behavior
## TLS Behavior

The CRT uses native libraries for TLS, rather than Java's typical
Secure Socket Extension (JSSE), KeyStore, and TrustStore.
On [Windows](https://learn.microsoft.com/en-us/windows/win32/security) and
[Apple](https://developer.apple.com/documentation/security) devices,
the built-in OS libraries are used.
On Linux/Unix/etc [s2n-tls](https://github.com/aws/s2n-tls) is used.

If you need to add certificates to the trust store, add them to your OS trust store.
The CRT does not use the Java TrustStore. For more customization options, see
[TlsContextOptions](https://awslabs.github.io/aws-crt-java/software/amazon/awssdk/crt/io/TlsContextOptions.html) and
[TlsConnectionOptions](https://awslabs.github.io/aws-crt-java/software/amazon/awssdk/crt/io/TlsConnectionOptions.html).

### Mac-Only TLS Behavior

Please note that on Mac, once a private key is used with a certificate, that certificate-key pair is imported into the Mac Keychain. All subsequent uses of that certificate will use the stored private key and ignore anything passed in programmatically. Beginning in v0.6.6, when a stored private key from the Keychain is used, the following will be logged at the "info" log level:

Expand Down
3 changes: 3 additions & 0 deletions src/test/java/software/amazon/awssdk/crt/test/Elasticurl.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ public static void main(String args[]) throws Exception {
useTls = false;
port = 80;
}
if (uri.getPort() != -1) {
port = uri.getPort();
}

HttpVersion requiredVersion = HttpVersion.UNKNOWN;
if (cli.hasOption("http1_1")) {
Expand Down

0 comments on commit 3778794

Please sign in to comment.