iPXE currently allocates a copy the certificate's common name as a string. This string is used by the TLS and CMS code to check certificate names against an expected name, and also appears in debugging messages. Provide a function x509_check_name() to centralise certificate name checking (in preparation for adding subjectAlternativeName support), and a function x509_name() to provide a name to be used in debugging messages, and remove the dynamically allocated string. Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
130 |
|
130 |
|
131 |
|
131 |
|
132 |
|
132 |
|
133 |
|
|
|
|
133 |
|
|
134 |
|
134 |
|
135 |
|
135 |
|
136 |
|
136 |
|
|
|
||
680 |
|
680 |
|
681 |
|
681 |
|
682 |
|
682 |
|
683 |
|
|
|
684 |
|
|
|
|
683 |
|
|
685 |
|
684 |
|
686 |
|
685 |
|
687 |
|
686 |
|
|
|
||
177 |
|
177 |
|
178 |
|
178 |
|
179 |
|
179 |
|
180 |
|
|
|
|
180 |
|
|
181 |
|
181 |
|
182 |
|
182 |
|
183 |
|
183 |
|
184 |
|
|
|
|
184 |
|
|
185 |
|
185 |
|
186 |
|
186 |
|
187 |
|
187 |
|
|
|
||
192 |
|
192 |
|
193 |
|
193 |
|
194 |
|
194 |
|
195 |
|
|
|
|
195 |
|
|
196 |
|
196 |
|
197 |
|
197 |
|
198 |
|
198 |
|
|
|
||
218 |
|
218 |
|
219 |
|
219 |
|
220 |
|
220 |
|
221 |
|
|
|
|
221 |
|
|
222 |
|
222 |
|
223 |
|
223 |
|
224 |
|
224 |
|
|
|
||
250 |
|
250 |
|
251 |
|
251 |
|
252 |
|
252 |
|
253 |
|
|
|
|
253 |
|
|
254 |
|
254 |
|
255 |
|
255 |
|
256 |
|
256 |
|
|
|
||
327 |
|
327 |
|
328 |
|
328 |
|
329 |
|
329 |
|
330 |
|
|
|
|
330 |
|
|
331 |
|
331 |
|
332 |
|
332 |
|
333 |
|
333 |
|
334 |
|
334 |
|
335 |
|
335 |
|
336 |
|
336 |
|
337 |
|
|
|
|
337 |
|
|
338 |
|
338 |
|
339 |
|
339 |
|
340 |
|
340 |
|
|
|
||
343 |
|
343 |
|
344 |
|
344 |
|
345 |
|
345 |
|
346 |
|
|
|
|
346 |
|
|
347 |
|
347 |
|
348 |
|
348 |
|
349 |
|
349 |
|
|
|
||
368 |
|
368 |
|
369 |
|
369 |
|
370 |
|
370 |
|
371 |
|
|
|
|
371 |
|
|
372 |
|
372 |
|
373 |
|
373 |
|
374 |
|
374 |
|
|
|
||
443 |
|
443 |
|
444 |
|
444 |
|
445 |
|
445 |
|
446 |
|
|
|
|
446 |
|
|
447 |
|
447 |
|
448 |
|
448 |
|
449 |
|
449 |
|
450 |
|
450 |
|
451 |
|
|
|
|
451 |
|
|
452 |
|
452 |
|
453 |
|
453 |
|
454 |
|
454 |
|
455 |
|
455 |
|
456 |
|
|
|
|
456 |
|
|
457 |
|
457 |
|
458 |
|
458 |
|
459 |
|
459 |
|
|
|
||
474 |
|
474 |
|
475 |
|
475 |
|
476 |
|
476 |
|
477 |
|
|
|
|
477 |
|
|
478 |
|
478 |
|
479 |
|
479 |
|
480 |
|
480 |
|
|
|
||
512 |
|
512 |
|
513 |
|
513 |
|
514 |
|
514 |
|
515 |
|
|
|
|
515 |
|
|
516 |
|
516 |
|
517 |
|
517 |
|
518 |
|
518 |
|
|
|
||
522 |
|
522 |
|
523 |
|
523 |
|
524 |
|
524 |
|
525 |
|
|
|
|
525 |
|
|
526 |
|
526 |
|
527 |
|
527 |
|
528 |
|
528 |
|
529 |
|
|
|
|
529 |
|
|
530 |
|
530 |
|
531 |
|
531 |
|
532 |
|
532 |
|
|
|
||
536 |
|
536 |
|
537 |
|
537 |
|
538 |
|
538 |
|
539 |
|
|
|
|
539 |
|
|
540 |
|
540 |
|
541 |
|
541 |
|
542 |
|
542 |
|
543 |
|
|
|
|
543 |
|
|
544 |
|
544 |
|
545 |
|
545 |
|
546 |
|
546 |
|
|
|
||
550 |
|
550 |
|
551 |
|
551 |
|
552 |
|
552 |
|
553 |
|
|
|
|
553 |
|
|
554 |
|
554 |
|
555 |
|
555 |
|
556 |
|
556 |
|
|
|
||
630 |
|
630 |
|
631 |
|
631 |
|
632 |
|
632 |
|
633 |
|
|
|
|
633 |
|
|
634 |
|
634 |
|
635 |
|
635 |
|
636 |
|
636 |
|
|
|
||
638 |
|
638 |
|
639 |
|
639 |
|
640 |
|
640 |
|
641 |
|
|
|
642 |
|
|
|
643 |
|
|
|
|
641 |
|
|
|
642 |
|
|
|
643 |
|
|
|
644 |
|
|
644 |
|
645 |
|
645 |
|
646 |
|
646 |
|
647 |
|
|
|
||
650 |
|
651 |
|
651 |
|
652 |
|
652 |
|
653 |
|
653 |
|
|
|
|
654 |
|
|
654 |
|
655 |
|
655 |
|
656 |
|
656 |
|
657 |
|
|
|
||
682 |
|
683 |
|
683 |
|
684 |
|
684 |
|
685 |
|
685 |
|
|
|
|
686 |
|
|
686 |
|
687 |
|
687 |
|
688 |
|
688 |
|
689 |
|
689 |
|
|
|
|
690 |
|
|
690 |
|
691 |
|
691 |
|
692 |
|
692 |
|
693 |
|
693 |
|
694 |
|
694 |
|
695 |
|
695 |
|
|
|
|
696 |
|
|
696 |
|
697 |
|
697 |
|
698 |
|
698 |
|
699 |
|
|
|
||
836 |
|
837 |
|
837 |
|
838 |
|
838 |
|
839 |
|
839 |
|
|
|
|
840 |
|
|
840 |
|
841 |
|
841 |
|
842 |
|
842 |
|
843 |
|
|
|
||
845 |
|
846 |
|
846 |
|
847 |
|
847 |
|
848 |
|
848 |
|
|
|
|
849 |
|
|
849 |
|
850 |
|
850 |
|
851 |
|
851 |
|
852 |
|
852 |
|
853 |
|
853 |
|
|
|
|
854 |
|
|
854 |
|
855 |
|
855 |
|
856 |
|
856 |
|
857 |
|
|
|
||
892 |
|
893 |
|
893 |
|
894 |
|
894 |
|
895 |
|
895 |
|
|
|
896 |
|
|
|
897 |
|
|
|
898 |
|
|
|
|
896 |
|
|
|
897 |
|
|
|
898 |
|
|
|
899 |
|
|
899 |
|
900 |
|
900 |
|
901 |
|
901 |
|
902 |
|
|
|
||
904 |
|
905 |
|
905 |
|
906 |
|
906 |
|
907 |
|
907 |
|
|
|
908 |
|
|
|
909 |
|
|
|
|
908 |
|
|
|
909 |
|
|
|
910 |
|
|
|
911 |
|
|
910 |
|
912 |
|
911 |
|
913 |
|
912 |
|
914 |
|
|
|
||
920 |
|
922 |
|
921 |
|
923 |
|
922 |
|
924 |
|
923 |
|
|
|
|
925 |
|
|
924 |
|
926 |
|
925 |
|
927 |
|
926 |
|
928 |
|
927 |
|
929 |
|
928 |
|
|
|
|
930 |
|
|
929 |
|
931 |
|
930 |
|
932 |
|
931 |
|
933 |
|
932 |
|
|
|
|
934 |
|
|
933 |
|
935 |
|
934 |
|
936 |
|
935 |
|
937 |
|
|
|
||
938 |
|
940 |
|
939 |
|
941 |
|
940 |
|
942 |
|
941 |
|
|
|
|
943 |
|
|
942 |
|
944 |
|
943 |
|
945 |
|
944 |
|
|
|
945 |
|
|
|
|
946 |
|
|
|
947 |
|
|
|
948 |
|
|
946 |
|
949 |
|
947 |
|
950 |
|
948 |
|
951 |
|
|
|
||
103 |
|
103 |
|
104 |
|
104 |
|
105 |
|
105 |
|
|
106 |
|
|
|
107 |
|
|
|
108 |
|
|
|
109 |
|
|
106 |
|
110 |
|
107 |
|
111 |
|
108 |
|
112 |
|
109 |
|
113 |
|
|
114 |
|
|
|
115 |
|
|
|
116 |
|
|
|
117 |
|
|
|
118 |
|
|
|
119 |
|
|
|
120 |
|
|
|
121 |
|
|
|
122 |
|
|
|
123 |
|
|
|
124 |
|
|
|
125 |
|
|
|
126 |
|
|
|
127 |
|
|
|
128 |
|
|
|
129 |
|
|
|
130 |
|
|
|
131 |
|
|
|
132 |
|
|
110 |
|
133 |
|
111 |
|
134 |
|
112 |
|
135 |
|
|
|
||
117 |
|
140 |
|
118 |
|
141 |
|
119 |
|
142 |
|
120 |
|
|
|
121 |
|
143 |
|
122 |
|
144 |
|
123 |
|
145 |
|
|
|
||
292 |
|
314 |
|
293 |
|
315 |
|
294 |
|
316 |
|
295 |
|
|
|
296 |
|
317 |
|
297 |
|
318 |
|
298 |
|
319 |
|
299 |
|
|
|
|
320 |
|
|
300 |
|
321 |
|
301 |
|
322 |
|
302 |
|
323 |
|
|
|
||
325 |
|
346 |
|
326 |
|
347 |
|
327 |
|
348 |
|
328 |
|
|
|
329 |
|
|
|
330 |
|
|
|
331 |
|
|
|
332 |
|
|
|
333 |
|
|
|
334 |
|
|
|
335 |
|
|
|
336 |
|
|
|
337 |
|
|
|
338 |
|
|
|
339 |
|
|
|
340 |
|
|
|
|
349 |
|
|
|
350 |
|
|
|
351 |
|
|
341 |
|
352 |
|
342 |
|
353 |
|
343 |
|
354 |
|
|
|
||
357 |
|
368 |
|
358 |
|
369 |
|
359 |
|
370 |
|
360 |
|
|
|
361 |
|
371 |
|
362 |
|
372 |
|
363 |
|
373 |
|
|
|
||
367 |
|
377 |
|
368 |
|
378 |
|
369 |
|
379 |
|
370 |
|
|
|
|
380 |
|
|
371 |
|
381 |
|
372 |
|
|
|
|
382 |
|
|
|
383 |
|
|
373 |
|
384 |
|
374 |
|
385 |
|
375 |
|
386 |
|
|
|
||
1045 |
|
1056 |
|
1046 |
|
1057 |
|
1047 |
|
1058 |
|
1048 |
|
|
|
|
1059 |
|
|
1049 |
|
1060 |
|
1050 |
|
1061 |
|
1051 |
|
1062 |
|
|
|
||
1109 |
|
1120 |
|
1110 |
|
1121 |
|
1111 |
|
1122 |
|
1112 |
|
|
|
|
1123 |
|
|
1113 |
|
1124 |
|
1114 |
|
1125 |
|
1115 |
|
1126 |
|
1116 |
|
1127 |
|
1117 |
|
1128 |
|
1118 |
|
1129 |
|
1119 |
|
|
|
|
1130 |
|
|
1120 |
|
1131 |
|
1121 |
|
1132 |
|
1122 |
|
1133 |
|
|
|
||
1126 |
|
1137 |
|
1127 |
|
1138 |
|
1128 |
|
1139 |
|
1129 |
|
|
|
|
1140 |
|
|
1130 |
|
1141 |
|
1131 |
|
1142 |
|
1132 |
|
1143 |
|
1133 |
|
1144 |
|
1134 |
|
1145 |
|
1135 |
|
1146 |
|
1136 |
|
|
|
|
1147 |
|
|
1137 |
|
1148 |
|
1138 |
|
1149 |
|
1139 |
|
1150 |
|
|
|
||
1172 |
|
1183 |
|
1173 |
|
1184 |
|
1174 |
|
1185 |
|
1175 |
|
|
|
1176 |
|
|
|
1177 |
|
|
|
|
1186 |
|
|
|
1187 |
|
|
|
1188 |
|
|
|
1189 |
|
|
1178 |
|
1190 |
|
1179 |
|
1191 |
|
1180 |
|
1192 |
|
|
|
||
1184 |
|
1196 |
|
1185 |
|
1197 |
|
1186 |
|
1198 |
|
1187 |
|
|
|
1188 |
|
|
|
1189 |
|
|
|
|
1199 |
|
|
|
1200 |
|
|
|
1201 |
|
|
|
1202 |
|
|
1190 |
|
1203 |
|
1191 |
|
1204 |
|
1192 |
|
1205 |
|
1193 |
|
1206 |
|
1194 |
|
|
|
1195 |
|
|
|
1196 |
|
|
|
|
1207 |
|
|
|
1208 |
|
|
|
1209 |
|
|
|
1210 |
|
|
1197 |
|
1211 |
|
1198 |
|
1212 |
|
1199 |
|
1213 |
|
|
|
||
1243 |
|
1257 |
|
1244 |
|
1258 |
|
1245 |
|
1259 |
|
1246 |
|
|
|
|
1260 |
|
|
1247 |
|
1261 |
|
1248 |
|
1262 |
|
1249 |
|
1263 |
|
1250 |
|
1264 |
|
1251 |
|
1265 |
|
1252 |
|
1266 |
|
1253 |
|
|
|
|
1267 |
|
|
1254 |
|
1268 |
|
1255 |
|
1269 |
|
1256 |
|
1270 |
|
|
|
||
1267 |
|
1281 |
|
1268 |
|
1282 |
|
1269 |
|
1283 |
|
1270 |
|
|
|
|
1284 |
|
|
1271 |
|
1285 |
|
1272 |
|
1286 |
|
1273 |
|
1287 |
|
1274 |
|
1288 |
|
1275 |
|
|
|
|
1289 |
|
|
1276 |
|
1290 |
|
1277 |
|
1291 |
|
1278 |
|
1292 |
|
1279 |
|
1293 |
|
1280 |
|
|
|
|
1294 |
|
|
1281 |
|
1295 |
|
1282 |
|
1296 |
|
1283 |
|
1297 |
|
|
|
||
1324 |
|
1338 |
|
1325 |
|
1339 |
|
1326 |
|
1340 |
|
1327 |
|
|
|
|
1341 |
|
|
1328 |
|
1342 |
|
1329 |
|
1343 |
|
1330 |
|
1344 |
|
1331 |
|
1345 |
|
1332 |
|
1346 |
|
1333 |
|
|
|
1334 |
|
|
|
1335 |
|
|
|
|
1347 |
|
|
|
1348 |
|
|
|
1349 |
|
|
1336 |
|
1350 |
|
1337 |
|
1351 |
|
1338 |
|
1352 |
|
|
|
||
1342 |
|
1356 |
|
1343 |
|
1357 |
|
1344 |
|
1358 |
|
1345 |
|
|
|
1346 |
|
|
|
1347 |
|
|
|
|
1359 |
|
|
|
1360 |
|
|
|
1361 |
|
|
1348 |
|
1362 |
|
1349 |
|
1363 |
|
1350 |
|
1364 |
|
|
|
||
1352 |
|
1366 |
|
1353 |
|
1367 |
|
1354 |
|
1368 |
|
1355 |
|
|
|
|
1369 |
|
|
1356 |
|
1370 |
|
1357 |
|
1371 |
|
1358 |
|
1372 |
|
|
|
||
1365 |
|
1379 |
|
1366 |
|
1380 |
|
1367 |
|
1381 |
|
1368 |
|
|
|
1369 |
|
|
|
1370 |
|
|
|
|
1382 |
|
|
|
1383 |
|
|
|
1384 |
|
|
|
1385 |
|
|
|
1386 |
|
|
|
1387 |
|
|
|
1388 |
|
|
|
1389 |
|
|
|
1390 |
|
|
|
1391 |
|
|
|
1392 |
|
|
|
1393 |
|
|
|
1394 |
|
|
|
1395 |
|
|
|
1396 |
|
|
|
1397 |
|
|
|
1398 |
|
|
|
1399 |
|
|
|
1400 |
|
|
|
1401 |
|
|
|
1402 |
|
|
|
1403 |
|
|
|
1404 |
|
|
|
1405 |
|
|
|
1406 |
|
|
1371 |
|
1407 |
|
1372 |
|
1408 |
|
1373 |
|
1409 |
|
|
|
||
1435 |
|
1471 |
|
1436 |
|
1472 |
|
1437 |
|
1473 |
|
1438 |
|
|
|
|
1474 |
|
|
1439 |
|
1475 |
|
1440 |
|
1476 |
|
1441 |
|
1477 |
|
|
|
||
65 |
|
65 |
|
66 |
|
66 |
|
67 |
|
67 |
|
68 |
|
|
|
|
68 |
|
|
69 |
|
69 |
|
70 |
|
70 |
|
71 |
|
71 |
|
|
|
||
330 |
|
330 |
|
331 |
|
331 |
|
332 |
|
332 |
|
|
333 |
|
|
|
334 |
|
|
333 |
|
335 |
|
334 |
|
336 |
|
335 |
|
337 |
|
336 |
|
338 |
|
337 |
|
339 |
|
|
340 |
|
|
338 |
|
341 |
|
339 |
|
342 |
|
340 |
|
343 |
|
|
|
||
49 |
|
49 |
|
50 |
|
50 |
|
51 |
|
51 |
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
|
52 |
|
57 |
|
53 |
|
58 |
|
54 |
|
|
|
||
1479 |
|
1475 |
|
1480 |
|
1476 |
|
1481 |
|
1477 |
|
1482 |
|
|
|
|
1478 |
|
|
1483 |
|
1479 |
|
1484 |
|
1480 |
|
1485 |
|
1481 |
|
|
|
||
2454 |
|
2450 |
|
2455 |
|
2451 |
|
2456 |
|
2452 |
|
2457 |
|
|
|
2458 |
|
|
|
2459 |
|
|
|
2460 |
|
|
|
2461 |
|
|
|
|
2453 |
|
|
|
2454 |
|
|
|
2455 |
|
|
2462 |
|
2456 |
|
2463 |
|
2457 |
|
2464 |
|
2458 |
|
|
|
||
179 |
|
179 |
|
180 |
|
180 |
|
181 |
|
181 |
|
182 |
|
|
|
|
182 |
|
|
183 |
|
183 |
|
184 |
|
184 |
|
185 |
|
185 |
|