# `tls_certificate_check`
[🔗](https://github.com/g-andrade/tls_certificate_check/blob/1.33.0/src/tls_certificate_check.erl#L21)

Main API

# `option`

```erlang
-type option() :: ssl:tls_client_option().
```

# `override_source`

```erlang
-type override_source() ::
          {file, Path :: file:name_all()} | {encoded, binary()} | (CAs :: [public_key:der_encoded()]).
```

# `options`

```erlang
-spec options(Target) -> Options
                 when
                     Target :: Hostname | URL,
                     Hostname :: iodata(),
                     URL :: iodata(),
                     Options :: [option()].
```

Returns the list of `ssl:connect/3` options necessary to validate 
the server certificate against a list of trusted authorities, as well as to verify 
whether the server hostname matches one in the server certificate.

- `Target` can be either a hostname or an HTTP URL, as `t:iodata/0`

# `override_trusted_authorities`

```erlang
-spec override_trusted_authorities(From) -> ok when From :: override_source().
```

Overrides the trusted authorities with a custom source.

# `trusted_authorities`

```erlang
-spec trusted_authorities() -> CAs when CAs :: [public_key:der_encoded(), ...].
```

Returns the list of trusted authorities.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
