/external/boringssl/src/crypto/bytestring/ |
D | cbs.c | 27 void CBS_init(CBS *cbs, const uint8_t *data, size_t len) { in CBS_init() argument 28 cbs->data = data; in CBS_init() 29 cbs->len = len; in CBS_init() 32 static int cbs_get(CBS *cbs, const uint8_t **p, size_t n) { in cbs_get() argument 33 if (cbs->len < n) { in cbs_get() 37 *p = cbs->data; in cbs_get() 38 cbs->data += n; in cbs_get() 39 cbs->len -= n; in cbs_get() 43 int CBS_skip(CBS *cbs, size_t len) { in CBS_skip() argument 45 return cbs_get(cbs, &dummy, len); in CBS_skip() [all …]
|
D | unicode.c | 41 int cbs_get_utf8(CBS *cbs, uint32_t *out) { in cbs_get_utf8() argument 43 if (!CBS_get_u8(cbs, &c)) { in cbs_get_utf8() 68 if (!CBS_get_u8(cbs, &c) || in cbs_get_utf8() 83 int cbs_get_latin1(CBS *cbs, uint32_t *out) { in cbs_get_latin1() argument 85 if (!CBS_get_u8(cbs, &c)) { in cbs_get_latin1() 92 int cbs_get_ucs2_be(CBS *cbs, uint32_t *out) { in cbs_get_ucs2_be() argument 95 if (!CBS_get_u16(cbs, &c) || in cbs_get_ucs2_be() 103 int cbs_get_utf32_be(CBS *cbs, uint32_t *out) { in cbs_get_utf32_be() argument 104 return CBS_get_u32(cbs, out) && is_valid_code_point(*out); in cbs_get_utf32_be()
|
D | bytestring_test.cc | 262 CBS cbs, child; in TEST() local 263 CBS_init(&cbs, t.in.data(), t.in.size()); in TEST() 264 ASSERT_EQ(t.ok, !!CBS_get_any_asn1(&cbs, &child, &tag)); in TEST() 268 EXPECT_EQ(0u, CBS_len(&cbs)); in TEST() 270 CBS_init(&cbs, t.in.data(), t.in.size()); in TEST() 271 EXPECT_TRUE(CBS_peek_asn1_tag(&cbs, t.tag)); in TEST() 272 EXPECT_FALSE(CBS_peek_asn1_tag(&cbs, t.tag + 1)); in TEST() 274 EXPECT_TRUE(CBS_get_asn1(&cbs, &child, t.tag)); in TEST() 276 EXPECT_EQ(0u, CBS_len(&cbs)); in TEST() 278 CBS_init(&cbs, t.in.data(), t.in.size()); in TEST() [all …]
|
D | internal.h | 75 OPENSSL_EXPORT int cbs_get_utf8(CBS *cbs, uint32_t *out); 76 OPENSSL_EXPORT int cbs_get_latin1(CBS *cbs, uint32_t *out); 77 OPENSSL_EXPORT int cbs_get_ucs2_be(CBS *cbs, uint32_t *out); 78 OPENSSL_EXPORT int cbs_get_utf32_be(CBS *cbs, uint32_t *out);
|
D | cbb.c | 546 static int parse_dotted_decimal(CBS *cbs, uint64_t *out) { in parse_dotted_decimal() argument 554 if (!CBS_get_u8(cbs, &u) || in parse_dotted_decimal() 555 (u == '.' && CBS_len(cbs) > 0)) { in parse_dotted_decimal() 578 CBS cbs; in CBB_add_asn1_oid_from_text() local 579 CBS_init(&cbs, (const uint8_t *)text, len); in CBB_add_asn1_oid_from_text() 583 if (!parse_dotted_decimal(&cbs, &a) || in CBB_add_asn1_oid_from_text() 584 !parse_dotted_decimal(&cbs, &b)) { in CBB_add_asn1_oid_from_text() 598 while (CBS_len(&cbs) > 0) { in CBB_add_asn1_oid_from_text() 599 if (!parse_dotted_decimal(&cbs, &a) || in CBB_add_asn1_oid_from_text() 631 CBS cbs; in CBB_flush_asn1_set_of() local [all …]
|
/external/boringssl/src/include/openssl/ |
D | bytestring.h | 59 OPENSSL_EXPORT void CBS_init(CBS *cbs, const uint8_t *data, size_t len); 63 OPENSSL_EXPORT int CBS_skip(CBS *cbs, size_t len); 66 OPENSSL_EXPORT const uint8_t *CBS_data(const CBS *cbs); 69 OPENSSL_EXPORT size_t CBS_len(const CBS *cbs); 76 OPENSSL_EXPORT int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len); 85 OPENSSL_EXPORT int CBS_strdup(const CBS *cbs, char **out_ptr); 89 OPENSSL_EXPORT int CBS_contains_zero_byte(const CBS *cbs); 94 OPENSSL_EXPORT int CBS_mem_equal(const CBS *cbs, const uint8_t *data, 99 OPENSSL_EXPORT int CBS_get_u8(CBS *cbs, uint8_t *out); 103 OPENSSL_EXPORT int CBS_get_u16(CBS *cbs, uint16_t *out); [all …]
|
/external/boringssl/src/crypto/evp/ |
D | evp_asn1.c | 79 static int parse_key_type(CBS *cbs, int *out_type) { in parse_key_type() argument 81 if (!CBS_get_asn1(cbs, &oid, CBS_ASN1_OBJECT)) { in parse_key_type() 97 EVP_PKEY *EVP_parse_public_key(CBS *cbs) { in EVP_parse_public_key() argument 102 if (!CBS_get_asn1(cbs, &spki, CBS_ASN1_SEQUENCE) || in EVP_parse_public_key() 153 EVP_PKEY *EVP_parse_private_key(CBS *cbs) { in EVP_parse_private_key() argument 158 if (!CBS_get_asn1(cbs, &pkcs8, CBS_ASN1_SEQUENCE) || in EVP_parse_private_key() 205 static EVP_PKEY *old_priv_decode(CBS *cbs, int type) { in old_priv_decode() argument 213 EC_KEY *ec_key = EC_KEY_parse_private_key(cbs, NULL); in old_priv_decode() 221 DSA *dsa = DSA_parse_private_key(cbs); in old_priv_decode() 229 RSA *rsa = RSA_parse_private_key(cbs); in old_priv_decode() [all …]
|
/external/libevent/ |
D | evthread.c | 93 evthread_set_lock_callbacks(const struct evthread_lock_callbacks *cbs) in evthread_set_lock_callbacks() argument 105 if (!cbs) { in evthread_set_lock_callbacks() 114 if (target->lock_api_version == cbs->lock_api_version && in evthread_set_lock_callbacks() 115 target->supported_locktypes == cbs->supported_locktypes && in evthread_set_lock_callbacks() 116 target->alloc == cbs->alloc && in evthread_set_lock_callbacks() 117 target->free == cbs->free && in evthread_set_lock_callbacks() 118 target->lock == cbs->lock && in evthread_set_lock_callbacks() 119 target->unlock == cbs->unlock) { in evthread_set_lock_callbacks() 127 if (cbs->alloc && cbs->free && cbs->lock && cbs->unlock) { in evthread_set_lock_callbacks() 128 memcpy(target, cbs, sizeof(evthread_lock_fns_)); in evthread_set_lock_callbacks() [all …]
|
/external/boringssl/src/crypto/dsa/ |
D | dsa_asn1.c | 67 static int parse_integer(CBS *cbs, BIGNUM **out) { in parse_integer() argument 73 return BN_parse_asn1_unsigned(cbs, *out); in parse_integer() 85 DSA_SIG *DSA_SIG_parse(CBS *cbs) { in DSA_SIG_parse() argument 91 if (!CBS_get_asn1(cbs, &child, CBS_ASN1_SEQUENCE) || in DSA_SIG_parse() 114 DSA *DSA_parse_public_key(CBS *cbs) { in DSA_parse_public_key() argument 120 if (!CBS_get_asn1(cbs, &child, CBS_ASN1_SEQUENCE) || in DSA_parse_public_key() 147 DSA *DSA_parse_parameters(CBS *cbs) { in DSA_parse_parameters() argument 153 if (!CBS_get_asn1(cbs, &child, CBS_ASN1_SEQUENCE) || in DSA_parse_parameters() 178 DSA *DSA_parse_private_key(CBS *cbs) { in DSA_parse_private_key() argument 186 if (!CBS_get_asn1(cbs, &child, CBS_ASN1_SEQUENCE) || in DSA_parse_private_key() [all …]
|
/external/boringssl/src/crypto/rsa_extra/ |
D | rsa_asn1.c | 72 static int parse_integer(CBS *cbs, BIGNUM **out) { in parse_integer() argument 78 return BN_parse_asn1_unsigned(cbs, *out); in parse_integer() 90 RSA *RSA_parse_public_key(CBS *cbs) { in RSA_parse_public_key() argument 96 if (!CBS_get_asn1(cbs, &child, CBS_ASN1_SEQUENCE) || in RSA_parse_public_key() 116 CBS cbs; in RSA_public_key_from_bytes() local 117 CBS_init(&cbs, in, in_len); in RSA_public_key_from_bytes() 118 RSA *ret = RSA_parse_public_key(&cbs); in RSA_public_key_from_bytes() 119 if (ret == NULL || CBS_len(&cbs) != 0) { in RSA_public_key_from_bytes() 157 RSA *RSA_parse_private_key(CBS *cbs) { in RSA_parse_private_key() argument 165 if (!CBS_get_asn1(cbs, &child, CBS_ASN1_SEQUENCE) || in RSA_parse_private_key() [all …]
|
/external/boringssl/src/crypto/pkcs7/ |
D | pkcs7_x509.c | 32 int PKCS7_get_certificates(STACK_OF(X509) *out_certs, CBS *cbs) { in PKCS7_get_certificates() argument 37 !PKCS7_get_raw_certificates(raw, cbs, NULL)) { in PKCS7_get_certificates() 65 int PKCS7_get_CRLs(STACK_OF(X509_CRL) *out_crls, CBS *cbs) { in PKCS7_get_CRLs() argument 72 if (!pkcs7_parse_header(&der_bytes, &signed_data, cbs) || in PKCS7_get_CRLs() 143 CBS cbs; in PKCS7_get_PEM_certificates() local 144 CBS_init(&cbs, data, len); in PKCS7_get_PEM_certificates() 145 ret = PKCS7_get_certificates(out_certs, &cbs); in PKCS7_get_PEM_certificates() 165 CBS cbs; in PKCS7_get_PEM_CRLs() local 166 CBS_init(&cbs, data, len); in PKCS7_get_PEM_CRLs() 167 ret = PKCS7_get_CRLs(out_crls, &cbs); in PKCS7_get_PEM_CRLs() [all …]
|
/external/boringssl/src/ssl/test/ |
D | fuzzer.h | 295 CBS cbs; in TestOneInput() local 296 CBS_init(&cbs, buf, len); in TestOneInput() 297 bssl::UniquePtr<SSL> ssl = SetupTest(&cbs); in TestOneInput() 315 SSL_set0_rbio(ssl.get(), MakeBIO(CBS_data(&cbs), CBS_len(&cbs)).release()); in TestOneInput() 436 CBS cbs; in Init() local 437 CBS_init(&cbs, kP256KeyPKCS8, sizeof(kP256KeyPKCS8)); in Init() 438 pkey.reset(EVP_parse_private_key(&cbs)); in Init() 450 bssl::UniquePtr<SSL> SetupTest(CBS *cbs) { in SetupTest() argument 466 if (!CBS_get_u16(cbs, &tag)) { in SetupTest() 475 if (!CBS_get_u24_length_prefixed(cbs, &data)) { in SetupTest() [all …]
|
/external/boringssl/src/crypto/dh/ |
D | dh_asn1.c | 68 static int parse_integer(CBS *cbs, BIGNUM **out) { in parse_integer() argument 74 return BN_parse_asn1_unsigned(cbs, *out); in parse_integer() 86 DH *DH_parse_parameters(CBS *cbs) { in DH_parse_parameters() argument 93 if (!CBS_get_asn1(cbs, &child, CBS_ASN1_SEQUENCE) || in DH_parse_parameters() 138 CBS cbs; in d2i_DHparams() local 139 CBS_init(&cbs, *inp, (size_t)len); in d2i_DHparams() 140 DH *ret = DH_parse_parameters(&cbs); in d2i_DHparams() 148 *inp = CBS_data(&cbs); in d2i_DHparams()
|
/external/boringssl/src/crypto/ec_extra/ |
D | ec_asn1.c | 75 EC_KEY *EC_KEY_parse_private_key(CBS *cbs, const EC_GROUP *group) { in EC_KEY_parse_private_key() argument 78 if (!CBS_get_asn1(cbs, &ec_private_key, CBS_ASN1_SEQUENCE) || in EC_KEY_parse_private_key() 246 static int is_unsigned_integer(const CBS *cbs) { in is_unsigned_integer() argument 247 if (CBS_len(cbs) == 0) { in is_unsigned_integer() 250 uint8_t byte = CBS_data(cbs)[0]; in is_unsigned_integer() 252 (byte == 0 && CBS_len(cbs) > 1 && (CBS_data(cbs)[1] & 0x80) == 0)) { in is_unsigned_integer() 339 EC_GROUP *EC_KEY_parse_curve_name(CBS *cbs) { in EC_KEY_parse_curve_name() argument 341 if (!CBS_get_asn1(cbs, &named_curve, CBS_ASN1_OBJECT)) { in EC_KEY_parse_curve_name() 383 EC_GROUP *EC_KEY_parse_parameters(CBS *cbs) { in EC_KEY_parse_parameters() argument 384 if (!CBS_peek_asn1_tag(cbs, CBS_ASN1_SEQUENCE)) { in EC_KEY_parse_parameters() [all …]
|
/external/boringssl/src/crypto/ecdsa_extra/ |
D | ecdsa_asn1.c | 152 ECDSA_SIG *ECDSA_SIG_parse(CBS *cbs) { in ECDSA_SIG_parse() argument 158 if (!CBS_get_asn1(cbs, &child, CBS_ASN1_SEQUENCE) || in ECDSA_SIG_parse() 170 CBS cbs; in ECDSA_SIG_from_bytes() local 171 CBS_init(&cbs, in, in_len); in ECDSA_SIG_from_bytes() 172 ECDSA_SIG *ret = ECDSA_SIG_parse(&cbs); in ECDSA_SIG_from_bytes() 173 if (ret == NULL || CBS_len(&cbs) != 0) { in ECDSA_SIG_from_bytes() 245 CBS cbs; in d2i_ECDSA_SIG() local 246 CBS_init(&cbs, *inp, (size_t)len); in d2i_ECDSA_SIG() 247 ECDSA_SIG *ret = ECDSA_SIG_parse(&cbs); in d2i_ECDSA_SIG() 255 *inp = CBS_data(&cbs); in d2i_ECDSA_SIG()
|
/external/mesa3d/src/gallium/drivers/lima/ |
D | lima_context.c | 51 struct lima_ctx_buff_state *cbs = ctx->buffer_state + buff; in lima_ctx_buff_va() local 52 struct lima_resource *res = lima_resource(cbs->res); in lima_ctx_buff_va() 57 return res->bo->va + cbs->offset; in lima_ctx_buff_va() 63 struct lima_ctx_buff_state *cbs = ctx->buffer_state + buff; in lima_ctx_buff_map() local 64 struct lima_resource *res = lima_resource(cbs->res); in lima_ctx_buff_map() 66 return lima_bo_map(res->bo) + cbs->offset; in lima_ctx_buff_map() 73 struct lima_ctx_buff_state *cbs = ctx->buffer_state + buff; in lima_ctx_buff_alloc() local 76 cbs->size = align(size, 0x40); in lima_ctx_buff_alloc() 78 u_upload_alloc(ctx->uploader, 0, cbs->size, 0x40, &cbs->offset, in lima_ctx_buff_alloc() 79 &cbs->res, &ret); in lima_ctx_buff_alloc()
|
/external/boringssl/src/crypto/digest_extra/ |
D | digest_extra.c | 140 static const EVP_MD *cbs_to_md(const CBS *cbs) { in cbs_to_md() argument 142 if (CBS_len(cbs) == kMDOIDs[i].oid_len && in cbs_to_md() 143 OPENSSL_memcmp(CBS_data(cbs), kMDOIDs[i].oid, kMDOIDs[i].oid_len) == in cbs_to_md() 158 CBS cbs; in EVP_get_digestbyobj() local 159 CBS_init(&cbs, obj->data, obj->length); in EVP_get_digestbyobj() 160 return cbs_to_md(&cbs); in EVP_get_digestbyobj() 163 const EVP_MD *EVP_parse_digest_algorithm(CBS *cbs) { in EVP_parse_digest_algorithm() argument 165 if (!CBS_get_asn1(cbs, &algorithm, CBS_ASN1_SEQUENCE) || in EVP_parse_digest_algorithm()
|
D | digest_test.cc | 284 CBS cbs; in TEST() local 285 CBS_init(&cbs, kSHA256, sizeof(kSHA256)); in TEST() 286 EXPECT_EQ(EVP_sha256(), EVP_parse_digest_algorithm(&cbs)); in TEST() 287 EXPECT_EQ(0u, CBS_len(&cbs)); in TEST() 290 CBS_init(&cbs, kSHA256NoParam, sizeof(kSHA256NoParam)); in TEST() 291 EXPECT_EQ(EVP_sha256(), EVP_parse_digest_algorithm(&cbs)); in TEST() 292 EXPECT_EQ(0u, CBS_len(&cbs)); in TEST() 295 CBS_init(&cbs, kSHA256GarbageParam, sizeof(kSHA256GarbageParam)); in TEST() 296 EXPECT_FALSE(EVP_parse_digest_algorithm(&cbs)); in TEST()
|
/external/grpc-grpc/src/core/ext/transport/cronet/transport/ |
D | cronet_transport.cc | 182 bidirectional_stream* cbs; member 294 CRONET_LOG(GPR_DEBUG, "bidirectional_stream_read(%p)", s->cbs); in maybe_flush_read() 295 bidirectional_stream_read(s->cbs, s->state.rs.read_buffer, in maybe_flush_read() 432 bidirectional_stream_destroy(s->cbs); in on_failed() 434 s->cbs = nullptr; in on_failed() 458 bidirectional_stream_destroy(s->cbs); in on_canceled() 460 s->cbs = nullptr; in on_canceled() 484 bidirectional_stream_destroy(s->cbs); in on_succeeded() 486 s->cbs = nullptr; in on_succeeded() 513 CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_flush (%p)", s->cbs); in on_stream_ready() [all …]
|
/external/boringssl/src/ssl/ |
D | ssl_asn1.cc | 399 static int SSL_SESSION_parse_string(CBS *cbs, UniquePtr<char> *out, unsigned tag) { in SSL_SESSION_parse_string() argument 402 if (!CBS_get_optional_asn1_octet_string(cbs, &value, &present, tag)) { in SSL_SESSION_parse_string() 426 static bool SSL_SESSION_parse_octet_string(CBS *cbs, Array<uint8_t> *out, in SSL_SESSION_parse_octet_string() argument 429 if (!CBS_get_optional_asn1_octet_string(cbs, &value, NULL, tag)) { in SSL_SESSION_parse_octet_string() 436 static int SSL_SESSION_parse_crypto_buffer(CBS *cbs, in SSL_SESSION_parse_crypto_buffer() argument 440 if (!CBS_peek_asn1_tag(cbs, tag)) { in SSL_SESSION_parse_crypto_buffer() 445 if (!CBS_get_asn1(cbs, &child, tag) || in SSL_SESSION_parse_crypto_buffer() 462 CBS *cbs, uint8_t *out, uint8_t *out_len, uint8_t max_out, unsigned tag) { in SSL_SESSION_parse_bounded_octet_string() argument 464 if (!CBS_get_optional_asn1_octet_string(cbs, &value, NULL, tag) || in SSL_SESSION_parse_bounded_octet_string() 474 static int SSL_SESSION_parse_long(CBS *cbs, long *out, unsigned tag, in SSL_SESSION_parse_long() argument [all …]
|
D | dtls_record.cc | 190 CBS cbs = CBS(in); in dtls_open_record() local 197 if (!CBS_get_u8(&cbs, &type) || in dtls_open_record() 198 !CBS_get_u16(&cbs, &version) || in dtls_open_record() 199 !CBS_copy_bytes(&cbs, sequence, 8) || in dtls_open_record() 200 !CBS_get_u16_length_prefixed(&cbs, &body) || in dtls_open_record() 232 *out_consumed = in.size() - CBS_len(&cbs); in dtls_open_record() 247 *out_consumed = in.size() - CBS_len(&cbs); in dtls_open_record() 250 *out_consumed = in.size() - CBS_len(&cbs); in dtls_open_record()
|
/external/glide/library/src/main/java/com/bumptech/glide/load/engine/ |
D | EngineJob.java | 28 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/obj/ |
D | obj_test.cc | 34 CBS cbs; in TEST() local 35 CBS_init(&cbs, kDER, sizeof(kDER)); in TEST() 36 ASSERT_EQ(kNID, OBJ_cbs2nid(&cbs)); in TEST() 50 CBS_init(&cbs, NULL, 0); in TEST() 51 ASSERT_EQ(NID_undef, OBJ_cbs2nid(&cbs)); in TEST() 57 CBS_init(&cbs, kUnknownDER, sizeof(kUnknownDER)); in TEST() 58 ASSERT_EQ(NID_undef, OBJ_cbs2nid(&cbs)); in TEST()
|
/external/boringssl/src/crypto/asn1/ |
D | a_mbstr.c | 133 CBS cbs; in OPENSSL_DECLARE_ERROR_REASON() local 134 CBS_init(&cbs, in, len); in OPENSSL_DECLARE_ERROR_REASON() 136 while (CBS_len(&cbs) != 0) { in OPENSSL_DECLARE_ERROR_REASON() 138 if (!decode_func(&cbs, &c)) { in OPENSSL_DECLARE_ERROR_REASON() 253 CBS_init(&cbs, in, len); in OPENSSL_DECLARE_ERROR_REASON() 254 while (CBS_len(&cbs) != 0) { in OPENSSL_DECLARE_ERROR_REASON() 256 if (!decode_func(&cbs, &c) || in OPENSSL_DECLARE_ERROR_REASON()
|
/external/glide/library/src/main/java/com/bumptech/glide/request/target/ |
D | ViewTarget.java | 115 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()
|