Revert generate removing
This commit is contained in:
@@ -30,6 +30,10 @@ ConfigDictTemplate = [
|
|||||||
{
|
{
|
||||||
"name": "certificate",
|
"name": "certificate",
|
||||||
"values": [
|
"values": [
|
||||||
|
{
|
||||||
|
"option": "generate",
|
||||||
|
"default": "true",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"option": "type",
|
"option": "type",
|
||||||
"default": "self-signed",
|
"default": "self-signed",
|
||||||
|
|||||||
@@ -148,6 +148,10 @@ class LetsEncryptCertificate(CertificateBackend):
|
|||||||
def get_backend(config):
|
def get_backend(config):
|
||||||
"""Return the appropriate backend."""
|
"""Return the appropriate backend."""
|
||||||
cert_type = config.get("certificate", "type")
|
cert_type = config.get("certificate", "type")
|
||||||
|
condition = (not config.getboolean("certificate", "generate") and
|
||||||
|
cert_type != "manual")
|
||||||
|
if condition:
|
||||||
|
return None
|
||||||
if cert_type == "letsencrypt":
|
if cert_type == "letsencrypt":
|
||||||
return LetsEncryptCertificate(config)
|
return LetsEncryptCertificate(config)
|
||||||
if cert_type == "manual":
|
if cert_type == "manual":
|
||||||
|
|||||||
Reference in New Issue
Block a user