README.md

# AwsRdsCAStore

[![Github.com](https://github.com/voltone/aws_rds_castore/workflows/CI/badge.svg)](https://github.com/voltone/aws_rds_castore/actions)
[![Hex.pm](https://img.shields.io/hexpm/v/aws_rds_castore.svg)](https://hex.pm/packages/aws_rds_castore)
[![Hexdocs.pm](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/aws_rds_castore/)
[![Hex.pm](https://img.shields.io/hexpm/dt/aws_rds_castore.svg)](https://hex.pm/packages/aws_rds_castore)
[![Hex.pm](https://img.shields.io/hexpm/l/aws_rds_castore.svg)](https://hex.pm/packages/aws_rds_castore)
[![Github.com](https://img.shields.io/github/last-commit/voltone/aws_rds_castore.svg)](https://github.com/voltone/aws_rds_castore/commits/master)

AWS RDS CA certificate store for Elixir. See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html

Based on and derived from https://hex.pm/packages/castore

## Installation

In your `mix.exs`:

```elixir
def deps do
  [
    {:aws_rds_castore, "~> 1.0"}
  ]
end
```

Then, run `$ mix deps.get`.

## Usage

```elixir
# In runtime.exs:
config :my_app, MyApp.Repo,
  url: database_url,
  ssl: true,
  ssl_opts: AwsRdsCAStore.ssl_opts(database_url),
  pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
  socket_options: maybe_ipv6
```

See [the documentation](https://hexdocs.pm/aws_rds_castore).

## Updates

Every time there is an update to the AWS RDS CA certificate store, we'll release a new **patch version** of the library. For example, `1.0.12` → `1.0.13`.

## Contributing

If you want to locally update the CA certificate store file bundled with this library, run the `mix aws_rds_ca_store.certdata` from the root of this library.

## License

Copyright 2022 Bram Verburg

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.