<div dir="ltr">On Sat, Feb 21, 2015 at 7:35 AM, Carsten Strotmann <span dir="ltr"><<a href="mailto:cas@strotmann.de" target="_blank">cas@strotmann.de</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I'm trying to build an automated update system for OPENPGPKEY records<br>
with BIND 9 9.9.6-P2 and "nsupate".<br>
<br>
I've verified the TSIG keys, I can add and remove TXT records with the<br>
key under the domain name.<br>
<br>
Adding a 6K PGP key as OPENPGPKEY does fail with<br>
<br>
21-Feb-2015 13:24:19.714 dns_rdata_fromtext: buffer-0x7f04662e14f0:1:<br>
near eof: unexpected end of input<br>
invalid rdata format: unexpected end of input<br>
<br>
Below is the debug output from nsupdate:<br>
<span class=""><font color="#888888"><br></font></span></blockquote><div><br></div><div>I also encountered this limit in nsupdate when I attempted to create my OPENPGPKEY record a while back (I should have sent in a bug report then). Until the bug is fixed, I'd suggest using alternative dynamic update tools. Here's a snippet of python code I used for myself (needs the dnspython module):<br><br>#!/usr/bin/env python<br>#<br><br>import dns.query, dns.tsigkeyring, dns.update<br><br>ZONE = "<a href="http://huque.com">huque.com</a>."<br>SERVER = '127.0.0.1'<br>TSIGNAME = "local-ddns."<br>TSIGALG = "hmac-sha256."<br>TSIGKEY = "XXXXXXXXXXX redacted-key XXXXXXXXXXXXXXXXXXX"<br><br>QNAME = "4f7c2705c0f139ede60573f8537a0790fb64df5d4a819af951d259bc._<a href="http://openpgpkey.huque.com">openpgpkey.huque.com</a>."<br>GEN_RDATA = "\# 2229 99010d04................"<br><br>keyring = dns.tsigkeyring.from_text({TSIGNAME : TSIGKEY})<br>update = dns.update.Update(ZONE, keyring=keyring,<br>                           keyalgorithm=dns.name.from_text(TSIGALG))<br>update.add(QNAME, 3600, 61, GEN_RDATA)<br>response = dns.query.tcp(update, SERVER)<br>print response.rcode()   # should be zero<br><br></div><div>Shumon Huque<br><br></div></div><br></div></div>