Lines Matching refs:c
166 unsigned char *c = buf + sizeof(buf); in mbedtls_x509write_crt_set_basic_constraints() local
177 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_int(&c, buf, in mbedtls_x509write_crt_set_basic_constraints()
180 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_bool(&c, buf, 1)); in mbedtls_x509write_crt_set_basic_constraints()
183 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); in mbedtls_x509write_crt_set_basic_constraints()
184 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(&c, buf, in mbedtls_x509write_crt_set_basic_constraints()
201 unsigned char *c = buf + sizeof(buf); in mbedtls_x509write_crt_set_key_identifier() local
210 mbedtls_pk_write_pubkey(&c, in mbedtls_x509write_crt_set_key_identifier()
236 c = buf + sizeof(buf) - 20; in mbedtls_x509write_crt_set_key_identifier()
239 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); in mbedtls_x509write_crt_set_key_identifier()
240 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(&c, buf, tag)); in mbedtls_x509write_crt_set_key_identifier()
243 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); in mbedtls_x509write_crt_set_key_identifier()
245 mbedtls_asn1_write_tag(&c, in mbedtls_x509write_crt_set_key_identifier()
285 unsigned char *c; in mbedtls_x509write_crt_set_key_usage() local
302 c = buf + 5; in mbedtls_x509write_crt_set_key_usage()
304 ret = mbedtls_asn1_write_named_bitstring(&c, buf, ku, 9); in mbedtls_x509write_crt_set_key_usage()
314 1, c, (size_t) ret); in mbedtls_x509write_crt_set_key_usage()
326 unsigned char *c = buf + sizeof(buf); in mbedtls_x509write_crt_set_ext_key_usage() local
346 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_raw_buffer(&c, buf, ext->buf.p, ext->buf.len)); in mbedtls_x509write_crt_set_ext_key_usage()
347 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, ext->buf.len)); in mbedtls_x509write_crt_set_ext_key_usage()
348 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(&c, buf, MBEDTLS_ASN1_OID)); in mbedtls_x509write_crt_set_ext_key_usage()
352 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); in mbedtls_x509write_crt_set_ext_key_usage()
354 mbedtls_asn1_write_tag(&c, buf, in mbedtls_x509write_crt_set_ext_key_usage()
360 1, c, len); in mbedtls_x509write_crt_set_ext_key_usage()
367 unsigned char *c; in mbedtls_x509write_crt_set_ns_cert_type() local
370 c = buf + 4; in mbedtls_x509write_crt_set_ns_cert_type()
372 ret = mbedtls_asn1_write_named_bitstring(&c, buf, &ns_cert_type, 8); in mbedtls_x509write_crt_set_ns_cert_type()
379 0, c, (size_t) ret); in mbedtls_x509write_crt_set_ns_cert_type()
423 unsigned char *c, *c2; in mbedtls_x509write_crt_der() local
440 c = buf + size; in mbedtls_x509write_crt_der()
466 mbedtls_x509_write_extensions(&c, in mbedtls_x509write_crt_der()
468 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); in mbedtls_x509write_crt_der()
470 mbedtls_asn1_write_tag(&c, buf, in mbedtls_x509write_crt_der()
473 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); in mbedtls_x509write_crt_der()
475 mbedtls_asn1_write_tag(&c, buf, in mbedtls_x509write_crt_der()
485 buf, (size_t) (c - buf))); in mbedtls_x509write_crt_der()
486 c -= pub_len; in mbedtls_x509write_crt_der()
493 mbedtls_x509_write_names(&c, buf, in mbedtls_x509write_crt_der()
504 x509_write_time(&c, buf, ctx->not_after, in mbedtls_x509write_crt_der()
508 x509_write_time(&c, buf, ctx->not_before, in mbedtls_x509write_crt_der()
512 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, sub_len)); in mbedtls_x509write_crt_der()
514 mbedtls_asn1_write_tag(&c, buf, in mbedtls_x509write_crt_der()
521 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_x509_write_names(&c, buf, in mbedtls_x509write_crt_der()
538 mbedtls_asn1_write_algorithm_identifier_ext(&c, buf, in mbedtls_x509write_crt_der()
551 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_raw_buffer(&c, buf, in mbedtls_x509write_crt_der()
553 if (*c & 0x80) { in mbedtls_x509write_crt_der()
554 if (c - buf < 1) { in mbedtls_x509write_crt_der()
557 *(--c) = 0x0; in mbedtls_x509write_crt_der()
559 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, in mbedtls_x509write_crt_der()
562 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, in mbedtls_x509write_crt_der()
565 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(&c, buf, in mbedtls_x509write_crt_der()
576 mbedtls_asn1_write_int(&c, buf, ctx->version)); in mbedtls_x509write_crt_der()
579 mbedtls_asn1_write_len(&c, buf, sub_len)); in mbedtls_x509write_crt_der()
581 mbedtls_asn1_write_tag(&c, buf, in mbedtls_x509write_crt_der()
586 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); in mbedtls_x509write_crt_der()
588 mbedtls_asn1_write_tag(&c, buf, MBEDTLS_ASN1_CONSTRUCTED | in mbedtls_x509write_crt_der()
600 c, in mbedtls_x509write_crt_der()
609 if ((ret = mbedtls_md(mbedtls_md_info_from_type(ctx->md_alg), c, in mbedtls_x509write_crt_der()
624 memmove(buf, c, len); in mbedtls_x509write_crt_der()
625 c = buf + len; in mbedtls_x509write_crt_der()
631 MBEDTLS_ASN1_CHK_ADD(sig_and_oid_len, mbedtls_x509_write_sig(&c2, c, in mbedtls_x509write_crt_der()
643 c = c2 - len; in mbedtls_x509write_crt_der()
644 memmove(c, buf, len); in mbedtls_x509write_crt_der()
647 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); in mbedtls_x509write_crt_der()
648 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(&c, buf, in mbedtls_x509write_crt_der()