Home
last modified time | relevance | path

Searched refs:cbs (Results 1 – 25 of 46) sorted by relevance

12

/external/boringssl/src/crypto/bytestring/
Dcbs.c25 void CBS_init(CBS *cbs, const uint8_t *data, size_t len) { in CBS_init() argument
26 cbs->data = data; in CBS_init()
27 cbs->len = len; in CBS_init()
30 static int cbs_get(CBS *cbs, const uint8_t **p, size_t n) { in cbs_get() argument
31 if (cbs->len < n) { in cbs_get()
35 *p = cbs->data; in cbs_get()
36 cbs->data += n; in cbs_get()
37 cbs->len -= n; in cbs_get()
41 int CBS_skip(CBS *cbs, size_t len) { in CBS_skip() argument
43 return cbs_get(cbs, &dummy, len); in CBS_skip()
[all …]
Dbytestring_test.cc663 CBS cbs; in TestASN1Uint64() local
669 CBS_init(&cbs, (const uint8_t *)test->encoding, test->encoding_len); in TestASN1Uint64()
670 if (!CBS_get_asn1_uint64(&cbs, &value) || in TestASN1Uint64()
671 CBS_len(&cbs) != 0 || in TestASN1Uint64()
694 CBS cbs; in TestASN1Uint64() local
697 CBS_init(&cbs, (const uint8_t *)test->encoding, test->encoding_len); in TestASN1Uint64()
698 if (CBS_get_asn1_uint64(&cbs, &value)) { in TestASN1Uint64()
DCMakeLists.txt9 cbs.c
/external/boringssl/src/include/openssl/
Dbytestring.h44 OPENSSL_EXPORT void CBS_init(CBS *cbs, const uint8_t *data, size_t len);
48 OPENSSL_EXPORT int CBS_skip(CBS *cbs, size_t len);
51 OPENSSL_EXPORT const uint8_t *CBS_data(const CBS *cbs);
54 OPENSSL_EXPORT size_t CBS_len(const CBS *cbs);
61 OPENSSL_EXPORT int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len);
70 OPENSSL_EXPORT int CBS_strdup(const CBS *cbs, char **out_ptr);
74 OPENSSL_EXPORT int CBS_contains_zero_byte(const CBS *cbs);
79 OPENSSL_EXPORT int CBS_mem_equal(const CBS *cbs, const uint8_t *data,
84 OPENSSL_EXPORT int CBS_get_u8(CBS *cbs, uint8_t *out);
88 OPENSSL_EXPORT int CBS_get_u16(CBS *cbs, uint16_t *out);
[all …]
Drsa.h339 OPENSSL_EXPORT RSA *RSA_parse_public_key(CBS *cbs);
343 OPENSSL_EXPORT RSA *RSA_parse_public_key_buggy(CBS *cbs);
364 OPENSSL_EXPORT RSA *RSA_parse_private_key(CBS *cbs);
Dobj.h103 OPENSSL_EXPORT int OBJ_cbs2nid(const CBS *cbs);
/external/libevent/
Devthread.c72 evthread_set_lock_callbacks(const struct evthread_lock_callbacks *cbs) in evthread_set_lock_callbacks() argument
78 if (!cbs) { in evthread_set_lock_callbacks()
87 if (target->lock_api_version == cbs->lock_api_version && in evthread_set_lock_callbacks()
88 target->supported_locktypes == cbs->supported_locktypes && in evthread_set_lock_callbacks()
89 target->alloc == cbs->alloc && in evthread_set_lock_callbacks()
90 target->free == cbs->free && in evthread_set_lock_callbacks()
91 target->lock == cbs->lock && in evthread_set_lock_callbacks()
92 target->unlock == cbs->unlock) { in evthread_set_lock_callbacks()
100 if (cbs->alloc && cbs->free && cbs->lock && cbs->unlock) { in evthread_set_lock_callbacks()
101 memcpy(target, cbs, sizeof(_evthread_lock_fns)); in evthread_set_lock_callbacks()
[all …]
Devthread_pthread.c164 struct evthread_lock_callbacks cbs = { in evthread_use_pthreads() local
185 evthread_set_lock_callbacks(&cbs); in evthread_use_pthreads()
Devthread_win32.c300 struct evthread_lock_callbacks cbs = { in evthread_use_windows_threads() local
327 evthread_set_lock_callbacks(&cbs); in evthread_use_windows_threads()
/external/boringssl/src/crypto/rsa/
Drsa_asn1.c72 static int parse_integer_buggy(CBS *cbs, BIGNUM **out, int buggy) { in parse_integer_buggy() argument
79 return BN_cbs2unsigned_buggy(cbs, *out); in parse_integer_buggy()
81 return BN_cbs2unsigned(cbs, *out); in parse_integer_buggy()
84 static int parse_integer(CBS *cbs, BIGNUM **out) { in parse_integer() argument
85 return parse_integer_buggy(cbs, out, 0 /* not buggy */); in parse_integer()
97 static RSA *parse_public_key(CBS *cbs, int buggy) { in parse_public_key() argument
103 if (!CBS_get_asn1(cbs, &child, CBS_ASN1_SEQUENCE) || in parse_public_key()
122 RSA *RSA_parse_public_key(CBS *cbs) { in RSA_parse_public_key() argument
123 return parse_public_key(cbs, 0 /* not buggy */); in RSA_parse_public_key()
126 RSA *RSA_parse_public_key_buggy(CBS *cbs) { in RSA_parse_public_key_buggy() argument
[all …]
Drsa_test.cc866 CBS cbs; in TestASN1() local
867 CBS_init(&cbs, kEstonianRSAKey, sizeof(kEstonianRSAKey)); in TestASN1()
868 rsa.reset(RSA_parse_public_key_buggy(&cbs)); in TestASN1()
869 if (!rsa || CBS_len(&cbs) != 0) { in TestASN1()
/external/ltrace/
Dbreakpoints.c66 if (bp->cbs != NULL && bp->cbs->on_hit != NULL) in breakpoint_on_hit()
67 (bp->cbs->on_hit)(bp, proc); in breakpoint_on_hit()
74 if (bp->cbs != NULL && bp->cbs->on_continue != NULL) in breakpoint_on_continue()
75 (bp->cbs->on_continue)(bp, proc); in breakpoint_on_continue()
84 if (bp->cbs != NULL && bp->cbs->on_retract != NULL) in breakpoint_on_retract()
85 (bp->cbs->on_retract)(bp, proc); in breakpoint_on_retract()
92 if (bp->cbs != NULL && bp->cbs->on_install != NULL) in breakpoint_on_install()
93 (bp->cbs->on_install)(bp, proc); in breakpoint_on_install()
101 if (bp->cbs != NULL && bp->cbs->get_return_bp != NULL) in breakpoint_get_return_bp()
102 return (bp->cbs->get_return_bp)(ret, bp, proc); in breakpoint_get_return_bp()
[all …]
Dbreakpoint.h63 struct bp_callbacks *cbs; member
113 void breakpoint_set_callbacks(struct breakpoint *bp, struct bp_callbacks *cbs);
/external/boringssl/src/ssl/
Dssl_asn1.c410 static int SSL_SESSION_parse_string(CBS *cbs, char **out, unsigned tag) { in SSL_SESSION_parse_string() argument
413 if (!CBS_get_optional_asn1_octet_string(cbs, &value, &present, tag)) { in SSL_SESSION_parse_string()
439 static int SSL_SESSION_parse_octet_string(CBS *cbs, uint8_t **out_ptr, in SSL_SESSION_parse_octet_string() argument
442 if (!CBS_get_optional_asn1_octet_string(cbs, &value, NULL, tag)) { in SSL_SESSION_parse_octet_string()
456 CBS *cbs, uint8_t *out, unsigned *out_len, unsigned max_out, unsigned tag) { in SSL_SESSION_parse_bounded_octet_string() argument
458 if (!CBS_get_optional_asn1_octet_string(cbs, &value, NULL, tag) || in SSL_SESSION_parse_bounded_octet_string()
468 static int SSL_SESSION_parse_long(CBS *cbs, long *out, unsigned tag, in SSL_SESSION_parse_long() argument
471 if (!CBS_get_optional_asn1_uint64(cbs, &value, tag, in SSL_SESSION_parse_long()
481 static int SSL_SESSION_parse_u32(CBS *cbs, uint32_t *out, unsigned tag, in SSL_SESSION_parse_u32() argument
484 if (!CBS_get_optional_asn1_uint64(cbs, &value, tag, in SSL_SESSION_parse_u32()
[all …]
Ddtls_record.c178 CBS cbs; in dtls_open_record() local
179 CBS_init(&cbs, in, in_len); in dtls_open_record()
186 if (!CBS_get_u8(&cbs, &type) || in dtls_open_record()
187 !CBS_get_u16(&cbs, &version) || in dtls_open_record()
188 !CBS_copy_bytes(&cbs, sequence, 8) || in dtls_open_record()
189 !CBS_get_u16_length_prefixed(&cbs, &body) || in dtls_open_record()
210 *out_consumed = in_len - CBS_len(&cbs); in dtls_open_record()
226 *out_consumed = in_len - CBS_len(&cbs); in dtls_open_record()
244 *out_consumed = in_len - CBS_len(&cbs); in dtls_open_record()
Dtls_record.c176 CBS cbs; in tls_open_record() local
177 CBS_init(&cbs, in, in_len); in tls_open_record()
182 if (!CBS_get_u8(&cbs, &type) || in tls_open_record()
183 !CBS_get_u16(&cbs, &version) || in tls_open_record()
184 !CBS_get_u16(&cbs, &ciphertext_len)) { in tls_open_record()
206 if (!CBS_get_bytes(&cbs, &body, ciphertext_len)) { in tls_open_record()
253 *out_consumed = in_len - CBS_len(&cbs); in tls_open_record()
Dt1_lib.c191 static int tls1_check_duplicate_extensions(const CBS *cbs) { in tls1_check_duplicate_extensions() argument
192 CBS extensions = *cbs; in tls1_check_duplicate_extensions()
222 extensions = *cbs; in tls1_check_duplicate_extensions()
2238 static int ssl_scan_clienthello_tlsext(SSL *ssl, CBS *cbs, int *out_alert) { in ssl_scan_clienthello_tlsext() argument
2254 if (CBS_len(cbs) != 0) { in ssl_scan_clienthello_tlsext()
2257 if (!CBS_get_u16_length_prefixed(cbs, &extensions) || in ssl_scan_clienthello_tlsext()
2320 int ssl_parse_clienthello_tlsext(SSL *ssl, CBS *cbs) { in ssl_parse_clienthello_tlsext() argument
2322 if (ssl_scan_clienthello_tlsext(ssl, cbs, &alert) <= 0) { in ssl_parse_clienthello_tlsext()
2337 static int ssl_scan_serverhello_tlsext(SSL *ssl, CBS *cbs, int *out_alert) { in ssl_scan_serverhello_tlsext() argument
2340 if (CBS_len(cbs) != 0) { in ssl_scan_serverhello_tlsext()
[all …]
/external/boringssl/src/crypto/x509/
Dpkcs7.c38 static int pkcs7_parse_header(uint8_t **der_bytes, CBS *out, CBS *cbs) { in pkcs7_parse_header() argument
45 if (!CBS_asn1_ber_to_der(cbs, der_bytes, &der_len)) { in pkcs7_parse_header()
51 CBS_init(&in, CBS_data(cbs), CBS_len(cbs)); in pkcs7_parse_header()
92 int PKCS7_get_certificates(STACK_OF(X509) *out_certs, CBS *cbs) { in PKCS7_get_certificates() argument
98 if (!pkcs7_parse_header(&der_bytes, &signed_data, cbs)) { in PKCS7_get_certificates()
152 int PKCS7_get_CRLs(STACK_OF(X509_CRL) *out_crls, CBS *cbs) { in PKCS7_get_CRLs() argument
158 if (!pkcs7_parse_header(&der_bytes, &signed_data, cbs)) { in PKCS7_get_CRLs()
236 CBS cbs; in PKCS7_get_PEM_certificates() local
237 CBS_init(&cbs, data, len); in PKCS7_get_PEM_certificates()
238 ret = PKCS7_get_certificates(out_certs, &cbs); in PKCS7_get_PEM_certificates()
[all …]
/external/boringssl/src/crypto/ecdsa/
Decdsa_asn1.c111 ECDSA_SIG *ECDSA_SIG_parse(CBS *cbs) { in ECDSA_SIG_parse() argument
117 if (!CBS_get_asn1(cbs, &child, CBS_ASN1_SEQUENCE) || in ECDSA_SIG_parse()
129 CBS cbs; in ECDSA_SIG_from_bytes() local
130 CBS_init(&cbs, in, in_len); in ECDSA_SIG_from_bytes()
131 ECDSA_SIG *ret = ECDSA_SIG_parse(&cbs); in ECDSA_SIG_from_bytes()
132 if (ret == NULL || CBS_len(&cbs) != 0) { in ECDSA_SIG_from_bytes()
204 CBS cbs; in d2i_ECDSA_SIG() local
205 CBS_init(&cbs, *inp, (size_t)len); in d2i_ECDSA_SIG()
206 ECDSA_SIG *ret = ECDSA_SIG_parse(&cbs); in d2i_ECDSA_SIG()
214 *inp += (size_t)len - CBS_len(&cbs); in d2i_ECDSA_SIG()
/external/glide/library/src/main/java/com/bumptech/glide/load/engine/
DEngineJob.java28 private final List<ResourceCallback> cbs = new ArrayList<ResourceCallback>(); field in EngineJob
82 cbs.add(cb); in addCallback()
91 cbs.remove(cb); in removeCallback()
92 if (cbs.isEmpty()) { in removeCallback()
143 } else if (cbs.isEmpty()) { in handleResultOnMainThread()
154 for (ResourceCallback cb : cbs) { in handleResultOnMainThread()
173 } else if (cbs.isEmpty()) { in handleExceptionOnMainThread()
180 for (ResourceCallback cb : cbs) { in handleExceptionOnMainThread()
/external/boringssl/src/crypto/bn/
Dbn_asn1.c21 int BN_cbs2unsigned(CBS *cbs, BIGNUM *ret) { in BN_cbs2unsigned() argument
23 if (!CBS_get_asn1(cbs, &child, CBS_ASN1_INTEGER) || in BN_cbs2unsigned()
45 int BN_cbs2unsigned_buggy(CBS *cbs, BIGNUM *ret) { in BN_cbs2unsigned_buggy() argument
47 if (!CBS_get_asn1(cbs, &child, CBS_ASN1_INTEGER) || in BN_cbs2unsigned_buggy()
Dbn_test.cc1824 CBS cbs; in test_asn1() local
1825 CBS_init(&cbs, reinterpret_cast<const uint8_t*>(test.der), test.der_len); in test_asn1()
1826 if (!BN_cbs2unsigned(&cbs, bn2.get()) || CBS_len(&cbs) != 0) { in test_asn1()
1854 CBS_init(&cbs, reinterpret_cast<const uint8_t*>(test.der), test.der_len); in test_asn1()
1855 if (!BN_cbs2unsigned_buggy(&cbs, bn2.get()) || CBS_len(&cbs) != 0) { in test_asn1()
1870 CBS cbs; in test_asn1() local
1871 CBS_init(&cbs, reinterpret_cast<const uint8_t*>(test.der), test.der_len); in test_asn1()
1872 if (BN_cbs2unsigned(&cbs, bn.get())) { in test_asn1()
1880 CBS_init(&cbs, reinterpret_cast<const uint8_t*>(test.der), test.der_len); in test_asn1()
1881 if (BN_cbs2unsigned_buggy(&cbs, bn.get())) { in test_asn1()
[all …]
/external/glide/library/src/main/java/com/bumptech/glide/request/target/
DViewTarget.java115 private final List<SizeReadyCallback> cbs = new ArrayList<SizeReadyCallback>(); field in ViewTarget.SizeDeterminer
123 for (SizeReadyCallback cb : cbs) { in notifyCbs()
126 cbs.clear(); in notifyCbs()
130 if (cbs.isEmpty()) { in checkCurrentDimens()
179 if (!cbs.contains(cb)) { in getSize()
180 cbs.add(cb); in getSize()
/external/strace/tests/
Daio.c116 const long cbs[ARRAY_SIZE(cb) + 2] = { in main() local
140 if (syscall(__NR_io_submit, ctx, nr, cbs) != (long) nr) in main()
/external/boringssl/src/crypto/evp/
Dp_rsa_asn1.c101 CBS cbs; in rsa_pub_decode() local
102 CBS_init(&cbs, p, pklen); in rsa_pub_decode()
103 RSA *rsa = RSA_parse_public_key_buggy(&cbs); in rsa_pub_decode()
104 if (rsa == NULL || CBS_len(&cbs) != 0) { in rsa_pub_decode()

12