file_put_contents("cacert-$t1.txt", $t2);
} else if($_GET['action'] == "dns") {
$todelete[$time][] = array("dns", $t1);
- $dnscalls .= "update delete cacert-{$t1}." . ZONENAME . " TXT\n"
- ."update add cacert-{$t1}." . ZONENAME . " 60 TXT {$t2}\n";
+ $dnscalls .= "update delete {$t1}._cacert._auth." . ZONENAME . " TXT\n"
+ ."update add {$t1}._cacert._auth." . ZONENAME . " 60 TXT {$t2}\n";
}
$copy = $todelete;
foreach($copy as $nt => $ar){
if($act[0] == "http"){
unlink("cacert-{$act[1]}.txt");
} else if($act[0] == "dns") {
- $dnscalls .= "update delete cacert-{$act[1]}." . ZONENAME . " TXT\n";
+ $dnscalls .= "update delete {$act[1]}._cacert._auth." . ZONENAME . " TXT\n";
}
}
}
<td>
Please insert the following DNS TXT entry into the SOA-file of your domain:<br/>
<pre>
- cacert-<?=$tokenName?> IN TXT <?=$tokenValue?>
+ <?=$tokenName?>._cacert._auth IN TXT <?=$tokenValue?>
</pre>
</td>
</tr>
for (String NS : nameservers) {
boolean found = false;
try {
- for (String token : DNSUtil.getTXTEntries("cacert-" + tokenParts[0] + "." + domain.getSuffix(), NS)) {
+ for (String token : DNSUtil.getTXTEntries(tokenParts[0] + "._cacert._auth." + domain.getSuffix(), NS)) {
if (token.isEmpty()) {
continue;
}
private String readDNS(String token) throws NamingException {
String test = getTestProps().getProperty("domain.dnstest");
- String targetDomain = "cacert-" + token + "." + test;
+ String targetDomain = token + "._cacert._auth." + test;
String[] data = DNSUtil.getTXTEntries(targetDomain, getTestProps().getProperty("domain.testns"));
assertEquals(1, data.length);
return data[0];
String content1 = IOUtils.readURL(openConnection);
csrf = getCSRF(1, content1);
- Pattern p = Pattern.compile("cacert-([A-Za-z0-9]+) IN TXT ([A-Za-z0-9]+)");
+ Pattern p = Pattern.compile("([A-Za-z0-9]+)._cacert._auth IN TXT ([A-Za-z0-9]+)");
Matcher m = p.matcher(content1);
m.find();
return m;