add pbs-api-types subcrate, move key_derivation
move key_derivation to pbs-datastore pbs-api-types should only contain "basic" types which * are usually required by clients * don't depend on pbs-related code directly Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
14
pbs-api-types/src/lib.rs
Normal file
14
pbs-api-types/src/lib.rs
Normal file
@ -0,0 +1,14 @@
|
||||
use proxmox::api::schema::{ApiStringFormat, Schema, StringSchema};
|
||||
use proxmox::const_regex;
|
||||
|
||||
const_regex! {
|
||||
pub FINGERPRINT_SHA256_REGEX = r"^(?:[0-9a-fA-F][0-9a-fA-F])(?::[0-9a-fA-F][0-9a-fA-F]){31}$";
|
||||
}
|
||||
|
||||
pub const FINGERPRINT_SHA256_FORMAT: ApiStringFormat =
|
||||
ApiStringFormat::Pattern(&FINGERPRINT_SHA256_REGEX);
|
||||
|
||||
pub const CERT_FINGERPRINT_SHA256_SCHEMA: Schema =
|
||||
StringSchema::new("X509 certificate fingerprint (sha256).")
|
||||
.format(&FINGERPRINT_SHA256_FORMAT)
|
||||
.schema();
|
Reference in New Issue
Block a user