mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-02 20:46:39 +00:00
subscription: doc comment fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
3f694b5481
commit
0cd02a0d2b
@ -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,
|
||||
|
@ -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>,
|
||||
|
@ -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> {
|
||||
|
Loading…
Reference in New Issue
Block a user