Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for key-data interface creating delegation signer record #29

Merged
merged 5 commits into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This project uses [Semantic Versioning 2.0.0](http://semver.org/).

## main
- CHANGED: Add support for DNSSEC key-data interface (dnsimple/dnsimple-php#29).

## 0.3.1

Expand Down
5 changes: 5 additions & 0 deletions src/Dnsimple/Struct/DelegationSignerRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ class DelegationSignerRecord
* @var int The keytag for the associated DNSKEY
*/
public $keytag;
/**
* @var string The public key that references the corresponding DNSKEY record
*/
public $publicKey;
/**
* @var string When the delegation signing record was created in DNSimple
*/
Expand All @@ -51,6 +55,7 @@ public function __construct($data)
$this->digest = $data->digest;
$this->digestType = $data->digest_type;
$this->keytag = $data->keytag;
$this->publicKey = $data->public_key;
$this->createdAt = $data->created_at;
$this->updatedAt = $data->updated_at;
}
Expand Down
5 changes: 5 additions & 0 deletions src/Dnsimple/Struct/Tld.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ class Tld
* @var bool True if DNSimple supports inbound transfers for this TLD
*/
public $transferEnabled;
/**
* @var string Type of data interface required for DNSSEC for this TLD
*/
public $dnssecInterfaceType;

public function __construct($data)
{
Expand All @@ -57,5 +61,6 @@ public function __construct($data)
$this->registrationEnabled = $data->registration_enabled;
$this->renewalEnabled = $data->renewal_enabled;
$this->transferEnabled = $data->transfer_enabled;
$this->dnssecInterfaceType = $data->dnssec_interface_type;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public function testGetDomainDelegationSignerRecord()
self::assertEquals("C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F", $record->digest);
self::assertEquals(2, $record->digestType);
self::assertEquals(44620, $record->keytag);
self::assertEquals(null, $record->publicKey);
self::assertEquals("2017-03-03T13:49:58Z", $record->createdAt);
self::assertEquals("2017-03-03T13:49:58Z", $record->updatedAt);
}
Expand Down
1 change: 1 addition & 0 deletions tests/Dnsimple/Service/TldsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function testGetTld()
self::assertTrue($tld->registrationEnabled);
self::assertTrue($tld->renewalEnabled);
self::assertTrue($tld->transferEnabled);
self::assertEquals("ds", $tld->dnssecInterfaceType);
}

public function testGetTldExtendedAttributes()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000

{"data":{"id":2,"domain_id":1010,"algorithm":"13","digest":"684a1f049d7d082b7f98691657da5a65764913df7f065f6f8c36edf62d66ca03","digest_type":"2","keytag":"2371","created_at":"2017-03-03T15:24:00Z","updated_at":"2017-03-03T15:24:00Z"}}
{"data":{"id":2,"domain_id":1010,"algorithm":"13","digest":"684a1f049d7d082b7f98691657da5a65764913df7f065f6f8c36edf62d66ca03","digest_type":"2","keytag":"2371","public_key":null,"created_at":"2017-03-03T15:24:00Z","updated_at":"2017-03-03T15:24:00Z"}}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000

{"data":{"id":24,"domain_id":1010,"algorithm":"8","digest":"C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F","digest_type":"2","keytag":"44620","created_at":"2017-03-03T13:49:58Z","updated_at":"2017-03-03T13:49:58Z"}}
{"data":{"id":24,"domain_id":1010,"algorithm":"8","digest":"C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F","digest_type":"2","keytag":"44620","public_key":null,"created_at":"2017-03-03T13:49:58Z","updated_at":"2017-03-03T13:49:58Z"}}
2 changes: 1 addition & 1 deletion tests/fixtures/v2/api/getTld/success.http
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000

{"data":{"tld":"com","tld_type":1,"whois_privacy":true,"auto_renew_only":false,"idn":true,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":true}}
{"data":{"tld":"com","tld_type":1,"whois_privacy":true,"auto_renew_only":false,"idn":true,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":true,"dnssec_interface_type":"ds"}}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000

{"data":[{"id":24,"domain_id":1010,"algorithm":"8","digest":"C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F","digest_type":"2","keytag":"44620","created_at":"2017-03-03T13:49:58Z","updated_at":"2017-03-03T13:49:58Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":1,"total_pages":1}}
{"data":[{"id":24,"domain_id":1010,"algorithm":"8","digest":"C1F6E04A5A61FBF65BF9DC8294C363CF11C89E802D926BDAB79C55D27BEFA94F","digest_type":"2","keytag":"44620","public_key":null,"created_at":"2017-03-03T13:49:58Z","updated_at":"2017-03-03T13:49:58Z"}],"pagination":{"current_page":1,"per_page":30,"total_entries":1,"total_pages":1}}
2 changes: 1 addition & 1 deletion tests/fixtures/v2/api/listTlds/success.http
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000

{"data":[{"tld":"ac","tld_type":2,"whois_privacy":false,"auto_renew_only":true,"idn":false,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":false},{"tld":"academy","tld_type":3,"whois_privacy":true,"auto_renew_only":false,"idn":true,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":true}],"pagination":{"current_page":1,"per_page":2,"total_entries":195,"total_pages":98}}
{"data":[{"tld":"ac","tld_type":2,"whois_privacy":false,"auto_renew_only":true,"idn":false,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":false,"dnssec_interface_type":"ds"},{"tld":"academy","tld_type":3,"whois_privacy":true,"auto_renew_only":false,"idn":true,"minimum_registration":1,"registration_enabled":true,"renewal_enabled":true,"transfer_enabled":true,"dnssec_interface_type":"key"}],"pagination":{"current_page":1,"per_page":2,"total_entries":195,"total_pages":98}}