Athozs / hass-additional-ca

Add private Certificate Authority or self-signed certificate into Home Assistant to access 3rd-party service with TLS/SSL.
MIT License
32 stars 4 forks source link

Default.crt not found #11

Closed Benjamin648092 closed 1 month ago

Benjamin648092 commented 1 month ago

Describe the issue

I am not sure what I am doing wrong, but I have been trying for quite a while to get additional-ca to recognize my Default.crt. I am running HAOS, and used the File Browser addon to add Default.crt to the homeassistant folder.

Describe your setup (please complete the following information):

YAML configuration extract

additional_ca: Default: Default.crt

Logs

This error originated from a custom integration.

Logger: custom_components.additional_ca Source: custom_components/additional_ca/init.py:101 integration: Additional CA (documentation, issues) First occurred: 4:06:43 PM (1 occurrences) Last logged: 4:06:43 PM

Default: Default.crt not found.

Additional context

TLS/SSL inspection using custom root ca

Athozs commented 1 month ago

Hello @Benjamin648092 ,

Thanks for using Additional CA integration,

I think your CA is in the wrong place.

Try the following: create a folder additional_ca under config (the config folder contains configuration.yaml) and put your Default.crt in it, so you have this path: config/additional_ca/Default.crt

Benjamin648092 commented 1 month ago

Thank you for explaining that! It turns out that when I do that, it still won't work.

If I set the path as: config/additional_ca/Default.crt and then put the crt in where you specified, it still says, "This error originated from a custom integration.

Logger: custom_components.additional_ca Source: custom_components/additional_ca/init.py:102 integration: Additional CA (documentation, issues) First occurred: 6:35:56 PM (1 occurrences) Last logged: 6:35:56 PM

Default: config/additional_ca/Default.crt not found."

Could this be due to the fact that it was originally a .pem file I converted to .crt?

Athozs commented 1 month ago

You don't need to specify the full path in configuration.yaml

With config/additional_ca/ Default.crt, your configuration.yaml looks like this:

additional_ca:
  my_ca: Default.crt