[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r4058 - in trunk/OpenDNSSEC/signer/src: parser signer

Matthijs Mekking matthijs at nlnetlabs.nl
Tue Oct 5 17:07:40 CEST 2010


Author: matthijs
Date: 2010-10-05 17:07:39 +0200 (Tue, 05 Oct 2010)
New Revision: 4058

Modified:
   trunk/OpenDNSSEC/signer/src/parser/signconfparser.c
   trunk/OpenDNSSEC/signer/src/signer/se_key.c
   trunk/OpenDNSSEC/signer/src/signer/se_key.h
Log:
algorithm is uint8_t



Modified: trunk/OpenDNSSEC/signer/src/parser/signconfparser.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/parser/signconfparser.c	2010-10-05 15:07:11 UTC (rev 4057)
+++ trunk/OpenDNSSEC/signer/src/parser/signconfparser.c	2010-10-05 15:07:39 UTC (rev 4058)
@@ -115,7 +115,7 @@
                 curNode = curNode->next;
             }
             if (locator && algorithm && flags) {
-                new_key = key_create(locator, (uint32_t) atoi(algorithm),
+                new_key = key_create(locator, (uint8_t) atoi(algorithm),
                     (uint32_t) atoi(flags), publish, ksk, zsk);
                 if (keylist_add(kl, new_key) != 0) {
                     se_log_error("failed to add key %s to key list", locator);

Modified: trunk/OpenDNSSEC/signer/src/signer/se_key.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/se_key.c	2010-10-05 15:07:11 UTC (rev 4057)
+++ trunk/OpenDNSSEC/signer/src/signer/se_key.c	2010-10-05 15:07:39 UTC (rev 4058)
@@ -43,7 +43,7 @@
  *
  */
 key_type*
-key_create(const char* locator, uint32_t algorithm, uint32_t flags,
+key_create(const char* locator, uint8_t algorithm, uint32_t flags,
     int publish, int ksk, int zsk)
 {
     key_type* key = (key_type*) se_malloc(sizeof(key_type));
@@ -75,7 +75,7 @@
 {
     key_type* key = NULL;
     const char* locator = NULL;
-    uint32_t algorithm = 0;
+    uint8_t algorithm = 0;
     uint32_t flags = 0;
     int publish = 0;
     int ksk = 0;
@@ -85,7 +85,7 @@
     se_log_assert(fd);
 
     if (!backup_read_str(fd, &locator) ||
-        !backup_read_uint32_t(fd, &algorithm) ||
+        !backup_read_uint8_t(fd, &algorithm) ||
         !backup_read_uint32_t(fd, &flags) ||
         !backup_read_int(fd, &publish) ||
         !backup_read_int(fd, &ksk) ||

Modified: trunk/OpenDNSSEC/signer/src/signer/se_key.h
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/se_key.h	2010-10-05 15:07:11 UTC (rev 4057)
+++ trunk/OpenDNSSEC/signer/src/signer/se_key.h	2010-10-05 15:07:39 UTC (rev 4058)
@@ -54,7 +54,7 @@
     ldns_rr* dnskey;
     hsm_key_t* hsmkey;
     hsm_sign_params_t* params;
-    uint32_t algorithm;
+    uint8_t algorithm;
     uint32_t flags;
     int publish;
     int ksk;
@@ -83,7 +83,7 @@
  * \return key_type* key
  *
  */
-key_type* key_create(const char* locator, uint32_t algorithm, uint32_t flags,
+key_type* key_create(const char* locator, uint8_t algorithm, uint32_t flags,
     int publish, int ksk, int zsk);
 
 /**




More information about the Opendnssec-commits mailing list