final class DnssecAlgorithmName (View source)

PowerDNS DNSSEC algorithm names, the subset offered for new keys, and version-gating against the server.

Constants

RSAMD5

DH

DSA

ECC

RSASHA1

RSASHA1_NSEC3_SHA1

RSASHA256

RSASHA512

GOST

ECDSA256

ECDSA384

ED25519

ED448

ALGORITHM_NAMES

SUPPORTED_ALGORITHMS

Algorithms the Poweradmin DNSSEC flows accept on creation/import. The obsolete ones in ALGORITHM_NAMES (RSAMD5, DH, DSA, ECC, GOST) are rejected by modern PowerDNS builds and would only frustrate users.

ALGORITHM_BITS

Key sizes each supported algorithm accepts. The curve algorithms have one fixed size; RSA is capped at 2048 because larger keys bloat responses.

private ALGORITHM_MIN_VERSION

Algorithms that only became available from a particular PowerDNS release. Anything not listed here has been supported for as long as the API has existed, so we don't gate it.

Methods

static array
getSupportedAlgorithmsForCapabilities(PdnsCapabilities|null $caps)

Algorithm IDs the connected server is expected to accept. Algorithms with a min PowerDNS version are dropped when the connected server is too old (or its version cannot be confirmed). Pass null for $caps to skip version filtering.

static array
getAlgorithmBitsForCapabilities(PdnsCapabilities|null $caps)

algorithm => accepted key sizes, for the algorithms the connected server offers, so the form's bit list and the server-side check share one source.

static string|null
fromAlgorithmId(int $id)

The PowerDNS name of an algorithm number, for the algorithms offered for new keys only; null for any other number.

static array
getSupportedAlgorithmNamesForCapabilities(PdnsCapabilities|null $caps)

id => display-name map for use in dropdowns. Mirrors getSupportedAlgorithmsForCapabilities() so the dropdown and the controller allowlist never drift.

Details

static array getSupportedAlgorithmsForCapabilities(PdnsCapabilities|null $caps)

Algorithm IDs the connected server is expected to accept. Algorithms with a min PowerDNS version are dropped when the connected server is too old (or its version cannot be confirmed). Pass null for $caps to skip version filtering.

Parameters

PdnsCapabilities|null $caps

Return Value

array

static array getAlgorithmBitsForCapabilities(PdnsCapabilities|null $caps)

algorithm => accepted key sizes, for the algorithms the connected server offers, so the form's bit list and the server-side check share one source.

Parameters

PdnsCapabilities|null $caps

Return Value

array

static string|null fromAlgorithmId(int $id)

The PowerDNS name of an algorithm number, for the algorithms offered for new keys only; null for any other number.

Parameters

int $id

Return Value

string|null

static array getSupportedAlgorithmNamesForCapabilities(PdnsCapabilities|null $caps)

id => display-name map for use in dropdowns. Mirrors getSupportedAlgorithmsForCapabilities() so the dropdown and the controller allowlist never drift.

Parameters

PdnsCapabilities|null $caps

Return Value

array