annotate vendor/pear/crypt_gpg/tools/dump-keyring.php @ 4:888e774ee983

libcalendar plugin as distributed
author Charlie Root
date Sat, 13 Jan 2018 08:57:56 -0500
parents 1e000243b222
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
1 <?php
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
2
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
3 /*
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
4 * Helper script for test keyring generation
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
5 *
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
6 * See build-keyring.sh
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
7 *
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
8 * Copyright (c) 2008 Michael Gauthier
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
9 */
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
10
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
11 echo "<?php\n\n";
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
12
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
13 $HOMEDIR = $_SERVER['argv'][1];
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
14
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
15 $dataFiles = array(
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
16 'pubring' => 'pubring.gpg',
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
17 'secring' => 'secring.gpg',
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
18 'trustdb' => 'trustdb.gpg',
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
19 'random_seed' => 'random_seed'
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
20 );
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
21
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
22
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
23 echo "\n// For TestCase\n";
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
24
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
25 foreach ($dataFiles as $key => $file) {
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
26 echo " // {{{ " . $key . " data\n";
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
27 echo " $" . $key . "Data = <<<TEXT\n";
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
28
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
29 $content = file_get_contents($HOMEDIR . '/' . $file);
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
30 $content = base64_encode($content);
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
31 $content = wordwrap($content, 60, "\n", true);
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
32
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
33 echo $content;
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
34
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
35 echo "\n\nTEXT;\n";
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
36 echo " // }}}\n";
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
37 }
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
38
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
39 echo "\n?>\n";
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
40
1e000243b222 vanilla 1.3.3 distro, I hope
Charlie Root
parents:
diff changeset
41 ?>