1<?php 2require __DIR__ . '/branches.inc'; 3 4// GPG keys used for signing releases. 5 6function gpg_key_get(string $rm): ?string { 7 switch ($rm) { 8 case 'ab': 9 return 10 "pub 2048R/9C0D5763 2015-06-09 [expires: 2024-06-06]\n" . 11 " Key fingerprint = 1A4E 8B72 77C4 2E53 DBA9 C7B9 BCAA 30EA 9C0D 5763\n" . 12 "uid Anatol Belski <ab@php.net>"; 13 14 case 'bukka': 15 return 16 "pub ed25519 2021-04-10 [SC]\n" . 17 " C28D937575603EB4ABB725861C0779DC5C0A9DE4\n" . 18 "uid [ultimate] Jakub Zelenka <bukka@php.net>\n" . 19 "uid [ultimate] Jakub Zelenka <jakub.openssl@gmail.com>\n" . 20 "uid [ultimate] Jakub Zelenka <jakub.zelenka@gmail.com>\n" . 21 "sub cv25519 2021-04-10 [E]"; 22 23 case "calvinb": 24 return 25 "pub ed25519 2024-04-17 [SC]\n" . 26 " 9D7F 99A0 CB8F 05C8 A695 8D62 56A9 7AF7 600A 39A6\n" . 27 "uid [ultimate] Calvin Buckley (PHP) <calvinb@php.net>\n" . 28 "sub cv25519 2024-04-17 [E]"; 29 30 case 'carusogabriel-old': 31 return 32 "pub rsa4096 2020-05-09 [SC] [expires: 2024-05-08]\n" . 33 " BFDD D286 4282 4F81 18EF 7790 9B67 A5C1 2229 118F\n" . 34 "uid [ultimate] Gabriel Caruso (Release Manager) <carusogabriel@php.net>\n" . 35 "sub rsa4096 2020-05-09 [E] [expires: 2024-05-08]"; 36 37 case 'carusogabriel-new': 38 return 39 "pub rsa4096 2022-08-30 [SC] [expires: 2024-08-29]\n" . 40 " 2C16 C765 DBE5 4A08 8130 F1BC 4B9B 5F60 0B55 F3B4\n" . 41 "uid [ultimate] Gabriel Caruso <carusogabriel@php.net>\n" . 42 "sub rsa4096 2022-08-30 [E] [expires: 2024-08-29]"; 43 44 case 'cmb': 45 return 46 "pub rsa4096/118BCCB6 2018-06-05 [SC] [expires: 2022-06-04]\n" . 47 " Key fingerprint = CBAF 69F1 73A0 FEA4 B537 F470 D66C 9593 118B CCB6\n" . 48 "uid Christoph M. Becker <cmb@php.net>"; 49 50 case 'davey': 51 return 52 "pub 4096R/7BD5DCD0 2016-05-07\n" . 53 " Key fingerprint = A917 B1EC DA84 AEC2 B568 FED6 F50A BC80 7BD5 DCD0\n" . 54 "uid Davey Shafik <davey@php.net>"; 55 56 case 'derick': 57 return 58 "sec rsa4096 2019-06-11 [SC] [expires: 2029-06-08]\n" . 59 " 5A52880781F755608BF815FC910DEB46F53EA312\n" . 60 "uid [ultimate] Derick Rethans <gpg@derickrethans.nl>\n" . 61 "uid [ultimate] Derick Rethans <derick@derickrethans.nl>\n" . 62 "uid [ultimate] Derick Rethans (GitHub) <github@derickrethans.nl>\n" . 63 "uid [ultimate] Derick Rethans (PHP) <derick@php.net>\n" . 64 "ssb rsa4096 2019-06-11 [E] [expires: 2029-06-08]"; 65 66 case 'dsp': 67 return 68 "pub 4096R/7267B52D 2012-03-20 [expires: 2016-03-19]\n" . 69 " Key fingerprint = 0B96 609E 270F 565C 1329 2B24 C13C 70B8 7267 B52D\n" . 70 "uid David Soria Parra <dsp@php.net>"; 71 72 case 'ericmann': 73 return 74 "pub rsa4096 2016-11-25 [SC]\n" . 75 " AFD8 691F DAED F03B DF6E 4605 63F1 5A9B 7153 76CA\n" . 76 "uid [ultimate] Eric A Mann <eric@sixthree.me>\n" . 77 "uid [ultimate] Eric A Mann <eric@eamann.com>\n" . 78 "uid [ultimate] Eric A Mann <eric@eam.me>\n" . 79 "uid [ultimate] Eric Mann <ericmann@php.net>\n" . 80 "sub rsa4096 2016-11-25 [S]\n" . 81 "sub rsa4096 2016-11-25 [E]\n" . 82 "sub rsa4096 2016-11-25 [A]"; 83 84 case 'johannes': 85 return 86 "pub 2048R/FC9C83D7 2012-03-18 [expires: 2017-03-17]\n" . 87 " Key fingerprint = 0A95 E9A0 2654 2D53 835E 3F3A 7DEC 4E69 FC9C 83D7\n" . 88 "uid Johannes Schlüter <johannes@schlueters.de>\n" . 89 "uid Johannes Schlüter <johannes@php.net>"; 90 91 case 'jpauli': 92 return 93 "pub 2048R/90D90EC1 2013-07-18 [expire : 2016-07-17]\n" . 94 " Key fingerprint = 0BD7 8B5F 9750 0D45 0838 F95D FE85 7D9A 90D9 0EC1\n" . 95 "uid Julien Pauli <jpauli@php.net>"; 96 97 case 'krakjoe': 98 return 99 "pub 2048R/31CBD89E 2016-12-08\n" . 100 " Key fingerprint = 5289 95BF EDFB A719 1D46 839E F9BA 0ADA 31CB D89E\n" . 101 "uid Joe Watkins <krakjoe@php.net>"; 102 103 case 'patrickallaert': 104 return 105 "pub rsa4096 2021-04-01 [SC]\n" . 106 " F1F6 9223 8FBC 1666 E5A5 CCD4 199F 9DFE F6FF BAFD\n" . 107 "uid [ultimate] Patrick Allaert <patrickallaert@php.net>\n" . 108 "sub rsa4096 2021-04-01 [E]"; 109 110 case 'petk': 111 return 112 "pub rsa4096 2019-05-29 [SC] [expires: 2021-05-28]\n" . 113 " 4267 0A7F E4D0 441C 8E46 3234 9E4F DC07 4A4E F02D\n" . 114 "uid [ultimate] Peter Kokot <petk@php.net>\n" . 115 "sub rsa4096 2019-05-29 [E] [expires: 2021-05-28]"; 116 117 case 'pierrick': 118 return 119 "pub rsa4096 2021-04-01 [SC]\n" . 120 " 1198 C011 7593 497A 5EC5 C199 286A F1F9 8974 69DC\n" . 121 "uid [ultimate] Pierrick Charron <pierrick@php.net>\n" . 122 "sub rsa4096 2021-04-01 [E]"; 123 124 case 'pollita': 125 return 126 "pub 4096R/70D12172 2017-04-14 [expires: 2024-04-21]\n" . 127 " Key fingerprint = 1729 F839 38DA 44E2 7BA0 F4D3 DBDB 3974 70D1 2172\n" . 128 "uid Sara Golemon <pollita@php.net>"; 129 130 case 'ramsey': 131 return 132 "pub rsa4096 2021-04-26 [SC] [expires: 2025-11-24]\n" . 133 " 39B6 4134 3D8C 104B 2B14 6DC3 F9C3 9DC0 B969 8544\n" . 134 "uid [ultimate] Ben Ramsey <ramsey@php.net>\n" . 135 "sub rsa4096 2021-04-26 [E] [expires: 2025-11-24]"; 136 137 case 'remi': 138 return 139 "pub 4096R/EE5AF27F 2017-05-24 [expires: 2024-05-22]\n" . 140 " Key fingerprint = B1B4 4D8F 021E 4E2D 6021 E995 DC9F F8D3 EE5A F27F\n" . 141 "uid Remi Collet <remi@php.net>"; 142 143 case 'saki': 144 return 145 "pub rsa4096 2024-05-20 [SC]\n" . 146 " 0616 E93D 95AF 4712 43E2 6761 7704 26E1 7EBB B3DD\n" . 147 "uid [ultimate] Saki Takamachi (for php.net) <saki@php.net>\n" . 148 "sub rsa4096 2024-05-20 [E]"; 149 150 case 'sergey': 151 return 152 "pub rsa4096 2021-03-26 [SC] [expires: 2030-03-26]\n" . 153 " E609 13E4 DF20 9907 D8E3 0D96 659A 97C9 CF2A 795A\n" . 154 "uid [ultimate] Sergey Panteleev <sergey@php.net>\n" . 155 "uid [ultimate] Sergey Panteleev <sergey@s-panteleev.ru>\n" . 156 "uid [ultimate] Sergey Panteleev <sergey@sergeypanteleev.com>\n" . 157 "sub rsa4096 2021-03-26 [E] [expires: 2025-03-26]"; 158 159 case 'stas': 160 return 161 "pub 2048D/5DA04B5D 2012-03-19\n" . 162 " Key fingerprint = F382 5282 6ACD 957E F380 D39F 2F79 56BC 5DA0 4B5D\n" . 163 "uid Stanislav Malyshev (PHP key) <smalyshev@gmail.com>\n" . 164 "uid Stanislav Malyshev (PHP key) <stas@php.net>\n" . 165 "uid Stanislav Malyshev (PHP key) <smalyshev@sugarcrm.com>"; 166 167 case 'tyrael': 168 return 169 "pub 2048R/33CFC8B3 2014-01-14 [expires: 2020-01-13]\n" . 170 " Key fingerprint = 6E4F 6AB3 21FD C07F 2C33 2E3A C2BF 0BC4 33CF C8B3\n" . 171 "uid Ferenc Kovacs <tyrael@php.net>"; 172 173 default: 174 return null; 175 } 176} 177 178function gpg_key_get_branches(bool $activeOnly): array { 179 $branches = [ 180 '8.4' => ['ericmann', 'calvinb', 'saki'], 181 '8.3' => ['pierrick', 'ericmann', 'bukka'], 182 '8.2' => ['pierrick', 'ramsey', 'sergey'], 183 '8.1' => ['krakjoe', 'ramsey', 'patrickallaert'], 184 '8.0' => ['pollita', 'carusogabriel-old', 'carusogabriel-new', 'ramsey'], 185 '7.4' => ['derick', 'petk'], 186 '7.3' => ['cmb', 'stas'], 187 '7.2' => ['pollita', 'remi', 'cmb'], 188 '7.1' => ['davey', 'krakjoe', 'pollita'], 189 '7.0' => ['ab', 'tyrael'], 190 '5.6' => ['tyrael', 'jpauli'], 191 '5.5' => ['jpauli', 'dsp', 'stas'], 192 '5.4' => ['stas'], 193 '5.3' => ['dsp', 'johannes'], 194 ]; 195 196 if (!$activeOnly) { return $branches; } 197 198 $active = get_active_branches(); 199 return array_filter($branches, function ($branch) use ($active) { 200 [$major] = explode('.', $branch, 2); 201 return isset($active[$major][$branch]); 202 }, ARRAY_FILTER_USE_KEY); 203} 204 205function gpg_key_show_keys(bool $activeOnly): void { 206 foreach (gpg_key_get_branches($activeOnly) as $branch => $rms) { 207 $keys = array_filter( 208 array_map(function ($rm) { return gpg_key_get($rm); }, $rms), 209 function ($key) { return $key !== null; }); 210 if (empty($keys)) { continue; } 211 212 $branch = htmlentities($branch, ENT_QUOTES, 'UTF-8'); 213 $keys = htmlentities(implode("\n\n", $keys), ENT_QUOTES, 'UTF-8'); 214 215 echo "<h3 id='gpg-$branch' class='content-header'>PHP $branch</h3>\n"; 216 echo "<div class='content-box'>\n"; 217 echo " <pre>\n"; 218 echo $keys, "\n"; 219 echo " </pre>\n"; 220 echo "</div>\n\n\n"; 221 } 222} 223