Struct trust_dns_server::config::KeyConfig
[−]
[src]
pub struct KeyConfig { /* fields omitted */ }
Key pair configuration for DNSSec keys for signing a zone
Methods
impl KeyConfig
[src]
fn new(
key_path: String,
password: Option<String>,
algorithm: Algorithm,
signer_name: String,
is_zone_signing_key: bool,
is_zone_update_auth: bool,
do_auto_generate: bool
) -> Self
key_path: String,
password: Option<String>,
algorithm: Algorithm,
signer_name: String,
is_zone_signing_key: bool,
is_zone_update_auth: bool,
do_auto_generate: bool
) -> Self
Return a new KeyConfig
Arguments
key_path
- file path to the keypassword
- password to use to read the keyalgorithm
- the type of key stored, seeAlgorithm
signer_name
- the name to use when signing records, e.g. ns.example.comis_zone_signing_key
- specify that this key should be used for signing a zoneis_zone_update_auth
- specifies that this key can be used for dynamic updates in the zonedo_auto_generate
- if the key does not exist, generate a new one (it will need to be signed)
fn key_path(&self) -> &Path
path to the key file, either relative to the zone file, or a explicit from the root.
fn format(&self) -> ParseResult<KeyFormat>
Converts key into
fn password(&self) -> Option<&str>
Returns the password used to read the key
fn algorithm(&self) -> ParseResult<Algorithm>
algorithm for for the key, see Algorithm
for supported algorithms.
fn signer_name(&self) -> ParseResult<Option<Name>>
the signer name for the key, this defaults to the $ORIGIN aka zone name.
fn is_zone_signing_key(&self) -> bool
specifies that this key should be used to sign the zone
The public key for this must be trusted by a resolver to work. The key must have a private portion associated with it. It will be registered as a DNSKEY in the zone.
fn is_zone_update_auth(&self) -> bool
this is at least a public_key, and can be used for SIG0 dynamic updates.
it will be registered as a KEY record in the zone.
fn create_if_absent(&self) -> bool
auto generate/create the key if it doesn't already exist (the public portion can be retrieved by a DNS query to the zone for DNSKEY and KEY records).
Trait Implementations
impl Decodable for KeyConfig
[src]
fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<KeyConfig, __D::Error>
Deserialize a value using a Decoder
.
impl PartialEq for KeyConfig
[src]
fn eq(&self, __arg_0: &KeyConfig) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &KeyConfig) -> bool
This method tests for !=
.