Lines Matching refs:buf
18 unsigned char buf[150];
24 memset( buf, GUARD_VAL, sizeof( buf ) );
29 p = buf + GUARD_LEN + buf_len;
31 ret = mbedtls_asn1_write_octet_string( &p, buf + GUARD_LEN, str, str_len );
36 TEST_ASSERT( buf[i] == GUARD_VAL );
37 TEST_ASSERT( buf[GUARD_LEN + buf_len + i] == GUARD_VAL );
43 TEST_ASSERT( p + asn1_len == buf + GUARD_LEN + buf_len );
55 unsigned char buf[150];
60 memset( buf, GUARD_VAL, sizeof( buf ) );
65 p = buf + GUARD_LEN + buf_len;
67 ret = mbedtls_asn1_write_ia5_string( &p, buf + GUARD_LEN, str, str_len );
72 TEST_ASSERT( buf[i] == GUARD_VAL );
73 TEST_ASSERT( buf[GUARD_LEN + buf_len + i] == GUARD_VAL );
79 TEST_ASSERT( p + asn1_len == buf + GUARD_LEN + buf_len );
91 unsigned char buf[150];
96 memset( buf, GUARD_VAL, sizeof( buf ) );
100 p = buf + GUARD_LEN + buf_len;
102 ret = mbedtls_asn1_write_len( &p, buf + GUARD_LEN, (size_t) len );
109 TEST_ASSERT( buf[i] == GUARD_VAL );
110 TEST_ASSERT( buf[GUARD_LEN + buf_len + i] == GUARD_VAL );
116 TEST_ASSERT( p + asn1_len == buf + GUARD_LEN + buf_len );
121 ret = mbedtls_asn1_get_len( &p, buf + GUARD_LEN + buf_len, &read_len );
135 TEST_ASSERT( p == buf + GUARD_LEN + buf_len );