Documentation ¶
Index ¶
- Constants
- type CreateNewEncryptionSubkey
- type KeyAction
- type KeyWarning
- type ModifyPrimaryKeyExpiry
- type ModifySubkeyExpiry
- type RefreshSubkeyBindingSignature
- type RefreshUserIdSelfSignatures
- type SetPreferredCompressionAlgorithms
- type SetPreferredHashAlgorithms
- type SetPreferredSymmetricAlgorithms
- type WarningType
Constants ¶
const ( // If you add a type, remember to handle it in all the switch statements. UnsetType WarningType = 0 PrimaryKeyDueForRotation = 1 PrimaryKeyOverdueForRotation = 2 PrimaryKeyExpired = 3 PrimaryKeyNoExpiry = 4 NoValidEncryptionSubkey = 6 SubkeyDueForRotation = 7 SubkeyOverdueForRotation = 8 SubkeyNoExpiry = 9 MissingPreferredSymmetricAlgorithms = 11 WeakPreferredSymmetricAlgorithms = 12 UnsupportedPreferredSymmetricAlgorithm = 13 MissingPreferredHashAlgorithms = 14 WeakPreferredHashAlgorithms = 15 UnsupportedPreferredHashAlgorithm = 16 MissingPreferredCompressionAlgorithms = 17 UnsupportedPreferredCompressionAlgorithm = 18 MissingUncompressedPreference = 19 // Implementations MUST implement uncompressed data. WeakSelfSignatureHash = 20 WeakSubkeyBindingSignatureHash = 21 ConfigMaintainAutomaticallyNotSet = 22 ConfigPublishToAPINotSet = 23 ConfigMaintainAutomaticallyButDontPublish = 24 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateNewEncryptionSubkey ¶
CreateNewEncryptionSubkey creates a new subkey with the given ValidUntil expiry time and a subkey binding signature.
func (CreateNewEncryptionSubkey) SortOrder ¶
func (a CreateNewEncryptionSubkey) SortOrder() int
func (CreateNewEncryptionSubkey) String ¶
func (a CreateNewEncryptionSubkey) String() string
type KeyAction ¶
type KeyAction interface { String() string Enact(*pgpkey.PgpKey, time.Time, *string) error SortOrder() int }
func MakeActionsFromWarnings ¶
func MakeActionsFromWarnings(warnings []KeyWarning, now time.Time) []KeyAction
MakeActionsFromWarnings returns a list of actions that can be performed on the key to fix the warning. Call `KeyAction.Enact(key)` to actually carry out the action.
type KeyWarning ¶
type KeyWarning struct { Type WarningType SubkeyId uint64 DaysUntilExpiry uint DaysSinceExpiry uint CurrentValidUntil *time.Time Detail string }
func GetKeyWarnings ¶
func GetKeyWarnings(key pgpkey.PgpKey, config *config.Config) []KeyWarning
GetKeyWarnings returns a slice of KeyWarnings indicating problems found with the given PgpKey.
func (KeyWarning) String ¶
func (w KeyWarning) String() string
type ModifyPrimaryKeyExpiry ¶
type ModifyPrimaryKeyExpiry struct { KeyAction ValidUntil time.Time PreviouslyValidUntil *time.Time }
ModifyPrimaryKeyExpiry iterates over all user IDs. For each UID, it updates the expiry date on the *self signature*. It re-signs the self signature.
func (ModifyPrimaryKeyExpiry) SortOrder ¶
func (a ModifyPrimaryKeyExpiry) SortOrder() int
func (ModifyPrimaryKeyExpiry) String ¶
func (a ModifyPrimaryKeyExpiry) String() string
type ModifySubkeyExpiry ¶ added in v1.1.0
type ModifySubkeyExpiry struct { KeyAction // contains filtered or unexported fields }
ModifySubkeyExpiry iterates over all user IDs. For each UID, it updates the expiry date on the *self signature*. It re-signs the self signature.
func (ModifySubkeyExpiry) SortOrder ¶ added in v1.1.0
func (a ModifySubkeyExpiry) SortOrder() int
func (ModifySubkeyExpiry) String ¶ added in v1.1.0
func (a ModifySubkeyExpiry) String() string
type RefreshSubkeyBindingSignature ¶
RefreshSubkeyBindingSignature re-signs the subkey binding signature for the given SubkeyId. This is useful if the old signature uses a weak hash.
func (RefreshSubkeyBindingSignature) SortOrder ¶
func (a RefreshSubkeyBindingSignature) SortOrder() int
func (RefreshSubkeyBindingSignature) String ¶
func (a RefreshSubkeyBindingSignature) String() string
type RefreshUserIdSelfSignatures ¶
type RefreshUserIdSelfSignatures struct {
KeyAction
}
RefreshUserIdSelfSignatures iterates over user ids and re-signs the self signatures. This is useful if the old signature uses a weak hash.
func (RefreshUserIdSelfSignatures) SortOrder ¶
func (a RefreshUserIdSelfSignatures) SortOrder() int
func (RefreshUserIdSelfSignatures) String ¶
func (a RefreshUserIdSelfSignatures) String() string
type SetPreferredCompressionAlgorithms ¶
type SetPreferredCompressionAlgorithms struct { KeyAction NewPreferences []compression.CompressionAlgorithm }
SetPreferredCompressionAlgorithms iterates over all user IDs, setting the preferred compression algorithm preferences from NewPreferences. It re-signs the self signature on each user ID.
func (SetPreferredCompressionAlgorithms) SortOrder ¶
func (a SetPreferredCompressionAlgorithms) SortOrder() int
func (SetPreferredCompressionAlgorithms) String ¶
func (a SetPreferredCompressionAlgorithms) String() string
type SetPreferredHashAlgorithms ¶
type SetPreferredHashAlgorithms struct { KeyAction NewPreferences []hash.HashAlgorithm }
SetPreferredHashAlgorithms iterates over all user IDs, setting the preferred hash algorithm preferences from NewPreferences It re-signs the self signature on each user ID.
func (SetPreferredHashAlgorithms) SortOrder ¶
func (a SetPreferredHashAlgorithms) SortOrder() int
func (SetPreferredHashAlgorithms) String ¶
func (a SetPreferredHashAlgorithms) String() string
type SetPreferredSymmetricAlgorithms ¶
type SetPreferredSymmetricAlgorithms struct { KeyAction NewPreferences []symmetric.SymmetricAlgorithm }
SetPreferredSymmetricAlgorithms iterates over all user IDs, setting the preferred symmetric algorithm preferences from NewPreferences It re-signs the self signature on each user ID.
func (SetPreferredSymmetricAlgorithms) SortOrder ¶
func (a SetPreferredSymmetricAlgorithms) SortOrder() int
func (SetPreferredSymmetricAlgorithms) String ¶
func (a SetPreferredSymmetricAlgorithms) String() string
type WarningType ¶
type WarningType int