Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow password to be passed to TLS context #2719

Merged
merged 4 commits into from Mar 20, 2023
Merged

Allow password to be passed to TLS context #2719

merged 4 commits into from Mar 20, 2023

Conversation

ahopkins
Copy link
Member

Closes #2715

if __name__ == "__main__":
    app_loader = AppLoader(factory=factory)
    app = app_loader.load()
    app.prepare(
        host="localhost",
        port=8443,
        ssl={
            "cert": ".../fullchain.pem",
            "key": ".../privkey.pem",
            "password": "password",      # <<<< This line is newly supported
            "names": ["localhost"],
        },
        dev=True,
    )
    Sanic.serve(primary=app, app_loader=app_loader)

@ahopkins ahopkins requested a review from a team as a code owner March 20, 2023 07:48
@codecov
Copy link

codecov bot commented Mar 20, 2023

Codecov Report

Patch coverage: 100.000% and project coverage change: +0.010 🎉

Comparison is base (5ee36fd) 88.607% compared to head (138752a) 88.617%.

Additional details and impacted files
@@              Coverage Diff              @@
##              main     #2719       +/-   ##
=============================================
+ Coverage   88.607%   88.617%   +0.010%     
=============================================
  Files           87        87               
  Lines         6820      6844       +24     
  Branches      1171      1178        +7     
=============================================
+ Hits          6043      6065       +22     
- Misses         535       537        +2     
  Partials       242       242               
Impacted Files Coverage Δ
sanic/app.py 90.068% <100.000%> (+0.315%) ⬆️
sanic/http/tls/context.py 96.428% <100.000%> (+0.892%) ⬆️
sanic/mixins/startup.py 90.807% <100.000%> (ø)
sanic/response/convenience.py 97.435% <100.000%> (+1.039%) ⬆️

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ahopkins ahopkins merged commit 53820bc into main Mar 20, 2023
32 checks passed
@ahopkins ahopkins deleted the issue2715 branch March 20, 2023 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSL key encryption password not propagated to worker processes
2 participants