[ldns-users] Update request for ldns-key2ds

Mark Elkins mje at posix.co.za
Thu May 19 15:23:39 UTC 2011


Hi everyone.
I have an update request for the example program "ldns-key2ds". Right
now - it works in a similar fashion to the BIND equivalent - in that it
only reads DNSKEYs from a file off the file system.

I have a need to allow it to read its stdin - allows me to skip creating
temporary files....

I edited the sample and my very simple diff looks like....


# diff ldns-key2ds.c ldns-key2dsmje.c
132,133c132,133
< 
< 	keyfp = fopen(keyname, "r");
---
> 	if(strncmp(keyname,"stdin",5) == 0) keyfp=stdin;
>         else keyfp = fopen(keyname, "r");


ie - if the 'file' to read from is 'stdin' then use 'sdtin' otherwise
open the given file for reading... and the whole wrapper thingie leaves
me weak at the knees. ie - the code change was easy - but if I try and
move the resultant program -it all breaks....

The crux of the matter is I've been unable to work out the algorithm
from the RFC's on how to code the creation of DS records in Python (or
better still in PHP....) so am left with calling an external program
(hint hint)..
that is - given a KSK DNSKEY - how to correctly calculate the
appropriate DS records...

:-)

So currently - my very fragile coding works.... just - so fragile.
-- 
  .  .     ___. .__      Posix Systems - (South) Africa
 /| /|       / /__       mje at posix.co.za  -  Mark J Elkins, Cisco CCIE
/ |/ |ARK \_/ /__ LKINS  Tel: +27 12 807 0590  Cell: +27 82 601 0496
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6696 bytes
Desc: not available
URL: <http://lists.nlnetlabs.nl/pipermail/ldns-users/attachments/20110519/771005d5/attachment.bin>


More information about the ldns-users mailing list