[ldns-users] Update request for ldns-key2ds
Ondřej Surý
ondrej at sury.org
Thu May 19 17:09:18 UTC 2011
Hi Mark,
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.
Ondřej Surý
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
> 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
> _______________________________________________
> ldns-users mailing list
> ldns-users at open.nlnetlabs.nl
> http://open.nlnetlabs.nl/mailman/listinfo/ldns-users
More information about the ldns-users
mailing list