Lines Matching +full:2 +full:- +full:7
11 * 2. Redistributions in binary form must reproduce the above copyright
84 for (u_int i = 0; b->asn_len > i; i++) in save_g_errstr()
85 sprintf(sbuf + strlen(sbuf), " %02x", b->asn_cptr[i]); in save_g_errstr()
218 check_header("x1f:06:01:7f"_cbuf, ASN_ERR_FAILED,
219 "tags > 0x1e not supported (0x1f) at 1f 06 01 7f\n");
229 check_header("x46:83:00:00:02:7f:12"_cbuf, ASN_ERR_FAILED,
230 "long length too long (3) at 00 00 02 7f 12\n");
254 check_header("x04:7f:00"_cbuf, ASN_TYPE_OCTETSTRING, 127);
285 conv_err(2, 128, ASN_TYPE_OCTETSTRING, ASN_ERR_EOBUF, "");
288 conv_err(2, 0, 0x1f, ASN_ERR_FAILED,
290 conv_err(2, 0, 0xff, ASN_ERR_FAILED,
294 conv(2, 0, ASN_TYPE_OCTETSTRING, "x04:00"_cbuf);
337 conv("x46:01:7f"_cbuf, 0x7fULL);
341 conv("x46:02:7f:ff"_cbuf, 0x7fffULL);
345 conv("x46:03:7f:ff:ff"_cbuf, 0x7fffffULL);
349 conv("x46:04:7f:ff:ff:ff"_cbuf, 0x7fffffffULL);
353 conv("x46:05:7f:ff:ff:ff:ff"_cbuf, 0x7fffffffffULL);
357 conv("x46:06:7f:ff:ff:ff:ff:ff"_cbuf, 0x7fffffffffffULL);
361 conv("x46:07:7f:ff:ff:ff:ff:ff:ff"_cbuf, 0x7fffffffffffffULL);
365 conv("x46:08:7f:ff:ff:ff:ff:ff:ff:ff"_cbuf, 0x7fffffffffffffffULL);
373 "zero-length integer at\n");
378 "non-minimal unsigned at 00 00\n");
379 conv_err("x46:02:00:7f"_cbuf, ASN_ERR_BADLEN,
380 "non-minimal unsigned at 00 7f\n");
382 "non-minimal unsigned at 00 00 80\n");
384 "non-minimal unsigned at 00 00 80 00\n");
386 "non-minimal unsigned at 00 00 00 00 00 00 00 00 00 00\n");
388 "non-minimal unsigned at 00 01 00 00 00 00 00 00 00 00\n");
438 conv(3, 0x7f, "x46:01:7f"_cbuf);
442 conv(4, 0x7fff, "x46:02:7f:ff"_cbuf);
446 conv(5, 0x7fffff, "x46:03:7f:ff:ff"_cbuf);
450 conv(6, 0x7fffffff, "x46:04:7f:ff:ff:ff"_cbuf);
452 conv(7, 0x80000000, "x46:05:00:80:00:00:00"_cbuf);
453 conv(7, 0xffffffff, "x46:05:00:ff:ff:ff:ff"_cbuf);
454 conv(7, 0x7fffffffff, "x46:05:7f:ff:ff:ff:ff"_cbuf);
458 conv(8, 0x7fffffffffff, "x46:06:7f:ff:ff:ff:ff:ff"_cbuf);
462 conv(9, 0x7fffffffffffff, "x46:07:7f:ff:ff:ff:ff:ff:ff"_cbuf);
466 conv(10, 0x7fffffffffffffff, "x46:08:7f:ff:ff:ff:ff:ff:ff:ff"_cbuf);
478 conv_err(2, 0, ASN_ERR_EOBUF, "");
483 conv_err(7, 0x8000000000, ASN_ERR_EOBUF, "");
528 conv("x41:01:7f"_cbuf, 0x7fU);
532 conv("x41:02:7f:ff"_cbuf, 0x7fffU);
536 conv("x41:03:7f:ff:ff"_cbuf, 0x7fffffU);
540 conv("x41:04:7f:ff:ff:ff"_cbuf, 0x7fffffffU);
548 "zero-length integer at\n");
553 "non-minimal unsigned at 00 00\n");
554 conv_err("x41:02:00:7f"_cbuf, ASN_ERR_BADLEN,
555 "non-minimal unsigned at 00 7f\n");
557 "non-minimal unsigned at 00 00 80\n");
559 "non-minimal unsigned at 00 00 80 00\n");
561 "non-minimal unsigned at 00 00 00 00 00 00\n");
563 "non-minimal unsigned at 00 01 00 00 00 00\n");
615 conv(3, 0x7f, "x41:01:7f"_cbuf);
619 conv(4, 0x7fff, "x41:02:7f:ff"_cbuf);
623 conv(5, 0x7fffff, "x41:03:7f:ff:ff"_cbuf);
627 conv(6, 0x7fffffff, "x41:04:7f:ff:ff:ff"_cbuf);
629 conv(7, 0x80000000, "x41:05:00:80:00:00:00"_cbuf);
630 conv(7, 0xffffffff, "x41:05:00:ff:ff:ff:ff"_cbuf);
639 conv_err(2, 0, ASN_ERR_EOBUF, "");
685 conv("x02:01:7f"_cbuf, 0x7f);
686 conv("x02:01:ff"_cbuf, -0x1);
687 conv("x02:01:80"_cbuf, -0x80);
691 conv("x02:02:7f:ff"_cbuf, 0x7fff);
692 conv("x02:02:ff:7f"_cbuf, -0x81);
693 conv("x02:02:ff:01"_cbuf, -0xff);
694 conv("x02:02:ff:00"_cbuf, -0x100);
695 conv("x02:02:80:00"_cbuf, -0x8000);
699 conv("x02:03:7f:ff:ff"_cbuf, 0x7fffff);
700 conv("x02:03:ff:7f:ff"_cbuf, -0x8001);
701 conv("x02:03:ff:00:01"_cbuf, -0xffff);
702 conv("x02:03:ff:00:00"_cbuf, -0x10000);
703 conv("x02:03:80:00:00"_cbuf, -0x800000);
707 conv("x02:04:7f:ff:ff:ff"_cbuf, 0x7fffffff);
708 conv("x02:04:ff:7f:ff:ff"_cbuf, -0x800001);
709 conv("x02:04:ff:00:00:01"_cbuf, -0xffffff);
710 conv("x02:04:ff:00:00:00"_cbuf, -0x1000000);
711 conv("x02:04:80:00:00:00"_cbuf, -0x80000000);
716 "zero-length integer at\n");
725 "non-minimal integer at 00 00\n");
726 conv_err("x02:02:00:7f"_cbuf, ASN_ERR_BADLEN,
727 "non-minimal integer at 00 7f\n");
729 "non-minimal integer at 00 00 80\n");
731 "non-minimal integer at 00 00 80 00\n");
733 "non-minimal integer at 00 00 00 00 00 00\n");
735 "non-minimal integer at 00 01 00 00 00 00\n");
737 "non-minimal integer at ff 80\n");
739 "non-minimal integer at ff ff\n");
741 "non-minimal integer at ff 80 00\n");
743 "non-minimal integer at ff ff ff\n");
745 "non-minimal integer at ff 80 00 00\n");
747 "non-minimal integer at ff ff ff ff\n");
749 "non-minimal integer at ff 80 00 00 00 00\n");
751 "non-minimal integer at ff ff ff ff ff ff\n");
762 conv_err("x02:04:7f:ff:"_cbuf, ASN_ERR_EOBUF,
763 "truncated integer at 7f ff\n");
792 conv(3, 0x7f, "x02:01:7f"_cbuf);
793 conv(3, -0x1, "x02:01:ff"_cbuf);
794 conv(3, -0x80, "x02:01:80"_cbuf);
798 conv(4, 0x7fff, "x02:02:7f:ff"_cbuf);
799 conv(4, -0x81, "x02:02:ff:7f"_cbuf);
800 conv(4, -0xff, "x02:02:ff:01"_cbuf);
801 conv(4, -0x100, "x02:02:ff:00"_cbuf);
802 conv(4, -0x8000, "x02:02:80:00"_cbuf);
806 conv(5, 0x7fffff, "x02:03:7f:ff:ff"_cbuf);
807 conv(5, -0x8001, "x02:03:ff:7f:ff"_cbuf);
808 conv(5, -0xffff, "x02:03:ff:00:01"_cbuf);
809 conv(5, -0x10000, "x02:03:ff:00:00"_cbuf);
810 conv(5, -0x800000, "x02:03:80:00:00"_cbuf);
814 conv(6, 0x7fffffff, "x02:04:7f:ff:ff:ff"_cbuf);
815 conv(6, -0x800001, "x02:04:ff:7f:ff:ff"_cbuf);
816 conv(6, -0xffffff, "x02:04:ff:00:00:01"_cbuf);
817 conv(6, -0x1000000, "x02:04:ff:00:00:00"_cbuf);
818 conv(6, -0x80000000, "x02:04:80:00:00:00"_cbuf);
827 conv_err(2, 0, ASN_ERR_EOBUF, "");
832 conv_err(2, -0x80, ASN_ERR_EOBUF, "");
833 conv_err(3, -0x8000, ASN_ERR_EOBUF, "");
834 conv_err(4, -0x800000, ASN_ERR_EOBUF, "");
835 conv_err(5, -0x80000000, ASN_ERR_EOBUF, "");
874 conv("x06:01:00"_cbuf, asn_oid {2, {0, 0}});
875 conv("x06:01:28"_cbuf, asn_oid {2, {1, 0}});
876 conv("x06:01:50"_cbuf, asn_oid {2, {2, 0}});
878 conv("x06:01:27"_cbuf, asn_oid {2, {0, 39}});
879 conv("x06:01:4f"_cbuf, asn_oid {2, {1, 39}});
880 conv("x06:01:7f"_cbuf, asn_oid {2, {2, 47}});
882 conv("x06:02:81:00"_cbuf, asn_oid {2, {2, 48}});
883 conv("x06:02:ff:7f"_cbuf, asn_oid {2, {2, 16303}});
884 conv("x06:03:ff:ff:7f"_cbuf, asn_oid {2, {2, 2097071}});
885 conv("x06:04:ff:ff:ff:7f"_cbuf, asn_oid {2, {2, 268435375}});
886 conv("x06:05:8f:ff:ff:ff:7f"_cbuf, asn_oid {2, {2, 4294967215}});
889 …7b:8f:ff:ff:ff:7f:8f:ff:ff:ff:7f:8f:ff:ff:ff:7f:8f:ff:ff:ff:7f:8f:ff:ff:ff:7f:8f:ff:ff:ff:7f:8f:ff…
890 2, 4294967215, 4294967295, 4294967295,
931 conv_err("x06:04:07:7f:82:8e"_cbuf, ASN_ERR_EOBUF,
939 …7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c:7c…
967 conv(3, asn_oid {2, {0, 0}}, "x06:01:00"_cbuf);
968 conv(3, asn_oid {2, {1, 0}}, "x06:01:28"_cbuf);
969 conv(3, asn_oid {2, {2, 0}}, "x06:01:50"_cbuf);
971 conv(3, asn_oid {2, {0, 39}}, "x06:01:27"_cbuf);
972 conv(3, asn_oid {2, {1, 39}}, "x06:01:4f"_cbuf);
973 conv(3, asn_oid {2, {2, 47}}, "x06:01:7f"_cbuf);
975 conv(4, asn_oid {2, {2, 48}}, "x06:02:81:00"_cbuf);
976 conv(4, asn_oid {2, {2, 16303}}, "x06:02:ff:7f"_cbuf);
977 conv(5, asn_oid {2, {2, 2097071}}, "x06:03:ff:ff:7f"_cbuf);
978 conv(6, asn_oid {2, {2, 268435375}}, "x06:04:ff:ff:ff:7f"_cbuf);
979 conv(7, asn_oid {2, {2, 4294967215}}, "x06:05:8f:ff:ff:ff:7f"_cbuf);
981 SECTION("sub-id too large") {
982 conv_err(3, asn_oid {2, {3, 0}}, ASN_ERR_RANGE,
984 conv_err(3, asn_oid {2, {0, 40}}, ASN_ERR_RANGE,
986 conv_err(3, asn_oid {2, {1, 40}}, ASN_ERR_RANGE,
988 conv_err(3, asn_oid {2, {2, 4294967216}}, ASN_ERR_RANGE,
989 "oid out of range (2,4294967216)\n");
1005 conv(5 * (128 - 1) + 4, asn_oid {128, {
1006 2, 4294967215, 4294967295, 4294967295,
1038 …7b:8f:ff:ff:ff:7f:8f:ff:ff:ff:7f:8f:ff:ff:ff:7f:8f:ff:ff:ff:7f:8f:ff:ff:ff:7f:8f:ff:ff:ff:7f:8f:ff…