subscription: doc comment fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2022-07-20 13:26:33 +02:00
parent 3f694b5481
commit 0cd02a0d2b
3 changed files with 7 additions and 5 deletions

View File

@ -161,7 +161,8 @@ fn test_parse_register_response() -> Result<(), Error> {
Ok(())
}
/// Queries the WHMCS server to register/update the subscription key information, parsing the response into a [SubscriptionInfo].
/// Queries the WHMCS server to register/update the subscription key information, parsing the
/// response into a [SubscriptionInfo].
pub fn check_subscription<C: HttpClient<String>>(
key: String,
server_id: String,

View File

@ -90,7 +90,8 @@ impl SignedResponse {
#[derive(Serialize, Deserialize)]
/// A sign request for offline keys
pub struct SignRequest {
/// Subscription key of `proxmox-offline-mirror` instance issuing this request (must be [crate::SubscriptionStatus::ACTIVE]).
/// Subscription key of `proxmox-offline-mirror` instance issuing this request (must be
/// [crate::SubscriptionStatus::Active]).
pub mirror_key: ServerBlob,
/// Offline keys that should be signed by server.
pub blobs: Vec<ServerBlob>,

View File

@ -128,7 +128,7 @@ impl SubscriptionInfo {
/// - If `recheck` is set to `true`, unsigned instances are only treated as valid for 5 days
/// (this mode is used to decide whether to refresh the subscription information)
///
/// If the criteria are not met, `status` is set to [SubscriptionStatus::INVALID] and `message`
/// If the criteria are not met, `status` is set to [SubscriptionStatus::Invalid] and `message`
/// to a human-readable error message.
pub fn check_age(&mut self, recheck: bool) {
let now = proxmox_time::epoch_i64();
@ -176,7 +176,7 @@ impl SubscriptionInfo {
/// Check that server ID contained in [SubscriptionInfo] matches that of current system.
///
/// `status` is set to [SubscriptionStatus::INVALID] and `message` to a human-readable
/// `status` is set to [SubscriptionStatus::Invalid] and `message` to a human-readable
/// message in case it does not.
pub fn check_server_id(&mut self) {
match (self.serverid.as_ref(), get_hardware_address()) {
@ -201,7 +201,7 @@ impl SubscriptionInfo {
/// Check a [SubscriptionInfo]'s signature, if one is available.
///
/// `status` is set to [SubscriptionStatus::INVALID] and `message` to a human-readable error
/// `status` is set to [SubscriptionStatus::Invalid] and `message` to a human-readable error
/// message in case a signature is available but not valid for the given `key`.
pub fn check_signature(&mut self, key: &openssl::pkey::PKey<openssl::pkey::Public>) {
let verify = |info: &SubscriptionInfo| -> Result<(), Error> {