-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.php
160 lines (132 loc) · 4.36 KB
/
setup.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php
/**
* SquirrelMail S/MIME Verification Plugin
*
* Copyleft (-) 2017-2019 Andrew Sachen <[email protected]>
* Copyright (c) 2015 Walter Hoehlhubmer <[email protected]>
* Copyright (c) 2005-2012 Paul Lesniewski <[email protected]>
* Copyright (c) 2005 Khedron Wilk <[email protected]>
* Copyright (c) 2004 Scott Heavner
* Copyright (c) 2003 Antonio Vasconcelos <[email protected]>
* Copyright (c) 2001-2003 Wouter Teepe <[email protected]>
*
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* @package plugins
* @subpackage smime
*
*/
/**
* Register this plugin with SquirrelMail
*
*/
function squirrelmail_plugin_init_smime()
{
global $squirrelmail_plugin_hooks;
// verify signed messages (SM 1.4.x)
//
$squirrelmail_plugin_hooks['read_body_header']['smime']
= 'smime_header_verify';
// verify signed messages (SM 1.5.2+)
//
$squirrelmail_plugin_hooks['template_construct_read_headers.tpl']['smime']
= 'smime_header_verify';
// configuration check
//
$squirrelmail_plugin_hooks['configtest']['smime']
= 'smime_check_configuration';
}
/**
* Verify signed messages
*
*/
function smime_header_verify()
{
include_once(SM_PATH . 'plugins/smime/functions.php');
return smime_header_verify_do();
}
/**
* Validate that this plugin is configured correctly
*
* @return boolean Whether or not there was a
* configuration error for this plugin.
*
*/
function smime_check_configuration()
{
include_once(SM_PATH . 'plugins/smime/functions.php');
return smime_check_configuration_do();
}
/**
* Returns info about this plugin
*
*/
function smime_info()
{
return array(
'english_name' => 'S/MIME Verification',
'authors' => array(
'Wouter Teepe' => array(
'email' => '[email protected]',
),
'Antonio Vasconcelos' => array(
'email' => '[email protected]',
),
'Khedron Wilk' => array(
'email' => '[email protected]',
),
'Scott Heavner' => array(
),
'Paul Lesniewski' => array(
'email' => '[email protected]',
'sm_site_username' => 'pdontthink',
),
'Walter Hoehlhubmer' => array(
'email' => '[email protected]',
),
'Andrew Sachen' => array(
'email' => '[email protected]',
),
),
'version' => '1.2',
'required_sm_version' => '1.1.1',
'requires_configuration' => 0,
'summary' => 'Verifies S/MIME signed messages.',
'details' => 'This plugin enables the viewing of S/MIME signed messages (those that are sent in the "multipart/signed" mime format). The user is able to verify the message, the sender\'s certificate, and can view and download the certificate.',
'requires_source_patch' => 0,
'other_requirements' => 'openssl',
'per_version_requirements' => array(
'1.5.2' => array(
'required_plugins' => array(),
),
'1.5.0' => array(
'required_plugins' => array(
'compatibility' => array(
'version' => '2.0.7',
'activate' => FALSE,
)
)
),
'1.4.10' => array(
'required_plugins' => array(),
),
'1.4.0' => array(
'required_plugins' => array(
'compatibility' => array(
'version' => '2.0.7',
'activate' => FALSE,
)
)
),
),
);
}
/**
* Returns version info about this plugin
*
*/
function smime_version()
{
$info = smime_info();
return $info['version'];
}