| Current Path : /lib/python3/dist-packages/certbot_apache/__pycache__/ |
| Current File : //lib/python3/dist-packages/certbot_apache/__pycache__/configurator.cpython-38.pyc |
U
���]e� � @ s� d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl Z ddl
Z
ddlZddl
ZddlmZ ddlmZmZmZmZmZ ddlmZ ddlmZ ddlmZ dd lmZ dd
lmZ ddlmZ ddlm Z dd
l!m"Z" ddl#m$Z$ ddl%m&Z& ddl%m'Z' ddl%m(Z( ddl%m)Z) ddl%m*Z* ddl%m+Z+ e�,e-�Z.ej/�0ej1ej2�ej/�3ej4�G dd� de j5���Z6e$�7e6� dS )zApache Configurator.� N)�defaultdict)�
challenges)�DefaultDict�Dict�List�Set�Union)�errors)�
interfaces)�util)�"KeyAuthorizationAnnotatedChallenge)�
filesystem)�os)�common)�path_surgery)�AutoHSTSEnhancement)�apache_util)� constants)�display_ops)�http_01)�obj)�parserc s� e Zd ZdZdZej�d�dkr(ed7 Zedddd d
d
dgd
dgd
d
gdddddde �
dd�d�Zdd� Zdd� Z
edd� �Z� fdd�Zedd� �Zedd� �Zd d!� Zd�d"d#�Z� fd$d%�Zd&d'� Zd؇ fd)d*� Zd+d,� Zd-d.� Zd/d0� Zd�d1d2�Zd�d4d5�Zd6d7� Zd8d9� Zd�d:d;�Z d<d=� Z!d�d>d?�Z"d�d@dA�Z#dBdC� Z$d�dEdF�Z%d�dGdH�Z&dIdJ� Z'dKdL� Z(dMdN� Z)dOdP� Z*dQdR� Z+dSdT� Z,dUdV� Z-dWdX� Z.dYdZ� Z/d�d[d\�Z0d�d]d^�Z1d_d`� Z2dadb� Z3dcdd� Z4dedf� Z5dgdh� Z6didj� Z7dkdl� Z8dmdn� Z9dodp� Z:dqdr� Z;dsdt� Z<dudv� Z=dwdx� Z>dydz� Z?d{d|� Z@d}d~� ZAdd�� ZBd�d�� ZCd�d�� ZDd�d�� ZEd�d�� ZFd�d�� ZGd�d�� ZHd�d�� ZId�d�� ZJd�d�d��ZKd�d�� ZLd�d�� ZMd�d�� ZNd�d�� ZOd�d�� ZPd�d�� ZQd�d�� ZRd�d�� ZSd�d�� ZTd�d�� ZUd�d�� ZVd�d�� ZWd�d�� ZXd�d�� ZYd�d�� ZZd�d�� Z[d�d�� Z\d�d�d��Z]d�d�� Z^d�d�d��Z_d�d�� Z`d�d�� Zad�d�� Zbd�d Zcd�dĄ Zdd�dƄ Zed�dȄ Zfd�dʄ Zgd�d̄ Zhd�d΄ Zid�dЄ Zjd�d҄ Zkd�dԄ Zld�dք Zm� ZnS )��ApacheConfiguratora� Apache configurator.
:ivar config: Configuration.
:type config: :class:`~certbot.interfaces.IConfig`
:ivar parser: Handles low level parsing
:type parser: :class:`~certbot_apache.parser`
:ivar tup version: version of Apache
:ivar list vhosts: All vhosts found in the configuration
(:class:`list` of :class:`~certbot_apache.obj.VirtualHost`)
:ivar dict assoc: Mapping between domains and vhosts
zApache Web Server plugin�CERTBOT_DOCS�1z (Please note that the default values of the Apache plugin options change depending on the operating system Certbot is run on.)z/etc/apache2z/etc/apache2/sites-available�*z/var/log/apache2Z
apache2ctlz-vZgracefulZ
configtestNz-le-ssl.confF�certbot_apachezoptions-ssl-apache.conf)�server_root�
vhost_rootZvhost_files� logs_root�ctl�version_cmd�restart_cmd�conftest_cmd�enmod�dismod�le_vhost_ext�handle_modules�handle_sites�challenge_location�MOD_SSL_CONF_SRCc C s | j �|�S )zGet a value from options)�options�get)�self�key� r/ �=/usr/lib/python3/dist-packages/certbot_apache/configurator.py�optionu s zApacheConfigurator.optionc
C s� ddddddddd d
g
}|D ]D}| � |�dd��d
k rP| � |�dd��| j|<