aboutsummaryrefslogtreecommitdiff
path: root/myrpki/children-to-pubclients.py
diff options
context:
space:
mode:
Diffstat (limited to 'myrpki/children-to-pubclients.py')
-rw-r--r--myrpki/children-to-pubclients.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/myrpki/children-to-pubclients.py b/myrpki/children-to-pubclients.py
new file mode 100644
index 00000000..af0475d7
--- /dev/null
+++ b/myrpki/children-to-pubclients.py
@@ -0,0 +1,26 @@
+"""
+Convert children.csv to (initial) pubclients.csv. You may wish to
+play sort/join/etc games with the output of this to avoid overwriting
+other publication clients you've configured.
+
+$Id$
+
+Copyright (C) 2009 Internet Systems Consortium ("ISC")
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+"""
+
+import sys, csv, myrpki
+
+csv.writer(sys.stdout, dialect = myrpki.csv_dialect).writerows(
+ (handle, cert) for handle, expiration, cert in myrpki.csv_open("children.csv"))