Struct hickory_server::config::dnssec::KeyConfig
source · pub struct KeyConfig {
pub key_path: String,
pub password: Option<String>,
pub algorithm: String,
pub signer_name: Option<String>,
pub is_zone_signing_key: Option<bool>,
pub is_zone_update_auth: Option<bool>,
}Expand description
Key pair configuration for DNSSEC keys for signing a zone
Fields§
§key_path: Stringfile path to the key
password: Option<String>password to use to read the key
algorithm: Stringthe type of key stored, see Algorithm
signer_name: Option<String>the name to use when signing records, e.g. ns.example.com
is_zone_signing_key: Option<bool>specify that this key should be used for signing a zone
is_zone_update_auth: Option<bool>specifies that this key can be used for dynamic updates in the zone
Implementations§
source§impl KeyConfig
impl KeyConfig
sourcepub fn new(
key_path: String,
password: Option<String>,
algorithm: Algorithm,
signer_name: String,
is_zone_signing_key: bool,
is_zone_update_auth: bool
) -> Self
Available on crate feature dnssec only.
pub fn new( key_path: String, password: Option<String>, algorithm: Algorithm, signer_name: String, is_zone_signing_key: bool, is_zone_update_auth: bool ) -> Self
dnssec only.Return a new KeyConfig
Arguments
key_path- file path to the keypassword- password to use to read the keyalgorithm- the type of key stored, seeAlgorithmsigner_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 zone
sourcepub fn key_path(&self) -> &Path
pub fn key_path(&self) -> &Path
path to the key file, either relative to the zone file, or a explicit from the root.
sourcepub fn format(&self) -> ParseResult<KeyFormat>
Available on crate features dns-over-tls or dnssec only.
pub fn format(&self) -> ParseResult<KeyFormat>
dns-over-tls or dnssec only.Converts key into
sourcepub fn algorithm(&self) -> ParseResult<Algorithm>
Available on crate feature dnssec only.
pub fn algorithm(&self) -> ParseResult<Algorithm>
dnssec only.algorithm for for the key, see Algorithm for supported algorithms.
sourcepub fn signer_name(&self) -> ParseResult<Option<Name>>
pub fn signer_name(&self) -> ParseResult<Option<Name>>
the signer name for the key, this defaults to the $ORIGIN aka zone name.
sourcepub fn is_zone_signing_key(&self) -> bool
pub 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.
sourcepub fn is_zone_update_auth(&self) -> bool
pub 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.
Trait Implementations§
source§impl<'de> Deserialize<'de> for KeyConfig
impl<'de> Deserialize<'de> for KeyConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl PartialEq for KeyConfig
impl PartialEq for KeyConfig
impl Eq for KeyConfig
impl StructuralEq for KeyConfig
impl StructuralPartialEq for KeyConfig
Auto Trait Implementations§
impl RefUnwindSafe for KeyConfig
impl Send for KeyConfig
impl Sync for KeyConfig
impl Unpin for KeyConfig
impl UnwindSafe for KeyConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.