]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
comments, printfs, formatting
authorMiek Gieben <miekg@NLnetLabs.nl>
Thu, 19 May 2005 13:42:09 +0000 (13:42 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Thu, 19 May 2005 13:42:09 +0000 (13:42 +0000)
dnssec.c
keys.c

index bb35ff75350f3c03b0e26ef84e2c51ffc2d584ca..31830110c3006c489bedb1138f1e1503c0c15f5f 100644 (file)
--- a/dnssec.c
+++ b/dnssec.c
@@ -1004,13 +1004,6 @@ ldns_sign_public(ldns_rr_list *rrset, ldns_key_list *keys)
 
        /* make it canonical */
        
-       printf("Printing rrset\n[");
-       ldns_rr_list_print(stdout, rrset);
-
-       printf("]\n");
-
-       printf("Dus hier komen we niet meer\n");
-       
        for(i = 0; i < ldns_rr_list_rr_count(rrset_clone); i++) {
                ldns_rr2canonical(ldns_rr_list_rr(rrset_clone, i));
        }
@@ -1023,7 +1016,6 @@ ldns_sign_public(ldns_rr_list *rrset, ldns_key_list *keys)
                b64rdf = NULL;
 
                current_key = ldns_key_list_key(keys, key_count);
-
                current_sig = ldns_rr_new_frm_type(LDNS_RR_TYPE_RRSIG);
                
                /* set the type on the new signature */
diff --git a/keys.c b/keys.c
index 010fe1ac9b07c42778063c184fc1fef77a821981..6acca6d79ffd4ad7825a845d08071ae187cd679d 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -524,23 +524,25 @@ ldns_key_rsa2bin(unsigned char *data, RSA *k, uint16_t *size)
                return false;
        }
        
-        if (BN_num_bytes(k->e) <= 2) {
+       /* should this be 256? or so */
+       if (BN_num_bytes(k->e) <= 2) {
                /* normally only this path is executed (small factors are
                 * more common 
                 */
-                data[0] = (unsigned char) BN_num_bytes(k->e);
-                i = BN_bn2bin(k->e, data + 1);  
-                j = BN_bn2bin(k->n, data + i + 1);
+               data[0] = (unsigned char) BN_num_bytes(k->e);
+               i = BN_bn2bin(k->e, data + 1);  
+               j = BN_bn2bin(k->n, data + i + 1);
                *size = (uint16_t) i + j;
-        } else if (BN_num_bytes(k->e) <= 16) {
-                data[0] = 0;
+               /* and this 65536?? */
+       } else if (BN_num_bytes(k->e) <= 16) {
+               data[0] = 0;
                /* XXX this writing is not endian save or is it? LOOK AT
                 * THIS AGAIN  */
                write_uint16(data + 1, (uint16_t) BN_num_bytes(k->e)); 
 
-                BN_bn2bin(k->e, data + 3); 
-                BN_bn2bin(k->n, data + 4 + BN_num_bytes(k->e));
-                *size = (uint16_t) BN_num_bytes(k->n) + 6;
+               BN_bn2bin(k->e, data + 3); 
+               BN_bn2bin(k->n, data + 4 + BN_num_bytes(k->e));
+               *size = (uint16_t) BN_num_bytes(k->n) + 6;
        } else {
                return false;
        }