diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/certs.py | 15 |
1 files changed, 15 insertions, 0 deletions
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}"), + ) |