- GetPassphrase Address => ADDRESS
- SignEncrypt Entity => MIME::Entity, [ Encrypt => 1, Sign => 1, ... ]
- SignEncryptContent Content => STRINGREF, [ Encrypt => 1, Sign => 1, ... ]
- VerifyDecrypt Info => HASHREF, [ Passphrase => undef ]
- DecryptContent Content => STRINGREF, [ Passphrase => undef ]
- ParseStatus STRING
- FindScatteredParts Parts => ARRAYREF, Parents => HASHREF, Skip => HASHREF
- CheckIfProtected Entity => MIME::Entity
- GetKeysInfo Type => ('public'|'private'), Key => EMAIL
- GetKeysForEncryption Recipient => EMAIL
- GetKeysForSigning Signer => EMAIL
- ParseDate STRING
RT::Crypt::Role - Common requirements for encryption implementations
This routine is called only if the protocol is enabled, and should return true if all binaries required by the protocol are installed. It should produce any warnings necessary to describe any issues it encounters.
Returns the passphrase for the given address. It looks at the relevant configuration option for the encryption protocol (e.g. "GnuPG" in RT_Config for GnuPG), and examines the Passphrase key. It it does not exist, returns the empty string. If it is a scalar, it returns that value. If it is an anonymous subroutine, it calls it. If it is a hash, it looks up the address (using '' as a fallback key).
Signs and/or encrypts a MIME entity. All arguments and return values are identical to "SignEncrypt" in RT::Crypt, with the omission of
Signs and/or encrypts a string, which is passed by reference. All arguments and return values are identical to "SignEncryptContent" in RT::Crypt, with the omission of
Returns a hash with at least the following keys:
True if there was an error encrypting or signing.
An un-localized error message desribing the problem.
Decrypts the content in the string reference in-place. All arguments and return values are identical to "DecryptContent" in RT::Crypt, with the omission of
Takes a string describing the status of verification/decryption, usually as stored in a MIME header. Parses and returns it as described in "ParseStatus" in RT::Crypt.
Passed the list of unclaimed MIME::Entity objects in
Parts, this method should examine them as a whole to determine if there are any that could not be claimed by the single-entity-at-a-time "CheckIfProtected" method. This is generally only necessary in the case of signatures manually attached in parallel, and the like.
If found, the relevant entities should be inserted into
Skip with a true value, to signify to other encryption protols that they have been claimed. The method should return a list of hash references, each containing a
Type key which is either
encrypted. The remaining keys are protocol-dependent; the hashref will be provided to "VerifyDecrypt".
Examines the provided MIME::Entity, and returns an empty list if it is not signed or encrypted using the protocol. If it is, returns a hash reference containing a
Type which is either
signed. The remaining keys are protocol-dependent; the hashref will be provided to "VerifyDecrypt".
Returns a list of keys matching the email
Key, as described in "GetKeysInfo" in RT::Crypt.
Returns a list of keys suitable for encryption, as described in "GetKeysForEncryption" in RT::Crypt.
Returns a list of keys suitable for encryption, as described in "GetKeysForSigning" in RT::Crypt.
Takes a string, and parses and returns a RT::Date; if the string is purely numeric, assumes is a epoch timestamp.← Back to index