Lines Matching refs:ret
75 int i, ret;
86 ret = generic_test (tests, ntests, sizeof(int),
96 return ret;
102 int ret, dval;
114 ret = der_put_integer(buf + 1 + len - 1, len, &val, &len_len);
115 if (ret) {
116 printf("integer %d encode failed %d\n", val, ret);
121 val, ret, (unsigned long)len, (unsigned long)len_len);
125 ret = der_get_integer(buf + 1, len, &dval, &len_len);
126 if (ret) {
127 printf("integer %d decode failed %d\n", val, ret);
199 int i, ret;
210 ret = generic_test (tests, ntests, sizeof(int),
219 return ret;
243 int ret;
251 ret = generic_test (tests, ntests, sizeof(heim_octet_string),
259 return ret;
285 int ret;
298 ret = generic_test (tests, ntests, sizeof(heim_bmp_string),
307 return ret;
333 int ret;
346 ret = generic_test (tests, ntests, sizeof(heim_universal_string),
355 return ret;
375 int ret, ntests = sizeof(tests) / sizeof(*tests);
383 ret = generic_test (tests, ntests, sizeof(unsigned char *),
391 return ret;
411 int i, ret;
422 ret = generic_test (tests, ntests, sizeof(time_t),
431 return ret;
460 int i, ret;
471 ret = generic_test (tests, ntests, sizeof(heim_oid),
480 return ret;
498 int i, ret;
509 ret = generic_test (tests, ntests, sizeof(heim_bit_string),
518 return ret;
549 int i, ret;
562 ret = generic_test (tests, ntests, sizeof(heim_integer),
571 if (ret)
572 return ret;
575 ret = der_get_heim_integer(NULL, 0, &i2, &size);
576 if (ret)
600 int i, ret;
613 ret = generic_test (tests, ntests, sizeof(int),
622 if (ret)
623 return ret;
626 ret = der_get_heim_integer(NULL, 0, &i2, &size);
627 if (ret)
792 int ret;
794 ret = der_print_hex_heim_integer(i, &str);
795 if (ret)
796 errx(1, "der_print_hex_heim_integer: %d", ret);
801 ret = der_parse_hex_heim_integer(str, &i2);
802 if (ret)
803 errx(1, "der_parse_hex_heim_integer: %d", ret);
811 ret = der_parse_hex_heim_integer(p, &i2);
812 if (ret)
813 errx(1, "der_parse_hex_heim_integer: %d", ret);
852 int ret = 0;
854 ret += check_heim_integer_same(p, p, &bni);
855 ret += check_heim_integer_same("10", "10", &i);
856 ret += check_heim_integer_same("00000010", "10", &i);
857 ret += check_heim_integer_same("-10", "-10", &i2);
858 ret += check_heim_integer_same("-00000010", "-10", &i2);
859 ret += check_heim_integer_same("01", "01", &i3);
860 ret += check_heim_integer_same("1", "01", &i3);
867 ret++;
874 ret++;
877 return ret;
883 int ret;
887 ret = der_print_heim_oid(oid, ' ', &p);
888 if (ret) {
892 ret = strcmp(p, str);
893 if (ret) {
896 return ret;
899 ret = der_parse_heim_oid(p, " ", &o2);
900 if (ret) {
903 return ret;
906 ret = der_heim_oid_cmp(&o2, oid);
909 return ret;
918 int ret = 0;
920 ret += test_heim_oid_format_same("1 3 14 3 2 26", &sha1);
922 return ret;
928 int i, ret;
949 ret = der_get_general_string(foo[i].p, foo[i].len, &s, &size);
951 if (ret == 0)
955 if (ret)
969 int ret;
974 ret = der_heim_octet_string_cmp(&os1, &os2);
975 if (ret == 0)
981 ret = der_heim_octet_string_cmp(&os1, &os2);
982 if (ret == 0)
988 ret = der_heim_bit_string_cmp(&bs1, &bs2);
989 if (ret == 0)
995 ret = der_heim_bit_string_cmp(&bs1, &bs2);
996 if (ret == 0)
1004 ret = der_heim_bmp_string_cmp(&bs1, &bs2);
1005 if (ret == 0)
1013 ret = der_heim_universal_string_cmp(&us1, &us2);
1014 if (ret == 0)
1023 ret = der_heim_universal_string_cmp(&us1, &us2);
1024 if (ret != 0)
1037 int ret;
1039 ret = der_get_generalized_time((const unsigned char*)str, strlen(str),
1041 if (ret)
1058 int i, ret;
1065 ret = der_get_tag((const unsigned char*)tests[i].ptr,
1067 if (ret) {
1081 int ret = 0;
1083 ret += test_integer ();
1084 ret += test_integer_more();
1085 ret += test_unsigned ();
1086 ret += test_octet_string ();
1087 ret += test_bmp_string ();
1088 ret += test_universal_string ();
1089 ret += test_general_string ();
1090 ret += test_generalized_time ();
1091 ret += test_oid ();
1092 ret += test_bit_string();
1093 ret += test_heim_integer();
1094 ret += test_boolean();
1096 ret += check_fail_unsigned();
1097 ret += check_fail_integer();
1098 ret += check_fail_length();
1099 ret += check_fail_boolean();
1100 ret += check_fail_general_string();
1101 ret += check_fail_bmp_string();
1102 ret += check_fail_universal_string();
1103 ret += check_fail_heim_integer();
1104 ret += check_fail_generalized_time();
1105 ret += check_fail_oid();
1106 ret += check_fail_bitstring();
1107 ret += test_heim_int_format();
1108 ret += test_heim_oid_format();
1109 ret += check_trailing_nul();
1110 ret += test_misc_cmp();
1111 ret += corner_generalized_time();
1112 ret += corner_tag();
1114 return ret;