denzilferreira / aware-micro

Apache License 2.0
15 stars 14 forks source link

Set SSL Certificate only when configured #22

Closed dmikurube closed 1 year ago

dmikurube commented 1 year ago

The database certs are not always mandatory even when the SSL mode is preferred. This pull request sets the certs only when specified.

denzilferreira commented 1 year ago

Does database_ssl_path_ca_cert_pem and database_ssl_path_client_key_pemexist on the config JSON file?

dmikurube commented 1 year ago

They do not exist in the config JSON by default, but some database installations (ex. recent Amazon RDS) require SSL while certificates are not mandatory for them. I wanted to just set options.setSslMode(SslMode.PREFERRED), but no certificates.

dmikurube commented 1 year ago

Thanks!