Searched refs:cbb (Results 1 - 12 of 12) sorted by relevance

/external/boringssl/src/crypto/bytestring/
H A Dcbb.c23 static int cbb_init(CBB *cbb, uint8_t *buf, size_t cap) { argument
36 memset(cbb, 0, sizeof(CBB));
37 cbb->base = base;
38 cbb->is_top_level = 1;
42 int CBB_init(CBB *cbb, size_t initial_capacity) { argument
50 if (!cbb_init(cbb, buf, initial_capacity)) {
58 int CBB_init_fixed(CBB *cbb, uint8_t *buf, size_t len) { argument
59 if (!cbb_init(cbb, buf, len)) {
63 cbb->base->can_resize = 0;
67 void CBB_cleanup(CBB *cbb) { argument
137 CBB_finish(CBB *cbb, uint8_t **out_data, size_t *out_len) argument
165 CBB_flush(CBB *cbb) argument
247 cbb_add_length_prefixed(CBB *cbb, CBB *out_contents, size_t len_len) argument
270 CBB_add_u8_length_prefixed(CBB *cbb, CBB *out_contents) argument
274 CBB_add_u16_length_prefixed(CBB *cbb, CBB *out_contents) argument
278 CBB_add_u24_length_prefixed(CBB *cbb, CBB *out_contents) argument
282 CBB_add_asn1(CBB *cbb, CBB *out_contents, uint8_t tag) argument
307 CBB_add_bytes(CBB *cbb, const uint8_t *data, size_t len) argument
318 CBB_add_space(CBB *cbb, uint8_t **out_data, size_t len) argument
326 CBB_add_u8(CBB *cbb, uint8_t value) argument
334 CBB_add_u16(CBB *cbb, uint16_t value) argument
342 CBB_add_u24(CBB *cbb, uint32_t value) argument
350 CBB_add_asn1_uint64(CBB *cbb, uint64_t value) argument
[all...]
H A Dbytestring_test.cc269 CBB cbb; local
271 if (!CBB_init(&cbb, 100)) {
274 CBB_cleanup(&cbb);
276 if (!CBB_init(&cbb, 0)) {
279 if (!CBB_add_u8(&cbb, 1) ||
280 !CBB_add_u16(&cbb, 0x203) ||
281 !CBB_add_u24(&cbb, 0x40506) ||
282 !CBB_add_bytes(&cbb, (const uint8_t*) "\x07\x08", 2) ||
283 !CBB_finish(&cbb, &buf, &buf_len)) {
284 CBB_cleanup(&cbb);
293 CBB cbb; local
320 CBB cbb, child; local
342 CBB cbb, contents, inner_contents, inner_inner_contents; local
369 CBB cbb, child, contents; local
414 CBB cbb, contents, inner_contents; local
611 CBB cbb; local
[all...]
H A Dber.c197 CBB cbb; local
212 if (!CBB_init(&cbb, CBS_len(in))) {
215 if (!cbs_convert_ber(in, &cbb, 0, 0, 0)) {
216 CBB_cleanup(&cbb);
220 return CBB_finish(&cbb, out, out_len);
/external/boringssl/include/openssl/
H A Dbytestring.h241 /* CBB_init initialises |cbb| with |initial_capacity|. Since a |CBB| grows as
244 OPENSSL_EXPORT int CBB_init(CBB *cbb, size_t initial_capacity);
246 /* CBB_init_fixed initialises |cbb| to write to |len| bytes at |buf|. Since
249 OPENSSL_EXPORT int CBB_init_fixed(CBB *cbb, uint8_t *buf, size_t len);
251 /* CBB_cleanup frees all resources owned by |cbb| and other |CBB| objects
254 OPENSSL_EXPORT void CBB_cleanup(CBB *cbb);
264 OPENSSL_EXPORT int CBB_finish(CBB *cbb, uint8_t **out_data, size_t *out_len);
267 * |CBB| objects of |cbb| to be invalidated. It returns one on success or zero
269 OPENSSL_EXPORT int CBB_flush(CBB *cbb);
271 /* CBB_add_u8_length_prefixed sets |*out_contents| to a new child of |cbb|
[all...]
/external/boringssl/src/include/openssl/
H A Dbytestring.h241 /* CBB_init initialises |cbb| with |initial_capacity|. Since a |CBB| grows as
244 OPENSSL_EXPORT int CBB_init(CBB *cbb, size_t initial_capacity);
246 /* CBB_init_fixed initialises |cbb| to write to |len| bytes at |buf|. Since
249 OPENSSL_EXPORT int CBB_init_fixed(CBB *cbb, uint8_t *buf, size_t len);
251 /* CBB_cleanup frees all resources owned by |cbb| and other |CBB| objects
254 OPENSSL_EXPORT void CBB_cleanup(CBB *cbb);
264 OPENSSL_EXPORT int CBB_finish(CBB *cbb, uint8_t **out_data, size_t *out_len);
267 * |CBB| objects of |cbb| to be invalidated. It returns one on success or zero
269 OPENSSL_EXPORT int CBB_flush(CBB *cbb);
271 /* CBB_add_u8_length_prefixed sets |*out_contents| to a new child of |cbb|
[all...]
/external/boringssl/src/ssl/
H A Dd1_both.c596 CBB cbb; local
600 !CBB_init_fixed(&cbb, (uint8_t *)s->init_buf->data, s->init_buf->max)) {
607 if (!CBB_add_u8(&cbb, frag->msg_header.type) ||
608 !CBB_add_u24(&cbb, frag->msg_header.msg_len) ||
609 !CBB_add_u16(&cbb, frag->msg_header.seq) ||
610 !CBB_add_u24(&cbb, 0 /* frag_off */) ||
611 !CBB_add_u24(&cbb, frag->msg_header.msg_len) ||
612 !CBB_add_bytes(&cbb, frag->fragment, frag->msg_header.msg_len) ||
613 !CBB_finish(&cbb, NULL, &len)) {
614 CBB_cleanup(&cbb);
[all...]
H A Dssl_asn1.c160 CBB cbb, session, child, child2; local
166 if (!CBB_init(&cbb, 0)) {
170 if (!CBB_add_asn1(&cbb, &session, CBS_ASN1_SEQUENCE) ||
320 if (!CBB_finish(&cbb, out_data, out_len)) {
327 CBB_cleanup(&cbb);
H A Dssl_lib.c2558 static int cbb_add_hex(CBB *cbb, const uint8_t *in, size_t in_len) { argument
2563 if (!CBB_add_space(cbb, &out, in_len * 2)) {
2581 CBB cbb; local
2596 if (!CBB_init(&cbb, 4 + 16 + 1 + premaster_len * 2 + 1)) {
2600 if (!CBB_add_bytes(&cbb, (const uint8_t *)"RSA ", 4) ||
2603 !cbb_add_hex(&cbb, encrypted_premaster, 8) ||
2604 !CBB_add_bytes(&cbb, (const uint8_t *)" ", 1) ||
2605 !cbb_add_hex(&cbb, premaster, premaster_len) ||
2606 !CBB_add_bytes(&cbb, (const uint8_t *)"\n", 1) ||
2607 !CBB_finish(&cbb,
2624 CBB cbb; local
[all...]
H A Ds3_clnt.c1932 CBB cbb, child; local
1936 if (!CBB_init(&cbb, 2 + psk_len + 2 + pms_len)) {
1941 if (!CBB_add_u16_length_prefixed(&cbb, &child) ||
1943 !CBB_add_u16_length_prefixed(&cbb, &child) ||
1945 !CBB_finish(&cbb, &new_pms, &new_pms_len)) {
1946 CBB_cleanup(&cbb);
/external/mesa3d/src/gallium/drivers/nouveau/
H A Dnouveau_video.c106 int cbb; local
109 for (cbb = 0x20; cbb > 0; cbb >>= 1) {
110 if (cbb & cbp) {
142 int cbb; local
145 for (cbb = 0x20; cbb > 0; cbb >>= 1) {
146 if (cbb
[all...]
/external/boringssl/src/crypto/x509/
H A Dpkcs7_test.c472 CBB cbb; local
484 CBB_init(&cbb, der_len);
485 if (!PKCS7_bundle_certificates(&cbb, certs) ||
486 !CBB_finish(&cbb, &result_data, &result_len)) {
512 CBB_init(&cbb, der_len);
513 if (!PKCS7_bundle_certificates(&cbb, certs2) ||
514 !CBB_finish(&cbb, &result2_data, &result2_len)) {
536 CBB cbb; local
548 CBB_init(&cbb, der_len);
549 if (!PKCS7_bundle_CRLs(&cbb, crl
[all...]
/external/boringssl/
H A Dsources.mk90 src/crypto/bytestring/cbb.c\

Completed in 304 milliseconds