Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
641c409e
Commit
641c409e
authored
6 years ago
by
Richard van der Hoff
Committed by
Amber Brown
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix ACME config for python 2. (#4717)
Fixes #4675.
parent
70ea2f4e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/4717.bugfix
+1
-0
1 addition, 0 deletions
changelog.d/4717.bugfix
synapse/config/tls.py
+7
-3
7 additions, 3 deletions
synapse/config/tls.py
with
8 additions
and
3 deletions
changelog.d/4717.bugfix
0 → 100644
+
1
−
0
View file @
641c409e
Fix ACME config for python 2.
This diff is collapsed.
Click to expand it.
synapse/config/tls.py
+
7
−
3
View file @
641c409e
...
@@ -19,6 +19,8 @@ import warnings
...
@@ -19,6 +19,8 @@ import warnings
from
datetime
import
datetime
from
datetime
import
datetime
from
hashlib
import
sha256
from
hashlib
import
sha256
import
six
from
unpaddedbase64
import
encode_base64
from
unpaddedbase64
import
encode_base64
from
OpenSSL
import
crypto
from
OpenSSL
import
crypto
...
@@ -36,9 +38,11 @@ class TlsConfig(Config):
...
@@ -36,9 +38,11 @@ class TlsConfig(Config):
acme_config
=
{}
acme_config
=
{}
self
.
acme_enabled
=
acme_config
.
get
(
"
enabled
"
,
False
)
self
.
acme_enabled
=
acme_config
.
get
(
"
enabled
"
,
False
)
self
.
acme_url
=
acme_config
.
get
(
# hyperlink complains on py2 if this is not a Unicode
self
.
acme_url
=
six
.
text_type
(
acme_config
.
get
(
"
url
"
,
u
"
https://acme-v01.api.letsencrypt.org/directory
"
"
url
"
,
u
"
https://acme-v01.api.letsencrypt.org/directory
"
)
)
)
self
.
acme_port
=
acme_config
.
get
(
"
port
"
,
80
)
self
.
acme_port
=
acme_config
.
get
(
"
port
"
,
80
)
self
.
acme_bind_addresses
=
acme_config
.
get
(
"
bind_addresses
"
,
[
'
::
'
,
'
0.0.0.0
'
])
self
.
acme_bind_addresses
=
acme_config
.
get
(
"
bind_addresses
"
,
[
'
::
'
,
'
0.0.0.0
'
])
self
.
acme_reprovision_threshold
=
acme_config
.
get
(
"
reprovision_threshold
"
,
30
)
self
.
acme_reprovision_threshold
=
acme_config
.
get
(
"
reprovision_threshold
"
,
30
)
...
@@ -55,7 +59,7 @@ class TlsConfig(Config):
...
@@ -55,7 +59,7 @@ class TlsConfig(Config):
)
)
if
not
self
.
tls_private_key_file
:
if
not
self
.
tls_private_key_file
:
raise
ConfigError
(
raise
ConfigError
(
"
tls_
certificate
_path must be specified if TLS-enabled listeners are
"
"
tls_
private_key
_path must be specified if TLS-enabled listeners are
"
"
configured.
"
"
configured.
"
)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment