Lines Matching refs:buf_len
33 size_t *buf_len, int is_public_key, int is_der)
39 ret = mbedtls_pk_write_pubkey_der(pk, *p, *buf_len);
41 ret = mbedtls_pk_write_key_der(pk, *p, *buf_len);
47 *p = *p + *buf_len - ret;
48 *buf_len = ret;
52 ret = mbedtls_pk_write_pubkey_pem(pk, *p, *buf_len);
54 ret = mbedtls_pk_write_key_pem(pk, *p, *buf_len);
60 *buf_len = strlen((char *) *p) + 1; /* +1 takes the string terminator into account */
76 size_t buf_len, check_buf_len;
113 buf_len = check_buf_len;
121 for (size_t i = 1; i < buf_len; i++) {
125 TEST_EQUAL(pk_write_any_key(&key, &start_buf, &buf_len, is_public_key,
128 TEST_MEMORY_COMPARE(start_buf, buf_len, check_buf, check_buf_len);
142 buf_len = check_buf_len;
145 for (size_t i = 1; i < buf_len; i++) {
149 TEST_EQUAL(pk_write_any_key(&key, &start_buf, &buf_len, is_public_key,
152 TEST_MEMORY_COMPARE(start_buf, buf_len, check_buf, check_buf_len);