Lines Matching refs:p
19 static int nested_parse(unsigned char **const p,
25 unsigned char *const start = *p;
40 TEST_EQUAL(mbedtls_asn1_get_tag(p, end, &len2, tag ^ 1),
42 *p = start;
43 TEST_EQUAL(mbedtls_asn1_get_tag(p, end, &len2, tag), 0);
45 TEST_ASSERT(*p == content_start);
46 *p = content_start;
52 *p = start;
53 ret = mbedtls_asn1_get_bool(p, end, &val);
65 *p = start;
66 ret = mbedtls_asn1_get_mpi(p, end, &mpi);
69 *p = start + 1;
70 ret = mbedtls_asn1_get_len(p, end, &len);
71 *p += len;
79 TEST_ASSERT(*p == q);
87 *p = start;
88 ret = mbedtls_asn1_get_bitstring(p, end, &bs);
94 while (*p <= end && *p < content_start + len && ret == 0) {
95 ret = nested_parse(p, content_start + len);
114 *p += len;
118 TEST_ASSERT(*p <= end);
129 unsigned char *p = NULL;
140 p = end;
149 p = buf;
153 ret = mbedtls_asn1_get_len(&p, end, &parsed_length);
157 TEST_ASSERT(p == buf + input->len);
237 unsigned char *p = NULL;
252 p = buf;
253 ret = nested_parse(&p, buf + buffer_size);
268 TEST_ASSERT(p == buf + input->len);
310 unsigned char *p = input->x;
313 ret = mbedtls_asn1_get_bool(&p, input->x + input->len, &val);
317 TEST_ASSERT(p == input->x + input->len);
325 unsigned char *p;
336 p = input->x;
337 TEST_EQUAL(mbedtls_asn1_get_int(&p, input->x + input->len, &val),
343 p = input->x;
344 TEST_EQUAL(mbedtls_asn1_get_mpi(&p, input->x + input->len, &actual_mpi),
361 unsigned char *p;
399 p = input->x;
400 ret = mbedtls_asn1_get_int(&p, input->x + input->len, &val);
404 TEST_ASSERT(p == input->x + input->len);
414 p = input->x;
415 ret = mbedtls_asn1_get_mpi(&p, input->x + input->len, &actual_mpi);
443 TEST_ASSERT(p == input->x + input->len);
461 unsigned char *p;
487 p = input->x;
488 ret = mbedtls_asn1_get_enum(&p, input->x + input->len, &val);
492 TEST_ASSERT(p == input->x + input->len);
501 unsigned char *p;
518 p = buf;
519 TEST_EQUAL(mbedtls_asn1_get_mpi(&p, buf + size, &actual_mpi),
534 unsigned char *p = input->x;
536 TEST_EQUAL(mbedtls_asn1_get_bitstring(&p, input->x + input->len, &bs),
541 TEST_ASSERT(bs.p != NULL);
542 TEST_EQUAL(bs.p - input->x + bs.len, input->len);
543 TEST_ASSERT(p == input->x + input->len);
546 p = input->x;
547 TEST_EQUAL(mbedtls_asn1_get_bitstring_null(&p, input->x + input->len,
553 TEST_ASSERT(p == input->x + input->len - bs.len);
573 unsigned char *p = input->x;
578 TEST_EQUAL(mbedtls_asn1_get_sequence_of(&p, input->x + input->len,
582 TEST_ASSERT(p == input->x + input->len);
586 TEST_ASSERT(head.buf.p == NULL);
596 TEST_EQUAL(n, (size_t) (cur->buf.p - input->x));
629 unsigned char *p = input->x;
633 ret = mbedtls_asn1_traverse_sequence_of(&p, input->x + input->len,
654 unsigned char *p = input->x;
657 TEST_EQUAL(mbedtls_asn1_get_alg(&p, input->x + input->len,
662 TEST_EQUAL(oid.p - input->x, oid_offset);
666 TEST_EQUAL(params.p - input->x, params_offset);
668 TEST_ASSERT(params.p == NULL);
671 TEST_EQUAL(p - input->x, total_length);
674 ret = mbedtls_asn1_get_alg_null(&p, input->x + input->len, &oid);
677 TEST_EQUAL(oid.p - input->x, oid_offset);
679 TEST_EQUAL(p - input->x, total_length);
732 ASSERT_ALLOC(head.oid.p, 1);
735 ASSERT_ALLOC(head.val.p, 1);
742 TEST_ASSERT(head.oid.p == NULL);
743 TEST_ASSERT(head.val.p == NULL);
748 mbedtls_free(head.oid.p);
749 mbedtls_free(head.val.p);