We currently compare the entirety of the KeyHash object (including the ASN.1 tag and length byte) against the raw SHA-1 hash of the certificate's public key. This causes OCSP validation to fail for any responses which identify the responder by key hash rather than by name, and hence prevents the use of X.509 certificates where any certificate in the chain has an OCSP responder which chooses to identify itself via its key hash. Fix by adding the missing asn1_enter() required to enter the ASN.1 octet string containing the key hash. Also add a corresponding test case including an OCSP response where the responder is identified by key hash, to ensure that this functionality cannot be broken in future. Debugged-by: Brian Rak <brak@gameservers.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
405 |
|
405 |
|
406 |
|
406 |
|
407 |
|
407 |
|
|
408 |
|
|
408 |
|
409 |
|
409 |
|
410 |
|
410 |
|
411 |
|
411 |
|
412 |
|
|
413 |
|
|
|
414 |
|
|
|
415 |
|
|
|
416 |
|
|
412 |
|
417 |
|
413 |
|
|
|
|
418 |
|
|
414 |
|
419 |
|
415 |
|
420 |
|
416 |
|
421 |
|
|
|
||
421 |
|
426 |
|
422 |
|
427 |
|
423 |
|
428 |
|
424 |
|
|
|
425 |
|
|
|
|
429 |
|
|
|
430 |
|
|
426 |
|
431 |
|
427 |
|
432 |
|
428 |
|
433 |
|
|
|
||
825 |
|
825 |
|
826 |
|
826 |
|
827 |
|
827 |
|
|
828 |
|
|
|
829 |
|
|
|
830 |
|
|
|
831 |
|
|
|
832 |
|
|
|
833 |
|
|
|
834 |
|
|
|
835 |
|
|
|
836 |
|
|
|
837 |
|
|
|
838 |
|
|
|
839 |
|
|
|
840 |
|
|
|
841 |
|
|
|
842 |
|
|
|
843 |
|
|
|
844 |
|
|
|
845 |
|
|
|
846 |
|
|
|
847 |
|
|
|
848 |
|
|
|
849 |
|
|
|
850 |
|
|
|
851 |
|
|
|
852 |
|
|
|
853 |
|
|
|
854 |
|
|
|
855 |
|
|
|
856 |
|
|
|
857 |
|
|
|
858 |
|
|
|
859 |
|
|
|
860 |
|
|
|
861 |
|
|
|
862 |
|
|
|
863 |
|
|
|
864 |
|
|
|
865 |
|
|
|
866 |
|
|
|
867 |
|
|
|
868 |
|
|
|
869 |
|
|
|
870 |
|
|
|
871 |
|
|
|
872 |
|
|
|
873 |
|
|
|
874 |
|
|
|
875 |
|
|
|
876 |
|
|
|
877 |
|
|
|
878 |
|
|
|
879 |
|
|
|
880 |
|
|
|
881 |
|
|
|
882 |
|
|
|
883 |
|
|
|
884 |
|
|
|
885 |
|
|
|
886 |
|
|
|
887 |
|
|
|
888 |
|
|
|
889 |
|
|
|
890 |
|
|
|
891 |
|
|
|
892 |
|
|
|
893 |
|
|
|
894 |
|
|
|
895 |
|
|
|
896 |
|
|
|
897 |
|
|
|
898 |
|
|
|
899 |
|
|
|
900 |
|
|
|
901 |
|
|
|
902 |
|
|
|
903 |
|
|
|
904 |
|
|
|
905 |
|
|
|
906 |
|
|
|
907 |
|
|
|
908 |
|
|
|
909 |
|
|
|
910 |
|
|
|
911 |
|
|
|
912 |
|
|
|
913 |
|
|
|
914 |
|
|
|
915 |
|
|
|
916 |
|
|
|
917 |
|
|
|
918 |
|
|
|
919 |
|
|
|
920 |
|
|
|
921 |
|
|
|
922 |
|
|
|
923 |
|
|
|
924 |
|
|
|
925 |
|
|
|
926 |
|
|
|
927 |
|
|
|
928 |
|
|
|
929 |
|
|
|
930 |
|
|
|
931 |
|
|
|
932 |
|
|
|
933 |
|
|
|
934 |
|
|
|
935 |
|
|
|
936 |
|
|
|
937 |
|
|
|
938 |
|
|
|
939 |
|
|
|
940 |
|
|
|
941 |
|
|
|
942 |
|
|
|
943 |
|
|
|
944 |
|
|
|
945 |
|
|
|
946 |
|
|
|
947 |
|
|
|
948 |
|
|
|
949 |
|
|
|
950 |
|
|
|
951 |
|
|
|
952 |
|
|
|
953 |
|
|
|
954 |
|
|
|
955 |
|
|
|
956 |
|
|
|
957 |
|
|
|
958 |
|
|
|
959 |
|
|
|
960 |
|
|
|
961 |
|
|
|
962 |
|
|
|
963 |
|
|
|
964 |
|
|
|
965 |
|
|
|
966 |
|
|
|
967 |
|
|
|
968 |
|
|
|
969 |
|
|
|
970 |
|
|
|
971 |
|
|
|
972 |
|
|
|
973 |
|
|
|
974 |
|
|
|
975 |
|
|
|
976 |
|
|
|
977 |
|
|
|
978 |
|
|
|
979 |
|
|
|
980 |
|
|
|
981 |
|
|
|
982 |
|
|
|
983 |
|
|
|
984 |
|
|
|
985 |
|
|
|
986 |
|
|
|
987 |
|
|
|
988 |
|
|
|
989 |
|
|
|
990 |
|
|
|
991 |
|
|
|
992 |
|
|
|
993 |
|
|
|
994 |
|
|
|
995 |
|
|
|
996 |
|
|
|
997 |
|
|
|
998 |
|
|
|
999 |
|
|
|
1000 |
|
|
|
1001 |
|
|
|
1002 |
|
|
|
1003 |
|
|
|
1004 |
|
|
|
1005 |
|
|
|
1006 |
|
|
|
1007 |
|
|
|
1008 |
|
|
|
1009 |
|
|
|
1010 |
|
|
|
1011 |
|
|
|
1012 |
|
|
|
1013 |
|
|
|
1014 |
|
|
|
1015 |
|
|
|
1016 |
|
|
|
1017 |
|
|
|
1018 |
|
|
|
1019 |
|
|
|
1020 |
|
|
|
1021 |
|
|
|
1022 |
|
|
|
1023 |
|
|
|
1024 |
|
|
|
1025 |
|
|
|
1026 |
|
|
|
1027 |
|
|
|
1028 |
|
|
|
1029 |
|
|
|
1030 |
|
|
|
1031 |
|
|
|
1032 |
|
|
|
1033 |
|
|
|
1034 |
|
|
|
1035 |
|
|
|
1036 |
|
|
|
1037 |
|
|
|
1038 |
|
|
|
1039 |
|
|
|
1040 |
|
|
|
1041 |
|
|
|
1042 |
|
|
|
1043 |
|
|
|
1044 |
|
|
|
1045 |
|
|
|
1046 |
|
|
|
1047 |
|
|
|
1048 |
|
|
|
1049 |
|
|
|
1050 |
|
|
|
1051 |
|
|
|
1052 |
|
|
|
1053 |
|
|
|
1054 |
|
|
|
1055 |
|
|
|
1056 |
|
|
|
1057 |
|
|
|
1058 |
|
|
|
1059 |
|
|
|
1060 |
|
|
|
1061 |
|
|
|
1062 |
|
|
|
1063 |
|
|
|
1064 |
|
|
|
1065 |
|
|
|
1066 |
|
|
|
1067 |
|
|
|
1068 |
|
|
|
1069 |
|
|
|
1070 |
|
|
|
1071 |
|
|
|
1072 |
|
|
|
1073 |
|
|
|
1074 |
|
|
828 |
|
1075 |
|
829 |
|
1076 |
|
830 |
|
1077 |
|
|
|
||
1301 |
|
1548 |
|
1302 |
|
1549 |
|
1303 |
|
1550 |
|
|
1551 |
|
|
|
1552 |
|
|
|
1553 |
|
|
|
1554 |
|
|
|
1555 |
|
|
|
1556 |
|
|
|
1557 |
|
|
|
1558 |
|
|
|
1559 |
|
|
|
1560 |
|
|
|
1561 |
|
|
|
1562 |
|
|
|
1563 |
|
|
|
1564 |
|
|
|
1565 |
|
|
|
1566 |
|
|
|
1567 |
|
|
|
1568 |
|
|
|
1569 |
|
|
|
1570 |
|
|
|
1571 |
|
|
|
1572 |
|
|
|
1573 |
|
|
|
1574 |
|
|
|
1575 |
|
|
|
1576 |
|
|
|
1577 |
|
|
|
1578 |
|
|
|
1579 |
|
|
|
1580 |
|
|
|
1581 |
|
|
|
1582 |
|
|
|
1583 |
|
|
|
1584 |
|
|
|
1585 |
|
|
|
1586 |
|
|
|
1587 |
|
|
|
1588 |
|
|
|
1589 |
|
|
|
1590 |
|
|
|
1591 |
|
|
|
1592 |
|
|
|
1593 |
|
|
|
1594 |
|
|
|
1595 |
|
|
|
1596 |
|
|
|
1597 |
|
|
|
1598 |
|
|
|
1599 |
|
|
|
1600 |
|
|
|
1601 |
|
|
|
1602 |
|
|
|
1603 |
|
|
|
1604 |
|
|
|
1605 |
|
|
|
1606 |
|
|
|
1607 |
|
|
|
1608 |
|
|
|
1609 |
|
|
|
1610 |
|
|
|
1611 |
|
|
|
1612 |
|
|
|
1613 |
|
|
|
1614 |
|
|
|
1615 |
|
|
|
1616 |
|
|
|
1617 |
|
|
|
1618 |
|
|
|
1619 |
|
|
|
1620 |
|
|
|
1621 |
|
|
|
1622 |
|
|
|
1623 |
|
|
|
1624 |
|
|
|
1625 |
|
|
|
1626 |
|
|
|
1627 |
|
|
|
1628 |
|
|
|
1629 |
|
|
|
1630 |
|
|
|
1631 |
|
|
|
1632 |
|
|
|
1633 |
|
|
|
1634 |
|
|
|
1635 |
|
|
|
1636 |
|
|
|
1637 |
|
|
|
1638 |
|
|
|
1639 |
|
|
|
1640 |
|
|
|
1641 |
|
|
|
1642 |
|
|
|
1643 |
|
|
|
1644 |
|
|
|
1645 |
|
|
|
1646 |
|
|
|
1647 |
|
|
|
1648 |
|
|
|
1649 |
|
|
|
1650 |
|
|
|
1651 |
|
|
|
1652 |
|
|
|
1653 |
|
|
|
1654 |
|
|
|
1655 |
|
|
|
1656 |
|
|
|
1657 |
|
|
|
1658 |
|
|
|
1659 |
|
|
|
1660 |
|
|
|
1661 |
|
|
|
1662 |
|
|
|
1663 |
|
|
|
1664 |
|
|
|
1665 |
|
|
|
1666 |
|
|
|
1667 |
|
|
|
1668 |
|
|
|
1669 |
|
|
|
1670 |
|
|
|
1671 |
|
|
|
1672 |
|
|
|
1673 |
|
|
|
1674 |
|
|
|
1675 |
|
|
|
1676 |
|
|
|
1677 |
|
|
|
1678 |
|
|
|
1679 |
|
|
|
1680 |
|
|
|
1681 |
|
|
|
1682 |
|
|
|
1683 |
|
|
|
1684 |
|
|
|
1685 |
|
|
|
1686 |
|
|
|
1687 |
|
|
|
1688 |
|
|
|
1689 |
|
|
|
1690 |
|
|
|
1691 |
|
|
|
1692 |
|
|
|
1693 |
|
|
|
1694 |
|
|
|
1695 |
|
|
|
1696 |
|
|
|
1697 |
|
|
|
1698 |
|
|
|
1699 |
|
|
1304 |
|
1700 |
|
1305 |
|
1701 |
|
1306 |
|
1702 |
|
1307 |
|
1703 |
|
1308 |
|
1704 |
|
1309 |
|
1705 |
|
|
1706 |
|
|
|
1707 |
|
|
|
1708 |
|
|
1310 |
|
1709 |
|
1311 |
|
1710 |
|
1312 |
|
1711 |
|
|
|
||
1398 |
|
1797 |
|
1399 |
|
1798 |
|
1400 |
|
1799 |
|
|
1800 |
|
|
|
1801 |
|
|
1401 |
|
1802 |
|
1402 |
|
1803 |
|
1403 |
|
1804 |
|
1404 |
|
1805 |
|
1405 |
|
1806 |
|
1406 |
|
1807 |
|
|
1808 |
|
|
1407 |
|
1809 |
|
1408 |
|
1810 |
|
1409 |
|
1811 |
|
|
|
||
1425 |
|
1827 |
|
1426 |
|
1828 |
|
1427 |
|
1829 |
|
|
1830 |
|
|
|
1831 |
|
|
|
1832 |
|
|
|
1833 |
|
|
|
1834 |
|
|
|
1835 |
|
|
1428 |
|
1836 |
|
1429 |
|
1837 |
|
1430 |
|
1838 |
|
1431 |
|
1839 |
|
1432 |
|
1840 |
|
|
1841 |
|
|
1433 |
|
1842 |
|
1434 |
|
1843 |
|
|
1844 |
|
|
|
1845 |
|
|
1435 |
|
1846 |
|
1436 |
|
1847 |
|
1437 |
|
1848 |
|