]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
revert my changes. strptime still has to go though
authorMiek Gieben <miekg@NLnetLabs.nl>
Mon, 12 Dec 2005 10:23:55 +0000 (10:23 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Mon, 12 Dec 2005 10:23:55 +0000 (10:23 +0000)
examples/ldns-signzone.c
examples/ldns-threshold-update.c

index 40ac74672cf3db138cdecddb4891daf01f8384dc..4b4709d63e96d62953780cd6a4631add59816749 100644 (file)
@@ -61,8 +61,6 @@ main(int argc, char *argv[])
        ldns_key_list *key_signing_keys;
 */     
        struct tm tm;
-       char buf1[255];
-       char buf2[255];
        uint32_t inception;
        uint32_t expiration;
 
@@ -75,15 +73,13 @@ main(int argc, char *argv[])
        
        int line_nr = 0;
        char c;
-
+       
        const char *prog = strdup(argv[0]);
        
        inception = 0;
        expiration = 0;
        
        while ((c = getopt(argc, argv, "e:f:i:o:")) != -1) {
-               strftime(buf1, sizeof(buf1), DATE_FORMAT, &tm);
-               strftime(buf2, sizeof(buf2), SHORT_DATE_FORMAT, &tm);
                switch (c) {
                case 'e':
                        /* try to parse YYYYMMDD first,
@@ -91,11 +87,12 @@ main(int argc, char *argv[])
                         * should be a timestamp (seconds since epoch)
                         */
                        memset(&tm, 0, sizeof(tm));
+                       printf("yoyoyo %d\n", strptime(optarg, DATE_FORMAT,  &tm));
 
-                       if (!buf1) {
+                       if (!strptime(optarg, DATE_FORMAT,  &tm)) {
                                c = c;
                                expiration = (uint32_t) mktime_from_utc(&tm);
-                       } else if (!buf2) {
+                       } else if (!strptime(optarg, SHORT_DATE_FORMAT, &tm)) {
                                expiration = (uint32_t) mktime_from_utc(&tm);
                        } else {
                                expiration = atol(optarg);
@@ -108,9 +105,9 @@ main(int argc, char *argv[])
                case 'i':
                        memset(&tm, 0, sizeof(tm));
 
-                       if (!buf1) {
+                       if (!strptime(optarg, DATE_FORMAT, &tm)) {
                                inception = (uint32_t) mktime_from_utc(&tm);
-                       } else if (!buf2) {
+                       } else if (!strptime(optarg, SHORT_DATE_FORMAT, &tm)) {
                                inception = (uint32_t) mktime_from_utc(&tm);
                        } else {
                                inception = atol(optarg);
index 4199712a0bed2a122491912f413048ba7df78151..5267c57e97777137b86e6ef81f48f28254b1cabe 100644 (file)
  * See the file LICENSE for the license
  */
 
+/*
+ * program sequence 
+ *
+ * what some secure entry points for diffs in the key listing
+ * use threshold signing to validate the changes
+ * When I change occurs put the new key set in the file
+ * and mail root or somebody else
+ */
+
+/* synopsis
+ * -i <interval in minutes> -m <email address>
+ */
+
+/* file layout
+ * 
+ */
+
+
+
 #include "config.h"
 #include <ldns/dns.h>