[ldns-users] Update request for ldns-key2ds
ondrej at sury.org
Thu May 19 17:09:18 UTC 2011
the convention is to use '-' (without quotes) as a identifier for stdin/stdout.
Also please use unified diff (diff -urNap is a good default set of diff options).
Ottherwise I think your patch looks sane.
On 19.5.2011, at 17:23, Mark Elkins <mje at posix.co.za> wrote:
> 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
> < 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
> ldns-users mailing list
> ldns-users at open.nlnetlabs.nl
More information about the ldns-users