Home
last modified time | relevance | path

Searched refs:CBS_len (Results 1 – 25 of 50) sorted by relevance

12

/external/boringssl/src/crypto/bytestring/
Dber.c66 CBS_init(&in, CBS_data(orig_in), CBS_len(orig_in)); in cbs_find_ber()
69 while (CBS_len(&in) > 0) { in cbs_find_ber()
77 if (CBS_len(&contents) == header_len && in cbs_find_ber()
103 return header_len == 2 && CBS_len(contents) == 2 && in is_eoc()
122 while (CBS_len(in) > 0) { in cbs_convert_ber()
158 if (CBS_len(&contents) == header_len && header_len > 0 && in cbs_convert_ber()
182 CBS_len(&contents))) { in cbs_convert_ber()
211 if (!CBB_init(&cbb, CBS_len(in)) || in CBS_asn1_ber_to_der()
238 if (!CBB_init(&result, CBS_len(in)) || in CBS_get_asn1_implicit_string()
243 while (CBS_len(&child) > 0) { in CBS_get_asn1_implicit_string()
[all …]
Dcbs.c51 size_t CBS_len(const CBS *cbs) { in CBS_len() function
324 if (CBS_len(cbs) < 1) { in CBS_peek_asn1_tag()
338 size_t len = CBS_len(&bytes); in CBS_get_asn1_uint64()
393 CBS_len(&child) != 0) { in CBS_get_optional_asn1_octet_string()
414 CBS_len(&child) != 0) { in CBS_get_optional_asn1_uint64()
434 CBS_len(&child2) != 1 || in CBS_get_optional_asn1_bool()
435 CBS_len(&child) != 0) { in CBS_get_optional_asn1_bool()
486 return byte_num < CBS_len(cbs) && in CBS_asn1_bitstring_has_bit()
Dbytestring_test.cc40 EXPECT_EQ(3u, CBS_len(&data)); in TEST()
42 EXPECT_EQ(2u, CBS_len(&data)); in TEST()
44 EXPECT_EQ(0u, CBS_len(&data)); in TEST()
81 EXPECT_EQ(1u, CBS_len(&prefixed)); in TEST()
85 EXPECT_EQ(2u, CBS_len(&prefixed)); in TEST()
89 EXPECT_EQ(3u, CBS_len(&prefixed)); in TEST()
130 EXPECT_EQ(Bytes("\x01\x02"), Bytes(CBS_data(&contents), CBS_len(&contents))); in TEST()
163 EXPECT_EQ(0u, CBS_len(&contents)); in TEST()
165 EXPECT_EQ(0u, CBS_len(&contents)); in TEST()
176 Bytes(CBS_data(&contents), CBS_len(&contents))); in TEST()
[all …]
/external/boringssl/src/ssl/
Dt1_lib.cc154 while (CBS_len(&extensions) > 0) { in tls1_check_duplicate_extensions()
188 assert(CBS_len(&extensions) == 0); in tls1_check_duplicate_extensions()
217 CBS_len(&session_id) > SSL_MAX_SSL_SESSION_ID_LENGTH) { in ssl_client_hello_init()
222 out->random_len = CBS_len(&random); in ssl_client_hello_init()
224 out->session_id_len = CBS_len(&session_id); in ssl_client_hello_init()
230 CBS_len(&cookie) > DTLS1_COOKIE_LENGTH) { in ssl_client_hello_init()
237 CBS_len(&cipher_suites) < 2 || (CBS_len(&cipher_suites) & 1) != 0 || in ssl_client_hello_init()
239 CBS_len(&compression_methods) < 1) { in ssl_client_hello_init()
244 out->cipher_suites_len = CBS_len(&cipher_suites); in ssl_client_hello_init()
246 out->compression_methods_len = CBS_len(&compression_methods); in ssl_client_hello_init()
[all …]
Dssl_asn1.cc529 CBS_len(&value) > max_out) { in SSL_SESSION_parse_bounded_octet_string()
533 OPENSSL_memcpy(out, CBS_data(&value), CBS_len(&value)); in SSL_SESSION_parse_bounded_octet_string()
534 *out_len = (uint8_t)CBS_len(&value); in SSL_SESSION_parse_bounded_octet_string()
606 CBS_len(&cipher) != 0) { in SSL_SESSION_parse()
618 CBS_len(&session_id) > SSL3_MAX_SSL_SESSION_ID_LENGTH || in SSL_SESSION_parse()
620 CBS_len(&master_key) > SSL_MAX_MASTER_KEY_LENGTH) { in SSL_SESSION_parse()
624 OPENSSL_memcpy(ret->session_id, CBS_data(&session_id), CBS_len(&session_id)); in SSL_SESSION_parse()
625 ret->session_id_length = CBS_len(&session_id); in SSL_SESSION_parse()
626 OPENSSL_memcpy(ret->master_key, CBS_data(&master_key), CBS_len(&master_key)); in SSL_SESSION_parse()
627 ret->master_key_length = CBS_len(&master_key); in SSL_SESSION_parse()
[all …]
Ddtls_record.cc195 CBS_len(&body) > SSL3_RT_MAX_ENCRYPTED_LENGTH) { in dtls_open_record()
211 *out_consumed = in_len - CBS_len(&cbs); in dtls_open_record()
217 (uint8_t *)CBS_data(&body), CBS_len(&body))) { in dtls_open_record()
225 *out_consumed = in_len - CBS_len(&cbs); in dtls_open_record()
228 *out_consumed = in_len - CBS_len(&cbs); in dtls_open_record()
231 if (CBS_len(out) > SSL3_RT_MAX_PLAIN_LENGTH) { in dtls_open_record()
243 return ssl_process_alert(ssl, out_alert, CBS_data(out), CBS_len(out)); in dtls_open_record()
Dhandshake_client.cc794 CBS_len(&cookie) > sizeof(ssl->d1->cookie) || in dtls1_get_hello_verify_request()
795 CBS_len(&hello_verify_request) != 0) { in dtls1_get_hello_verify_request()
801 OPENSSL_memcpy(ssl->d1->cookie, CBS_data(&cookie), CBS_len(&cookie)); in dtls1_get_hello_verify_request()
802 ssl->d1->cookie_len = CBS_len(&cookie); in dtls1_get_hello_verify_request()
843 if (CBS_len(&server_hello) == 0) { in parse_server_version()
849 CBS_len(&server_hello) != 0) { in parse_server_version()
872 CBS_len(&supported_versions) != 0)) { in parse_server_version()
946 CBS_len(&session_id) > SSL3_SESSION_ID_SIZE || in ssl3_get_server_hello()
975 hs->new_session->session_id_length = CBS_len(&session_id); in ssl3_get_server_hello()
977 CBS_len(&session_id)); in ssl3_get_server_hello()
[all …]
Dtls13_client.cc64 CBS_len(&extensions) == 0 || in do_process_hello_retry_request()
65 CBS_len(&cbs) != 0) { in do_process_hello_retry_request()
89 CBS_len(&cookie_value) == 0 || in do_process_hello_retry_request()
90 CBS_len(&cookie) != 0) { in do_process_hello_retry_request()
103 if (!CBS_get_u16(&key_share, &group_id) || CBS_len(&key_share) != 0) { in do_process_hello_retry_request()
182 CBS_len(&cbs) != 0) { in do_process_server_hello()
377 if (CBS_len(&cbs) != 0) { in do_process_encrypted_extensions()
442 CBS_len(&context) != 0 || in do_process_certificate_request()
444 CBS_len(&supported_signature_algorithms) == 0 || in do_process_certificate_request()
462 CBS_len(&cbs) != 0) { in do_process_certificate_request()
[all …]
Dtls13_both.cc191 CBS_len(&context) != 0) { in tls13_process_certificate()
215 while (CBS_len(&certificate_list) > 0) { in tls13_process_certificate()
219 CBS_len(&certificate) == 0) { in tls13_process_certificate()
241 SHA256(CBS_data(&certificate), CBS_len(&certificate), in tls13_process_certificate()
286 CBS_len(&ocsp_response) == 0 || in tls13_process_certificate()
287 CBS_len(&status_request) != 0) { in tls13_process_certificate()
323 if (CBS_len(&cbs) != 0) { in tls13_process_certificate()
386 CBS_len(&cbs) != 0) { in tls13_process_certificate_verify()
410 ssl_public_key_verify(ssl, CBS_data(&signature), CBS_len(&signature), in tls13_process_certificate_verify()
607 CBS_len(&cbs) != 0 || in tls13_receive_key_update()
Dssl_cert.cc446 while (CBS_len(&certificate_list) > 0) { in STACK_OF()
449 CBS_len(&certificate) == 0) { in STACK_OF()
464 SHA256(CBS_data(&certificate), CBS_len(&certificate), out_leaf_sha256); in STACK_OF()
542 CBS_len(&buf) != 0 || in ssl_cert_skip_to_spki()
660 while (CBS_len(&extensions) > 0) { in ssl_cert_check_digital_signature_key_usage()
667 CBS_len(&extension) != 0) { in ssl_cert_check_digital_signature_key_usage()
672 if (CBS_len(&oid) != sizeof(kKeyUsageOID) || in ssl_cert_check_digital_signature_key_usage()
680 CBS_len(&contents) != 0) { in ssl_cert_check_digital_signature_key_usage()
724 while (CBS_len(&child) > 0) { in STACK_OF()
879 CRYPTO_BUFFER_new(CBS_data(&sct_list), CBS_len(&sct_list), NULL); in set_signed_cert_timestamp_list()
Dhandshake_server.cc456 while (CBS_len(&cipher_suites) > 0) { in ssl_client_cipher_list_contains_cipher()
478 CBS_len(&supported_versions) != 0 || in negotiate_version()
479 CBS_len(&versions) == 0) { in negotiate_version()
555 while (CBS_len(&cipher_suites) > 0) { in STACK_OF()
1230 if (CBS_len(&certificate_msg) != 0 || in ssl3_get_client_certificate()
1303 ((alg_k & SSL_kPSK) && CBS_len(&client_key_exchange) != 0)) { in ssl3_get_client_key_exchange()
1309 if (CBS_len(&psk_identity) > PSK_MAX_IDENTITY_LEN || in ssl3_get_client_key_exchange()
1330 CBS_len(&client_key_exchange) != 0) { in ssl3_get_client_key_exchange()
1352 CBS_len(&encrypted_premaster_secret))) { in ssl3_get_client_key_exchange()
1418 CBS_len(&client_key_exchange) != 0) { in ssl3_get_client_key_exchange()
[all …]
Dtls_record.cc261 *out_consumed = in_len - CBS_len(&cbs); in tls_open_record()
274 CBS_len(&body))) { in tls_open_record()
313 if (CBS_len(out) > SSL3_RT_MAX_PLAIN_LENGTH) { in tls_open_record()
320 if (CBS_len(out) == 0) { in tls_open_record()
335 if (CBS_len(out) == 2 && in tls_open_record()
342 return ssl_process_alert(ssl, out_alert, CBS_data(out), CBS_len(out)); in tls_open_record()
Ds3_both.cc596 CBS_len(&v2_client_hello))) { in read_v2_client_hello()
601 CBS_data(&v2_client_hello), CBS_len(&v2_client_hello)); in read_v2_client_hello()
614 CBS_len(&v2_client_hello) != 0) { in read_v2_client_hello()
624 size_t rand_len = CBS_len(&challenge); in read_v2_client_hello()
637 CBS_len(&cipher_specs) / 3 * 2 + in read_v2_client_hello()
657 while (CBS_len(&cipher_specs) > 0) { in read_v2_client_hello()
762 return SSL_TRANSCRIPT_update(&hs->transcript, CBS_data(&cbs), CBS_len(&cbs)); in ssl_hash_current_message()
793 while (CBS_len(&copy) != 0) { in ssl_parse_extensions()
/external/boringssl/src/crypto/pkcs8/
Dp5_pbev2.c213 CBS_len(param) != 0 || in PKCS5_pbe2_decrypt_init()
216 CBS_len(&pbe_param) != 0 || in PKCS5_pbe2_decrypt_init()
240 CBS_len(&kdf) != 0 || in PKCS5_pbe2_decrypt_init()
267 if (CBS_len(&pbkdf2_params) != 0) { in PKCS5_pbe2_decrypt_init()
271 CBS_len(&pbkdf2_params) != 0) { in PKCS5_pbe2_decrypt_init()
286 CBS_len(&null) != 0 || in PKCS5_pbe2_decrypt_init()
287 CBS_len(&alg_id) != 0) { in PKCS5_pbe2_decrypt_init()
299 CBS_len(&enc_scheme) != 0) { in PKCS5_pbe2_decrypt_init()
305 pass_len, CBS_data(&salt), CBS_len(&salt), in PKCS5_pbe2_decrypt_init()
306 CBS_data(&iv), CBS_len(&iv), 0 /* decrypt */); in PKCS5_pbe2_decrypt_init()
Dpkcs8_x509.c112 if (ret == NULL || CBS_len(&cbs) != 0) {
174 if (pkey == NULL || CBS_len(&cbs) != 0) { in PKCS8_decrypt()
259 CBS_init(&in, CBS_data(sequence), CBS_len(sequence)); in PKCS12_handle_sequence()
264 CBS_len(&in) != 0) { in PKCS12_handle_sequence()
269 while (CBS_len(&child) > 0) { in PKCS12_handle_sequence()
326 if (CBS_len(&wrapped_value) != 0) { in PKCS12_handle_safe_bag()
354 if (CBS_len(&cert) > LONG_MAX) { in PKCS12_handle_safe_bag()
360 X509 *x509 = d2i_X509(NULL, &inp, (long)CBS_len(&cert)); in PKCS12_handle_safe_bag()
366 if (inp != CBS_data(&cert) + CBS_len(&cert)) { in PKCS12_handle_safe_bag()
403 CBS_len(content_info) != 0) { in PKCS12_handle_content_info()
[all …]
/external/boringssl/src/crypto/bn_extra/
Dbn_asn1.c24 CBS_len(&child) == 0) { in BN_parse_asn1_unsigned()
36 CBS_len(&child) > 1 && in BN_parse_asn1_unsigned()
42 return BN_bin2bn(CBS_data(&child), CBS_len(&child), ret) != NULL; in BN_parse_asn1_unsigned()
48 CBS_len(&child) == 0) { in BN_parse_asn1_unsigned_buggy()
58 return BN_bin2bn(CBS_data(&child), CBS_len(&child), ret) != NULL; in BN_parse_asn1_unsigned_buggy()
/external/boringssl/src/crypto/ec_extra/
Dec_asn1.c110 if (CBS_len(&child) != 0) { in EC_KEY_parse_private_key()
130 BN_bin2bn(CBS_data(&private_key), CBS_len(&private_key), NULL); in EC_KEY_parse_private_key()
152 CBS_len(&public_key) == 0 || in EC_KEY_parse_private_key()
154 CBS_len(&public_key), NULL) || in EC_KEY_parse_private_key()
155 CBS_len(&child) != 0) { in EC_KEY_parse_private_key()
174 if (CBS_len(&ec_private_key) != 0) { in EC_KEY_parse_private_key()
248 if (CBS_len(cbs) == 0) { in is_unsigned_integer()
253 (byte == 0 && CBS_len(cbs) > 1 && (CBS_data(cbs)[1] & 0x80) == 0)) { in is_unsigned_integer()
275 CBS_len(&field_type) != sizeof(kPrimeField) || in parse_explicit_prime_curve()
279 CBS_len(&field_id) != 0 || in parse_explicit_prime_curve()
[all …]
/external/boringssl/src/crypto/evp/
Dp_rsa_asn1.c109 CBS_len(&null) != 0 || in rsa_pub_decode()
110 CBS_len(params) != 0) { in rsa_pub_decode()
122 if (rsa == NULL || CBS_len(key) != 0) { in rsa_pub_decode()
159 CBS_len(&null) != 0 || in rsa_priv_decode()
160 CBS_len(params) != 0) { in rsa_priv_decode()
166 if (rsa == NULL || CBS_len(key) != 0) { in rsa_priv_decode()
Dp_ed25519_asn1.c67 if (CBS_len(params) != 0 || in ed25519_pub_decode()
68 CBS_len(key) != 32) { in ed25519_pub_decode()
108 if (CBS_len(params) != 0 || in ed25519_priv_decode()
110 CBS_len(key) != 0 || in ed25519_priv_decode()
111 CBS_len(&inner) != 32) { in ed25519_priv_decode()
Dp_dsa_asn1.c72 if (CBS_len(params) == 0) { in dsa_pub_decode()
79 if (dsa == NULL || CBS_len(params) != 0) { in dsa_pub_decode()
91 CBS_len(key) != 0) { in dsa_pub_decode()
133 if (dsa == NULL || CBS_len(params) != 0) { in dsa_priv_decode()
146 CBS_len(key) != 0) { in dsa_priv_decode()
Dp_ec_asn1.c99 if (group == NULL || CBS_len(params) != 0) { in eckey_pub_decode()
111 !EC_POINT_oct2point(group, point, CBS_data(key), CBS_len(key), NULL) || in eckey_pub_decode()
146 if (group == NULL || CBS_len(params) != 0) { in eckey_priv_decode()
154 if (ec_key == NULL || CBS_len(key) != 0) { in eckey_priv_decode()
/external/boringssl/src/crypto/digest_extra/
Ddigest_extra.c143 if (CBS_len(cbs) == kMDOIDs[i].oid_len && in cbs_to_md()
182 if (CBS_len(&algorithm) > 0) { in EVP_parse_digest_algorithm()
185 CBS_len(&param) != 0 || in EVP_parse_digest_algorithm()
186 CBS_len(&algorithm) != 0) { in EVP_parse_digest_algorithm()
/external/boringssl/src/crypto/pkcs7/
Dpkcs7_x509.c91 while (CBS_len(&crls) > 0) { in PKCS7_get_CRLs()
100 if (CBS_len(&crl_data) > LONG_MAX) { in PKCS7_get_CRLs()
104 crl = d2i_X509_CRL(NULL, &inp, (long)CBS_len(&crl_data)); in PKCS7_get_CRLs()
109 assert(inp == CBS_data(&crl_data) + CBS_len(&crl_data)); in PKCS7_get_CRLs()
Dpkcs7.c56 CBS_init(&in, CBS_data(cbs), CBS_len(cbs)); in pkcs7_parse_header()
86 CBS_init(out, CBS_data(&signed_data), CBS_len(&signed_data)); in pkcs7_parse_header()
113 while (CBS_len(&certificates) > 0) { in PKCS7_get_raw_certificates()
/external/boringssl/src/crypto/rsa_extra/
Drsa_asn1.c106 CBS_len(&child) != 0) { in parse_public_key()
138 if (ret == NULL || CBS_len(&cbs) != 0) { in RSA_public_key_from_bytes()
206 if (CBS_len(&child) != 0) { in RSA_parse_private_key()
227 if (ret == NULL || CBS_len(&cbs) != 0) { in RSA_private_key_from_bytes()

12