From 809608c7ef4801f80adbd0ae07301e39c11e3951 Mon Sep 17 00:00:00 2001 From: mia Date: Sun, 30 Jun 2024 18:29:59 -0700 Subject: initial commit --- misc/certs.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 misc/certs.py (limited to 'misc/certs.py') diff --git a/misc/certs.py b/misc/certs.py new file mode 100644 index 0000000..889ef33 --- /dev/null +++ b/misc/certs.py @@ -0,0 +1,15 @@ +import io +from tarfile import TarFile + +from commia.bearer import get_key, keys +from commia.prelude import * +from commia.ssh import scp +from commia.util import with_written + +buffer = get_key(keys.certificates.certs, decode=False) +tar = TarFile(fileobj=io.BytesIO(buffer)) +for name in tar.getnames(): + with_written( + tar.extractfile(name).read(), + lambda path: scp(path, f"callosum:/etc/tls/{name}"), + ) -- cgit 1.4.1