add_openpgp_header (line
888)
This function adds the openpgp header to the outgoing message.
void
add_openpgp_header
( &$composeMessage)
gpg_check_sign_pgp_mime (line
628)
Used to read a detached signature file of type applicatiion/pgp-signature
This function is called by the read_body hook (above)
integer
gpg_check_sign_pgp_mime
(object Message &$message, string $fullbodytext)
-
string
$fullbodytext: Body text string as retrieved directly from IMAP
-
object Message
&$message: message object See sqimap_get_message() return
gpg_compose_row_do (line
942)
This function adds a "Encrypt Now" and "GPG Sign" link to the "Compose" row during message composition.
void
gpg_compose_row_do
()
gpg_compose_send_do (line
719)
This function is called by the main SM plugin_init (above) to initialize our compose_send hook functions
This is where the Encrypt on Send and Encrypt and Sign on Send functions go. $composeMessage is in second array key.
void
gpg_compose_send_do
( &$args)
gpg_decrypt_link (line
358)
This function is called by the read_body hook (above)
Use to see if the message contains an encrypted body if the message contains encrypted text, display a link to the decrypt code.
void
gpg_decrypt_link
(string $body)
gpg_fetch_full_body (line
246)
This function is called before gpg_check_sign and gpg_decrypt_link to retrieve the messge body for those functions
string
gpg_fetch_full_body
(integer $imapConnection, integer $passed_id)
-
integer
$imapConnection: handle to the IMAP connection
-
integer
$passed_id: message ID to retreive from the IMAP folder
gpg_get_message_body_imap (line
318)
get the body of a given part of a message
void
gpg_get_message_body_imap
(class &$message, integer $imapConnection, integer $passed_id)
-
class
&$message: Message object to get the body for
-
integer
$imapConnection: handle to the IMAP connection
-
integer
$passed_id: message ID to retreive from the IMAP folder
gpg_get_mime_header (line
334)
download just the mime header from imap (note: this does not setup a MessageHeader class
string
gpg_get_mime_header
(class $message, integer $imapConnection, integer $passed_id)
-
class
$message: Message object to get the entity out of
-
integer
$imapConnection: handle to the IMAP connection
-
integer
$passed_id: message ID to retreive from the IMAP folder
gpg_handle_signature_do (line
71)
Hook function for application/gpg-signature attachments This function looks for the previous attachment and checks the signature against it. The resulting info is also placed in a session variable gpgverifyinfo
void
gpg_handle_signature_do
(attachinfo &$attachinfo)
-
attachinfo
&$attachinfo: array passed by NaSMail to attachment handlers
gpg_identity_table_hook (line
27)
Function to display possible gpg secret keys for user to select
string
gpg_identity_table_hook
(array $args)
-
array
$args: Array passed from identities_option_table
gpg_import_link (line
461)
This function is called by the read_body hook (above)
Use to see if the message contains an encrypted body if the message contains encrypted text, display a link to the decrypt code.
void
gpg_import_link
(string $body)
-
string
$body: message body
gpg_message_encrypt_and_sign (line
1169)
Encrypts or signs messages
Currently signonly action is not finished. Attachments are not signed.
unknown
gpg_message_encrypt_and_sign
(object Message &$composeMessage, string &$body, string $recipients, integer $session, integer $action, [integer $id = 0])
-
string
$recipients
-
integer
$session
-
integer
$action: 0 - no action, 1 - encrypt, 2 - sign, 3 - encrypt and sign
-
integer
$id: starting attachment id. 0 for compose_form_process, 1 for compose_send
-
object Message
&$composeMessage: composed message
-
string
&$body: body
gpg_openpgp_header (line
201)
This function is called to parse whatever "openpgp:" headers are found in the message and to display add and respond links to those headers.
void
gpg_openpgp_header
(stream $imapConnection, int $passed_id)
-
stream
$imapConnection: IMAP connection
-
int
$passed_id: Message ID
gpg_optpage_register_block_do (line
909)
This function formats and adds the plugin and its description to the Options screen.
void
gpg_optpage_register_block_do
()
gpg_read_body_header_do (line
141)
This function is called by setup.php, within a hook to initialize our read_body_header functions.
void
gpg_read_body_header_do
()
gpg_strip_sign (line
585)
This function strips a gpg signature from the text
string
gpg_strip_sign
(string $signedtext)