]> git.proxmox.com Git - proxmox.git/commitdiff
subscription: doc comment fixup
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 20 Jul 2022 11:26:33 +0000 (13:26 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 20 Jul 2022 11:28:31 +0000 (13:28 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
proxmox-subscription/src/check.rs
proxmox-subscription/src/sign.rs
proxmox-subscription/src/subscription_info.rs

index 8ff9e1a864bc51876d75513c684825abf15c3ab0..7ca446678f0f6ca2a8273eae1b2cc8d6f2117379 100644 (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,
index ff661993842c565c39c29e43c677cfaa0b64128f..923cd41e1ae2698dd0d1cdad44dd4a82a36eef07 100644 (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>,
index 1b2a301f31c757fbd3a5191e4925ba02a0475273..d7db904b816ba91d3c17f0c26fccb11003000516 100644 (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> {