Skip to content

Allow TLS Context to be passed into providers

Pre-release
Pre-release
Compare
Choose a tag to compare
@graebm graebm released this 30 Mar 22:24
· 92 commits to main since this release
b6656aa
Support BYO_CRYPTO by allowing tls_ctx to be passed into providers. (…

…#126)

Previously, providers that needed an `aws_tls_ctx` would create one automatically. Some providers allowed the user to pass one in as an option, some didn't even offer the option.

To support BYO_CRYPTO, every credentials provider that might need an `aws_tls_ctx` needs to let the user pass one in. Also, `aws_tls_ctx` is an expensive object, so automatic behind-the-scenes creation should be discouraged.

Backwards compatible changes:
- `aws_credentials_provider_chain_default_options`: added `tls_ctx`. created automatically if not provided
- `aws_credentials_provider_profile_options`: added `tls_ctx`. created automatically if not provided

Breaking changes (but there are no bindings so who cares):
- `aws_credentials_provider_ecs_options`: replaced ~~use_tls~~ with optional `tls_ctx`
- `aws_credentials_provider_sts_web_identity_options`: added `tls_ctx`. it is required
- `aws_credentials_provider_sts_options`: `tls_ctx` is now required (used to be optional)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.