Spade
Mini Shell
| Directory:~$ /proc/self/root/usr/lib/python2.7/site-packages/certbot/_internal/plugins/ |
| [Home] [System Details] [Kill Me] |
�
���_c@s>dZddlmZddlZddlZddlZddlmZddlm Z ddl
mZddlm
Zeje�ZejjZdd �Zd
d�Zdd
�Zd�Zd�Zd�Zdddddddddddddddd
d!gZd"�Zd#�Zd$�Zd%�Zd&�Z dS('s=Decide which
plugins to use for authentication &
installationi����(tprint_functionN(terrors(t
interfaces(tos(tutils<How would you like to authenticate and install
certificates?cCs"t||||tjtjf�S(sPick configurator
plugin.(tpick_pluginRtIAuthenticatort
IInstaller(tconfigtdefaulttpluginstquestion((sG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pytpick_configuratorss+How
would you like to install certificates?cCst||||tjf�S(sPick
installer plugin.(RRR(RR R
R((sG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pytpick_installerss4How
would you like to authenticate with the ACME
CA?cCst||||tjf�S(sPick authentication
plugin.(RRR(RR R
R((sG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pytpick_authenticator"scs�t|�\}��sdS|j�fd��}|j|�|jtjf�}t|�dkr~tj d���n|r�t
|j��d}tj
d|�|j|�Stj d���dS(s9
Get an unprepared interfaces.IInstaller object.
:param certbot.interfaces.IConfig config: Configuration
:param certbot._internal.plugins.disco.PluginsRegistry plugins:
All plugins registered as entry points.
:returns: Unprepared installer plugin or None
:rtype: IPlugin or None
cs
|j��S(N(t
check_name(tp_ep(treq_inst(sG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pyt<lambda>9sisfFound
multiple installers with the name %s, Certbot is unable to determine which
one to use. Skipping.isSelecting plugin: %ss:Could not select or
initialize the requested installer
%s.N(tcli_plugin_requeststNonetfiltertinittverifyRRtlenRtPluginSelectionErrortlisttvaluestloggertdebug(RR
t_t
installerstinst((RsG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pytget_unprepared_installer*s
c sG�dk r'|j�fd��}n0|jrBtjd��n|j�j|�}|j|�|j|�}|j �|j
�}t|�dkr�tj
d|�tttj|��|�}|dkr�dS|j�St|�dkr2t|j��d}tj
d|�|jr(dS|j�Stj
d�dSdS( s�Pick
plugin.
:param certbot.interfaces.IConfig: Configuration
:param str default: Plugin name supplied by user or ``None``.
:param certbot._internal.plugins.disco.PluginsRegistry plugins:
All plugins registered as entry points.
:param str question: Question to be presented to the user in case
multiple candidates are found.
:param list ifaces: Interfaces that plugins must provide.
:returns: Initialized plugin.
:rtype: IPlugin
cs
|j��S(N(R(R(R (sG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pyRYssMissing
command line flags. For non-interactive execution, you will need to specify
a plugin on the command line. Run with '--help plugins' to see a
list of options, and see https://eff.org/letsencrypt-plugins for more
detail on what the plugins do and how to use them.isMultiple candidate
plugins: %sisSingle candidate plugin: %ssNo candidate
pluginN(RRtnoninteractive_modeRtMissingCommandlineFlagtvisibletifacesRRtpreparet availableRRRt
choose_pluginRtsixt
itervaluesRt
misconfigured( RR R
RR%tfilteredtverifiedtpreparedt plugin_ep((R sG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pyRHs0
cCsXg|D]"}|j|jr"dnd^q}td�|D��}xtrSttj�}dtjkr�|ddhkr�gt |�D]!\}}|j
dkr�|^q�d}|j||d|�\} }
n|j||d t�\} }
| tj
krL||
}|jrEttj�jd
j|j��dt�qP|SqHdSqHWdS(
s�Allow the user to choose
their plugin.
:param list prepared: List of `~.PluginEntryPoint`.
:param str question: Question to be presented to the user.
:returns: Plugin entry point chosen by the user.
:rtype: `~.PluginEntryPoint`
s
[Misconfigured]tcss|]}|jVqdS(N(tname(t.0R/((sG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pys <genexpr>�stCERTBOT_AUTOtapachetnginxiR tforce_interactivesxThe
selected plugin encountered an error while parsing your server
configuration and cannot be used. The error was:
{0}tpauseN(tdescription_with_nameR+tsettTruetz_utilRtIDisplayRtenviront enumerateR1tmenutdisplay_utiltOKtnotificationtformatR&tFalseR(R.RR/toptstnamestdisptntpt
apache_idxtcodetindex((sG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pyR(~s"
, !8!
twebroottmanualt
standalonesdns-cloudflaresdns-cloudxnssdns-digitaloceansdns-dnsimplesdns-dnsmadeeasys
dns-gehirns
dns-googles
dns-linodes
dns-luadnss dns-nsonesdns-ovhsdns-rfc2136sdns-route53sdns-sakuracloudcCs_|r|j|�jnd|_|r9|j|�jnd|_tjd|j|j�dS(sFUpdate
the config entries to reflect the plugins we actually selected.s0Plugins
selected: Authenticator %s, Installer
%sN(t find_initR1Rt
authenticatort installerRtinfo(RR
tauthR
((sG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pytrecord_chosen_plugins�s!! c
Cs�t|�\}}d
}|dkr-d}n|dkr�t}}ddlm}|tkr�|r�dj|tj|�} t j
| ��q�n
t}}|dkr�t}n1|dkr�t}|jr�t
jd |�q�nd
}
}|dkr||krt|||�}
}n?|s*|rBt||||�}n|r]t|||�}
nt
jd
|
|�|r�|r�td||�n|r�|
r�td||�nt|||
|�||
fS(s;
Figure out which configurator we're going to use, modifies
config.authenticator and config.installer strings to reflect that
choice if
necessary.
:raises errors.PluginSelectionError if there was a problem
:returns: (an `IAuthenticator` or None, an `IInstaller` or None)
:rtype: tuple
tenhancesMWhich installer would you like to use to configure the
selected enhancements?truni����(tcli_commands�With the {0}
plugin, you probably want to use the "certonly" command,
eg:{1}{1} {2} certonly --{0}{1}{1}(Alternatively, add a --installer
flag. See https://eff.org/letsencrypt-plugins{1} and "--help
plugins" for more information.)tcertonlytinstallsRSpecifying an
authenticator doesn't make sense when running Certbot with verb
"%s"s*Selected authenticator %s and installer
%sRRRQN(RZRV(RRR:tcertbot._internal.cliRXtnoninstaller_pluginsRCRtlinesepRR#RDRQRtwarningRR
RRtdiagnose_configurator_problemRU(RR
tverbtreq_authRtinstaller_questiont need_instt need_authRXtmsgRQRR((sG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pytchoose_configurator_plugins�sB
cCsS|s
|S|rO||krOd}tj|jt|�t|����qOn|S(s�
Setting configurators multiple ways is okay, as long as they all agree
:param str previously: previously identified request for the
installer/authenticator
:param str requested: the request currently being processed
sIToo many flags setting configurators/installers/authenticators {0}
-> {1}(RRRCtrepr(t
previouslytnowRe((sG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pytset_configurator�s-cCsm|j}}t||j�}t||j�}|jr[t|d�}t|d�}n|jr�t|d�}t|d�}n|jr�t|d�}n|jr�t|d�}n|jr�t|d�}n|j r�t|d�}n|j
rt|d�}n|jr't|d�}n|jrBt|d �}n|j
r]t|d
�}n|jrxt|d�}n|jr�t|d�}n|jr�t|d
�}n|jr�t|d�}n|jr�t|d�}n|jr�t|d�}n|jrt|d�}n|jr5t|d�}n|jrPt|d�}ntjd||�||fS(s�
Figure out which plugins the user requested with CLI and config options
:returns: (requested authenticator string or None, requested installer
string or None)
:rtype: tuple
R5R4RORMRNsdns-cloudflaresdns-cloudxnssdns-digitaloceansdns-dnsimplesdns-dnsmadeeasys
dns-gehirns
dns-googles
dns-linodes
dns-luadnss dns-nsonesdns-ovhsdns-rfc2136sdns-route53sdns-sakuraclouds+Requested
authenticator %s and installer
%s(tconfiguratorRjRRRQR5R4RORMRNtdns_cloudflaretdns_cloudxnstdns_digitaloceantdns_dnsimpletdns_dnsmadeeasyt
dns_gehirnt
dns_googlet
dns_linodet
dns_luadnst dns_nsonetdns_ovhtdns_rfc2136tdns_route53tdns_sakuracloudRR(RRRa((sG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pyRsZ
cCs�|r@||kr$dj|�}q}dj|||j�}n=|dkrnddlm}dj|�}ndj|�}tj|��dS( s>
Raise the most helpful error message about a plugin being unavailable
:param str cfg_type: either "installer" or
"authenticator"
:param str requested: the plugin that was requested
:param .PluginsRegistry plugins: available plugins
:raises error.PluginSelectionError: if there was a problem
s8The requested {0} plugin does not appear to be installedskThe {0}
plugin is not working; there may be problems with your existing
configuration.
The error was: {1!r}RRi����(RXs�Certbot doesn't know how to
automatically configure the web server on this system. However, it can
still get a certificate for you. Please run "{0} certonly" to do
so. You'll need to manually configure your web server to use the
resulting certificate.s/{0} could not be determined or is not
installedN(RCtproblemR[RXRR(tcfg_typet requestedR
ReRX((sG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pyR_8s(!t__doc__t
__future__RtloggingR)tzope.componenttzopetcertbotRRtcertbot.compatRtcertbot.displayRR@t getLoggert__name__Rt componentt
getUtilityR;RR
RR!RR(R\RURfRjRR_(((sG/usr/lib/python2.7/site-packages/certbot/_internal/plugins/selection.pyt<module>s2 6 ' ? 7