metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
214 stars 156 forks source link

Remove dnssec keys #104

Closed Leapje closed 6 years ago

Leapje commented 6 years ago

When I use the example to remove the dnssec keys, I get a "Command syntax error" from the SIDN. It might have something todo with the PHP Notices, see the attached log.

Thanks for the help!

log.txt

Leapje commented 6 years ago

Solved it by changing the following:

/Protocols/EPP/eppExtensions/secDNS-1.1/eppResponses/eppDnssecInfoDomainResponse.php

FROM:

Rule 18-23: $secdns = new eppSecdns(); $secdns->setKeytag($keydata->getElementsByTagName('keyTag')->item(0)->nodeValue); $secdns->setAlgorithm($keydata->getElementsByTagName('alg')->item(0)->nodeValue); $secdns->setDigestType($keydata->getElementsByTagName('digestType')->item(0)->nodeValue); $secdns->setDigest($keydata->getElementsByTagName('digest')->item(0)->nodeValue); $keys[] = $secdns;

TO:

$flags = $keydata->getElementsByTagName('flags')->item(0)->nodeValue;
$algorithm = $keydata->getElementsByTagName('alg')->item(0)->nodeValue;
$pubkey = $keydata->getElementsByTagName('pubKey')->item(0)->nodeValue;

$secdns = new eppSecdns(); $secdns->setKey($flags, $algorithm, $pubkey); $keys[] = $secdns;

Solved it for SIDN at least!

metaregistrar commented 6 years ago

I have added this option to a new function: getKeys.

Since some registries use keydata, others use DSdata, you can now either use getKeys() or getKeydata() to retrieve the current keys of a domain name

In your case you would use getKeys();