This is an automated email from the ASF dual-hosted git repository.
gstein pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/steve.git
The following commit(s) were added to refs/heads/trunk by this push:
new 94e1dea adjust cert files and example
94e1dea is described below
commit 94e1deadcc55a05150c510a1da652798d6e72eff
Author: Greg Stein <[email protected]>
AuthorDate: Mon Sep 29 20:58:32 2025 -0500
adjust cert files and example
---
v3/server/config.yaml.example | 9 ++++++---
v3/server/main.py | 5 +++--
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/v3/server/config.yaml.example b/v3/server/config.yaml.example
index f0df41b..5d3c952 100644
--- a/v3/server/config.yaml.example
+++ b/v3/server/config.yaml.example
@@ -23,9 +23,12 @@ server:
port: 58383
# Specify the .pem files to serve using TLS, or leave these two
- # fields blank for plain HTTP.
- certfile: server.crt
- keyfile: server.key
+ # fields blank for plain HTTP. These files are relative to the
+ # "certs" subdirectory of main.py (the app), or they can be absolute
+ # paths to their installed location.
+ certfile: localhost.apache.org+3.pem
+ keyfile: localhost.apache.org+3-key.pem
+
# Path to the database, absolute or relative to APP.
db: steve.db
diff --git a/v3/server/main.py b/v3/server/main.py
index 5c2369c..4a326f9 100755
--- a/v3/server/main.py
+++ b/v3/server/main.py
@@ -25,6 +25,7 @@ _LOGGER = logging.getLogger(__name__)
DATE_FORMAT = '%m/%d %H:%M'
THIS_DIR = pathlib.Path(__file__).resolve().parent
+CERTS_DIR = THIS_DIR / 'certs'
def main():
@@ -54,8 +55,8 @@ def main():
kwargs = { }
if app.cfg.server.certfile:
- kwargs['certfile'] = THIS_DIR / app.cfg.server.certfile
- kwargs['keyfile'] = THIS_DIR / app.cfg.server.keyfile
+ kwargs['certfile'] = CERTS_DIR / app.cfg.server.certfile
+ kwargs['keyfile'] = CERTS_DIR / app.cfg.server.keyfile
# Spool up the app!
app.runx(port=app.cfg.server.port, **kwargs)