Changeset 91 for trunk/expressoMail1_2/inc/class.imap_functions.inc.php
- Timestamp:
- 11/07/07 15:19:35 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r86 r91 2 2 include_once("class.functions.inc.php"); 3 3 include_once("class.ldap_functions.inc.php"); 4 include_once("class.exporteml.inc.php"); 5 4 6 class imap_functions 5 7 { … … 157 159 $return['body'] = $return_get_body['body']; 158 160 $return['attachments'] = $return_get_body['attachments']; 159 $return['thumbs'] = $return_get_body['thumbs']; 161 $return['thumbs'] = $return_get_body['thumbs']; 162 $return['signature'] = $return_get_body['signature']; 160 163 161 164 foreach($all_header as $line) { … … 353 356 $return['attachments'] = $this-> download_attachment($msg,$msg_number); 354 357 if(!$this->has_cid) 355 $return['thumbs'] = $this->get_thumbs($msg,$msg_number,$msg_folder); 358 { 359 $return['thumbs'] = $this->get_thumbs($msg,$msg_number,$msg_folder); 360 $return['signature'] = $this->get_signature($msg,$msg_number,$msg_folder); 361 } 356 362 357 363 if(!$msg->structure[$msg_number]->parts) //Simple message, only 1 piece … … 689 695 } 690 696 return $body; 697 } 698 699 function get_signature($msg, $msg_number, $msg_folder) 700 { 701 foreach ($msg->file_type[$msg_number] as $index => $file_type) 702 { 703 $file_type = strtolower($file_type); 704 if(strtolower($msg->encoding[$msg_number][$index]) == 'base64') 705 { 706 if ($file_type == 'application/x-pkcs7-signature') 707 { 708 $export_mail = new ExportEml(); 709 $params['folder'] = $msg_folder; 710 $params['msgs_to_export'] = $msg_number; 711 $result = openssl_pkcs7_verify ($export_mail->export_msg($params),PKCS7_NOVERIFY); 712 713 /* Message verified */ 714 if ($result === true) 715 $sign = "signed"; 716 else 717 $sign = "void"; 718 } 719 } 720 } 721 return $sign; 691 722 } 692 723
Note: See TracChangeset
for help on using the changeset viewer.