summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNguyễn Gia Phong <cnx@loang.net>2025-05-26 23:17:58 +0900
committerNguyễn Gia Phong <cnx@loang.net>2025-05-26 23:17:58 +0900
commit053b6da35753267456a167bfa84b955781b7d986 (patch)
tree0551099003a43918ae523c907b89f05137f76f4c /src
parent56a032568443bdf85dd37df5f6716b3475626d6a (diff)
downloadscadere-053b6da35753267456a167bfa84b955781b7d986.tar.gz
Stop treating empty CA name specially
Diffstat (limited to 'src')
-rw-r--r--src/scadere/check.py2
-rw-r--r--src/scadere/listen.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/scadere/check.py b/src/scadere/check.py
index a042b9a..a0ca24e 100644
--- a/src/scadere/check.py
+++ b/src/scadere/check.py
@@ -52,5 +52,5 @@ def check(netlocs, after, output):
                 print(not_before.isoformat(), not_after.isoformat(),
                       # As unique identifier
                       hostname, port, cert['serialNumber'],
-                      base64(ca.encode()).decode() or '\0',
+                      base64(ca.encode()).decode(),
                       file=output)
diff --git a/src/scadere/listen.py b/src/scadere/listen.py
index 0777f4a..c9801a5 100644
--- a/src/scadere/listen.py
+++ b/src/scadere/listen.py
@@ -82,7 +82,7 @@ def xml(tree, parent=None):
 
 async def handle(certs, base_url, reader, writer):
     """Handle HTTP request."""
-    summaries = tuple(cert.rstrip().split(maxsplit=5)
+    summaries = tuple(cert.rstrip('\r\n').split(' ', maxsplit=5)
                       for cert in certs.read_text().splitlines())
     lookup = {urlsplit(urljoin(base_url,
                                path(hostname, port, issuer, serial))).path: