mirror of
https://github.com/NLnetLabs/krill.git
synced 2026-09-30 21:34:53 +02:00
Use normalised route authorizations in the API. (Closes #126)
This commit is contained in:
@@ -24,12 +24,12 @@ use crate::commons::api::publication;
|
||||
use crate::commons::api::publication::Publish;
|
||||
use crate::commons::api::{
|
||||
Base64, HexEncodedHash, IssuanceRequest, ListReply, ParentHandle, RepositoryContact,
|
||||
RequestResourceLimit, RouteAuthorization,
|
||||
RequestResourceLimit, RoaDefinition,
|
||||
};
|
||||
use crate::commons::eventsourcing::AggregateHistory;
|
||||
use crate::commons::remote::id::IdCert;
|
||||
use crate::commons::util::ext_serde;
|
||||
use crate::daemon::ca::{self, CertAuth, Signer};
|
||||
use crate::daemon::ca::{self, CertAuth, RouteAuthorization, Signer};
|
||||
|
||||
//------------ ResourceClassName -------------------------------------------
|
||||
|
||||
@@ -617,6 +617,12 @@ impl From<&RouteAuthorization> for ObjectName {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&RoaDefinition> for ObjectName {
|
||||
fn from(def: &RoaDefinition) -> Self {
|
||||
ObjectName(format!("{}.roa", hex::encode(def.to_string())))
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<Bytes> for ObjectName {
|
||||
fn into(self) -> Bytes {
|
||||
Bytes::from(self.0)
|
||||
|
||||
Reference in New Issue
Block a user