-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ca.php
More file actions
62 lines (61 loc) · 1.41 KB
/
Copy pathindex.ca.php
File metadata and controls
62 lines (61 loc) · 1.41 KB
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
<?
/**
* CA Certs index
* @package phpmyca
* @author Mike Green <mdgreen@gmail.com>
* @copyright Copyright (c) 2010, Mike Green
* @license http://opensource.org/licenses/gpl-2.0.php GPLv2
*/
// verify webapp is loaded
if (!is_a($_WA,'webapp') or !method_exists($_WA,'requireWebapp')) {
die('ERROR: webapp object failed to instantiate');
}
$_WA->requireWebapp();
// Did the user request an action?
switch($_WA->html->getActionRequest()) {
case WA_ACTION_BROWSER_IMPORT:
die($_WA->getPageCaBrowserImport());
break;
case WA_ACTION_BUNDLE:
die($_WA->downloadCaBundle('ca'));
break;
case WA_ACTION_CA_ADD:
die(getPageAdd());
break;
case WA_ACTION_CA_EDIT:
die('not implemented yet');
break;
case WA_ACTION_CA_EXPORT:
die('not implemented yet');
break;
case WA_ACTION_CA_EXPORT_ALL:
die($_WA->actionCaExportCerts());
break;
case WA_ACTION_CA_IMPORT:
die(getPageImport());
break;
case WA_ACTION_CA_PKCS12:
die($_WA->getPageCaPkcs12());
break;
case WA_ACTION_CA_REVOKE:
die($_WA->getPageCaRevoke());
break;
case WA_ACTION_CA_VIEW:
die($_WA->getPageCaView());
break;
case WA_ACTION_CHANGE_PASS:
die($_WA->changeKeyPass('ca'));
break;
// decrypt private key password
case WA_ACTION_DECRYPT:
die($_WA->decryptPrivateKey('ca'));
break;
// encrypt private key
case WA_ACTION_ENCRYPT:
die($_WA->encryptPrivateKey('ca'));
break;
default:
die($_WA->getPageCaList());
break;
}
?>