Lines Matching defs:att

238 asn1_invtime_test(int test_no, const struct asn1_time_test *att, int gen)
252 if (ASN1_GENERALIZEDTIME_set_string(gt, att->str) != 0) {
254 "GENERALIZEDTIME string '%s'\n", test_no, att->str);
263 if (ASN1_UTCTIME_set_string(ut, att->str) != 0) {
265 "string '%s'\n", test_no, att->str);
268 if (ASN1_TIME_set_string(t, att->str) != 0) {
270 "string '%s'\n", test_no, att->str);
273 if (ASN1_TIME_set_string_X509(t, att->str) != 0) {
275 "string '%s'\n", test_no, att->str);
290 asn1_gentime_test(int test_no, const struct asn1_time_test *att)
300 if (ASN1_GENERALIZEDTIME_set_string(NULL, att->str) != 1) {
302 test_no, att->str);
309 if (ASN1_GENERALIZEDTIME_set_string(gt, att->str) != 1) {
311 test_no, att->str);
314 if (asn1_compare_str(test_no, gt, att->str) != 0)
319 test_no, att->str);
329 if (t != att->time) {
331 int64_t a = t, b = att->time;
344 der = att->der;
348 len = strlen(att->der);
354 if (asn1_compare_str(test_no, gt, att->str) != 0)
359 if ((gt = ASN1_GENERALIZEDTIME_set(NULL, att->time)) == NULL) {
361 test_no, (long long)att->time);
364 if (asn1_compare_str(test_no, gt, att->data) != 0)
377 asn1_utctime_test(int test_no, const struct asn1_time_test *att)
385 if (ASN1_UTCTIME_set_string(NULL, att->str) != 1) {
387 test_no, att->str);
394 if (ASN1_UTCTIME_set_string(ut, att->str) != 1) {
396 test_no, att->str);
399 if (asn1_compare_str(test_no, ut, att->str) != 0)
407 der = att->der;
411 len = strlen(att->der);
417 if (asn1_compare_str(test_no, ut, att->str) != 0)
422 if ((ut = ASN1_UTCTIME_set(NULL, att->time)) == NULL) {
424 test_no, (long long)att->time);
427 if (asn1_compare_str(test_no, ut, att->data) != 0)
440 asn1_time_test(int test_no, const struct asn1_time_test *att, int type)
446 if (ASN1_TIME_set_string(NULL, att->str) != 1) {
448 test_no, att->str);
458 switch (strlen(att->str)) {
461 if (ASN1_UTCTIME_set_string(t, att->str) != 1) {
464 test_no, att->str);
470 if (ASN1_GENERALIZEDTIME_set_string(t, att->str) != 1) {
473 test_no, att->str);
493 test_no, att->str);
838 const struct asn1_time_test *att;
844 att = &asn1_invtime_tests[i];
845 failed |= asn1_invtime_test(i, att, 0);
850 att = &asn1_invgentime_tests[i];
851 failed |= asn1_invtime_test(i, att, 1);
856 att = &asn1_gentime_tests[i];
857 failed |= asn1_gentime_test(i, att);
862 att = &asn1_utctime_tests[i];
863 failed |= asn1_utctime_test(i, att);
868 att = &asn1_utctime_tests[i];
869 failed |= asn1_time_test(i, att, V_ASN1_UTCTIME);
872 att = &asn1_gentime_tests[i];
873 failed |= asn1_time_test(i, att, V_ASN1_GENERALIZEDTIME);