diff options
author | mia <mia@mia.jetzt> | 2024-06-30 18:29:59 -0700 |
---|---|---|
committer | mia <mia@mia.jetzt> | 2024-06-30 18:29:59 -0700 |
commit | 809608c7ef4801f80adbd0ae07301e39c11e3951 (patch) | |
tree | bccd7c0607bd7edc3a2380fa230996c688357475 /misc | |
download | callosum-809608c7ef4801f80adbd0ae07301e39c11e3951.tar.gz callosum-809608c7ef4801f80adbd0ae07301e39c11e3951.zip |
initial commit
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}"), + ) |