Add ssl_verify option to imap integration (#93811)
* Add ssl_verify option to imap integration * Add test
This commit is contained in:
parent
46d8885023
commit
1e0770ff8a
5 changed files with 89 additions and 12 deletions
|
@ -10,12 +10,19 @@ from aioimaplib import AioImapException
|
|||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.const import CONF_NAME, CONF_PASSWORD, CONF_PORT, CONF_USERNAME
|
||||
from homeassistant.const import (
|
||||
CONF_NAME,
|
||||
CONF_PASSWORD,
|
||||
CONF_PORT,
|
||||
CONF_USERNAME,
|
||||
CONF_VERIFY_SSL,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.data_entry_flow import AbortFlow, FlowResult
|
||||
from homeassistant.exceptions import TemplateError
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.selector import (
|
||||
BooleanSelector,
|
||||
SelectSelector,
|
||||
SelectSelectorConfig,
|
||||
SelectSelectorMode,
|
||||
|
@ -42,6 +49,7 @@ from .const import (
|
|||
from .coordinator import connect_to_server
|
||||
from .errors import InvalidAuth, InvalidFolder
|
||||
|
||||
BOOLEAN_SELECTOR = BooleanSelector()
|
||||
CIPHER_SELECTOR = SelectSelector(
|
||||
SelectSelectorConfig(
|
||||
options=list(SSLCipherList),
|
||||
|
@ -68,6 +76,7 @@ CONFIG_SCHEMA_ADVANCED = {
|
|||
vol.Optional(
|
||||
CONF_SSL_CIPHER_LIST, default=SSLCipherList.PYTHON_DEFAULT
|
||||
): CIPHER_SELECTOR,
|
||||
vol.Optional(CONF_VERIFY_SSL, default=True): BOOLEAN_SELECTOR,
|
||||
}
|
||||
|
||||
OPTIONS_SCHEMA = vol.Schema(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue