]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
bugfix #450: Base # bytes for P and G (T) on the guaranteed to be bigger P in ldns_ke...
authorWillem Toorop <willem@NLnetLabs.nl>
Fri, 25 May 2012 09:59:27 +0000 (09:59 +0000)
committerWillem Toorop <willem@NLnetLabs.nl>
Fri, 25 May 2012 09:59:27 +0000 (09:59 +0000)
Thanks Peter Koch and Patrick Fedick.

Changelog
keys.c

index 9de8230af15fb31005dde09fa6a4c225b2614804..f0a91e9b8e45c7b087c4727a5fa2bc828cb030e5 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,7 @@
 1.6.14
+       * bugfix #450: Base # bytes for P and G (T) on the guaranteed
+         to be bigger P in ldns_key_dsa2bin.
+         Thanks Peter Koch and Patrick Fedick.
        * bugfix #449: Deep free cloned rdf's in ldns_tsig_mac_new.
          Thanks Michael Sheldon.
        * bugfix #448: Copy nameserver value (in stead of reference) of the
diff --git a/keys.c b/keys.c
index 54f26681494f142bec5a54d4eb0c503805f5eea6..38c38a31612149c9636f601d2ed9b8f8738e2382 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -1302,7 +1302,7 @@ ldns_key_dsa2bin(unsigned char *data, DSA *k, uint16_t *size)
        }
        
        /* See RFC2536 */
-       *size = (uint16_t)BN_num_bytes(k->g);
+       *size = (uint16_t)BN_num_bytes(k->p);
        T = (*size - 64) / 8;
        memcpy(data, &T, 1);