Home
last modified time | relevance | path

Searched refs:CBS (Results 1 – 25 of 99) sorted by relevance

1234

/external/boringssl/src/crypto/bytestring/
Dcbs.c27 void CBS_init(CBS *cbs, const uint8_t *data, size_t len) { in CBS_init()
32 static int cbs_get(CBS *cbs, const uint8_t **p, size_t n) { in cbs_get()
43 int CBS_skip(CBS *cbs, size_t len) { in CBS_skip()
48 const uint8_t *CBS_data(const CBS *cbs) { in CBS_data()
52 size_t CBS_len(const CBS *cbs) { in CBS_len()
56 int CBS_stow(const CBS *cbs, uint8_t **out_ptr, size_t *out_len) { in CBS_stow()
72 int CBS_strdup(const CBS *cbs, char **out_ptr) { in CBS_strdup()
80 int CBS_contains_zero_byte(const CBS *cbs) { in CBS_contains_zero_byte()
84 int CBS_mem_equal(const CBS *cbs, const uint8_t *data, size_t len) { in CBS_mem_equal()
91 static int cbs_get_u(CBS *cbs, uint64_t *out, size_t len) { in cbs_get_u()
[all …]
Dinternal.h40 OPENSSL_EXPORT int CBS_asn1_ber_to_der(CBS *in, CBS *out,
55 OPENSSL_EXPORT int CBS_get_asn1_implicit_string(CBS *in, CBS *out,
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);
Dber.c56 static int cbs_find_ber(const CBS *orig_in, char *ber_found, unsigned depth) { in cbs_find_ber()
57 CBS in; in cbs_find_ber()
67 CBS contents; in cbs_find_ber()
99 static char is_eoc(size_t header_len, CBS *contents) { in is_eoc()
111 static int cbs_convert_ber(CBS *in, CBB *out, unsigned string_tag, in cbs_convert_ber()
120 CBS contents; in cbs_convert_ber()
192 int CBS_asn1_ber_to_der(CBS *in, CBS *out, uint8_t **out_storage) { in CBS_asn1_ber_to_der()
222 int CBS_get_asn1_implicit_string(CBS *in, CBS *out, uint8_t **out_storage, in CBS_get_asn1_implicit_string()
238 CBS child; in CBS_get_asn1_implicit_string()
245 CBS chunk; in CBS_get_asn1_implicit_string()
Dunicode.c41 int cbs_get_utf8(CBS *cbs, uint32_t *out) { in cbs_get_utf8()
83 int cbs_get_latin1(CBS *cbs, uint32_t *out) { in cbs_get_latin1()
92 int cbs_get_ucs2_be(CBS *cbs, uint32_t *out) { in cbs_get_ucs2_be()
103 int cbs_get_utf32_be(CBS *cbs, uint32_t *out) { in cbs_get_utf32_be()
/external/boringssl/src/include/openssl/
Dbytestring.h59 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/ssl/
Dt1_lib.cc152 static bool tls1_check_duplicate_extensions(const CBS *cbs) { in tls1_check_duplicate_extensions()
155 CBS extensions = *cbs; in tls1_check_duplicate_extensions()
158 CBS extension; in tls1_check_duplicate_extensions()
180 CBS extension; in tls1_check_duplicate_extensions()
213 CBS client_hello, random, session_id; in ssl_client_hello_init()
229 CBS cookie; in ssl_client_hello_init()
236 CBS cipher_suites, compression_methods; in ssl_client_hello_init()
258 CBS extensions; in ssl_client_hello_init()
272 CBS *out, uint16_t extension_type) { in ssl_client_hello_get_extension()
273 CBS extensions; in ssl_client_hello_get_extension()
[all …]
Dssl_asn1.cc399 static int SSL_SESSION_parse_string(CBS *cbs, UniquePtr<char> *out, unsigned tag) { in SSL_SESSION_parse_string()
400 CBS value; 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()
428 CBS value; in SSL_SESSION_parse_octet_string()
436 static int SSL_SESSION_parse_crypto_buffer(CBS *cbs, in SSL_SESSION_parse_crypto_buffer()
444 CBS child, value; 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()
463 CBS value; 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()
487 static int SSL_SESSION_parse_u32(CBS *cbs, uint32_t *out, unsigned tag, in SSL_SESSION_parse_u32()
[all …]
Dssl_cert.cc233 CBS cert_cbs; in check_leaf_cert_and_privkey()
350 uint8_t *out_leaf_sha256, CBS *cbs, in ssl_parse_cert_chain()
355 CBS certificate_list; in ssl_parse_cert_chain()
375 CBS certificate; in ssl_parse_cert_chain()
441 static bool ssl_cert_skip_to_spki(const CBS *in, CBS *out_tbs_cert) { in ssl_cert_skip_to_spki()
457 CBS buf = *in; in ssl_cert_skip_to_spki()
459 CBS toplevel; in ssl_cert_skip_to_spki()
483 UniquePtr<EVP_PKEY> ssl_cert_parse_pubkey(const CBS *in) { in ssl_cert_parse_pubkey()
484 CBS buf = *in, tbs_cert; in ssl_cert_parse_pubkey()
531 CBS cert_cbs; in ssl_cert_check_private_key()
[all …]
/external/boringssl/src/crypto/ec_extra/
Dec_asn1.c75 EC_KEY *EC_KEY_parse_private_key(CBS *cbs, const EC_GROUP *group) { in EC_KEY_parse_private_key()
76 CBS ec_private_key, private_key; in EC_KEY_parse_private_key()
95 CBS child; in EC_KEY_parse_private_key()
138 CBS child, public_key; in EC_KEY_parse_private_key()
246 static int is_unsigned_integer(const CBS *cbs) { in is_unsigned_integer()
262 static int parse_explicit_prime_curve(CBS *in, CBS *out_prime, CBS *out_a, in parse_explicit_prime_curve()
263 CBS *out_b, CBS *out_base_x, in parse_explicit_prime_curve()
264 CBS *out_base_y, CBS *out_order) { in parse_explicit_prime_curve()
267 CBS params, field_id, field_type, curve, base, cofactor; in parse_explicit_prime_curve()
326 static int integers_equal(const CBS *a, const uint8_t *b, size_t b_len) { in integers_equal()
[all …]
/external/boringssl/src/crypto/dsa/
Ddsa_asn1.c67 static int parse_integer(CBS *cbs, BIGNUM **out) { in parse_integer()
85 DSA_SIG *DSA_SIG_parse(CBS *cbs) { in DSA_SIG_parse()
90 CBS child; in DSA_SIG_parse()
114 DSA *DSA_parse_public_key(CBS *cbs) { in DSA_parse_public_key()
119 CBS child; in DSA_parse_public_key()
147 DSA *DSA_parse_parameters(CBS *cbs) { in DSA_parse_parameters()
152 CBS child; in DSA_parse_parameters()
178 DSA *DSA_parse_private_key(CBS *cbs) { in DSA_parse_private_key()
184 CBS child; in DSA_parse_private_key()
233 CBS cbs; in d2i_DSA_SIG()
[all …]
/external/boringssl/src/crypto/evp/
Devp_asn1.c79 static int parse_key_type(CBS *cbs, int *out_type) { in parse_key_type()
80 CBS oid; in parse_key_type()
97 EVP_PKEY *EVP_parse_public_key(CBS *cbs) { in EVP_parse_public_key()
99 CBS spki, algorithm, key; in EVP_parse_public_key()
153 EVP_PKEY *EVP_parse_private_key(CBS *cbs) { in EVP_parse_private_key()
155 CBS pkcs8, algorithm, key; in EVP_parse_private_key()
205 static EVP_PKEY *old_priv_decode(CBS *cbs, int type) { in old_priv_decode()
254 CBS cbs; in d2i_PrivateKey()
283 CBS cbs, sequence; in num_elements()
309 CBS cbs; in d2i_AutoPrivateKey()
[all …]
Dp_rsa_asn1.c88 static int rsa_pub_decode(EVP_PKEY *out, CBS *params, CBS *key) { in rsa_pub_decode()
92 CBS null; in rsa_pub_decode()
134 static int rsa_priv_decode(EVP_PKEY *out, CBS *params, CBS *key) { in rsa_priv_decode()
136 CBS null; in rsa_priv_decode()
Dp_ed25519_asn1.c116 static int ed25519_pub_decode(EVP_PKEY *out, CBS *params, CBS *key) { in ed25519_pub_decode()
154 static int ed25519_priv_decode(EVP_PKEY *out, CBS *params, CBS *key) { in ed25519_priv_decode()
159 CBS inner; in ed25519_priv_decode()
Dp_x25519_asn1.c114 static int x25519_pub_decode(EVP_PKEY *out, CBS *params, CBS *key) { in x25519_pub_decode()
152 static int x25519_priv_decode(EVP_PKEY *out, CBS *params, CBS *key) { in x25519_priv_decode()
157 CBS inner; in x25519_priv_decode()
/external/boringssl/src/crypto/pkcs7/
Dpkcs7.c43 int pkcs7_parse_header(uint8_t **der_bytes, CBS *out, CBS *cbs) { in pkcs7_parse_header()
44 CBS in, content_info, content_type, wrapped_signed_data, signed_data; in pkcs7_parse_header()
86 int PKCS7_get_raw_certificates(STACK_OF(CRYPTO_BUFFER) *out_certs, CBS *cbs, in PKCS7_get_raw_certificates()
88 CBS signed_data, certificates; in PKCS7_get_raw_certificates()
106 CBS cert; in PKCS7_get_raw_certificates()
Dpkcs7_x509.c32 int PKCS7_get_certificates(STACK_OF(X509) *out_certs, CBS *cbs) { in PKCS7_get_certificates()
65 int PKCS7_get_CRLs(STACK_OF(X509_CRL) *out_crls, CBS *cbs) { in PKCS7_get_CRLs()
66 CBS signed_data, crls; in PKCS7_get_CRLs()
89 CBS crl_data; in PKCS7_get_CRLs()
143 CBS cbs; in PKCS7_get_PEM_certificates()
165 CBS cbs; in PKCS7_get_PEM_CRLs()
232 static PKCS7 *pkcs7_new(CBS *cbs) { in pkcs7_new()
245 CBS copy = *cbs, copy2 = *cbs; in pkcs7_new()
277 CBS cbs; in d2i_PKCS7()
300 CBS cbs; in d2i_PKCS7_bio()
[all …]
Dinternal.h33 int pkcs7_parse_header(uint8_t **der_bytes, CBS *out, CBS *cbs);
/external/boringssl/src/crypto/rsa_extra/
Drsa_asn1.c72 static int parse_integer(CBS *cbs, BIGNUM **out) { in parse_integer()
90 RSA *RSA_parse_public_key(CBS *cbs) { in RSA_parse_public_key()
95 CBS child; in RSA_parse_public_key()
116 CBS cbs; in RSA_public_key_from_bytes()
157 RSA *RSA_parse_private_key(CBS *cbs) { in RSA_parse_private_key()
163 CBS child; in RSA_parse_private_key()
205 CBS cbs; in RSA_private_key_from_bytes()
253 CBS cbs; in d2i_RSAPublicKey()
281 CBS cbs; in d2i_RSAPrivateKey()
/external/boringssl/src/crypto/pkcs8/
Dpkcs8_x509.c124 CBS cbs;
186 CBS cbs; in PKCS8_decrypt()
255 CBS *sequence, struct pkcs12_context *ctx, in PKCS12_handle_sequence()
256 int (*handle_element)(CBS *cbs, struct pkcs12_context *ctx)) { in PKCS12_handle_sequence()
258 CBS in; in PKCS12_handle_sequence()
270 CBS child; in PKCS12_handle_sequence()
278 CBS element; in PKCS12_handle_sequence()
324 static int parse_bag_attributes(CBS *attrs, uint8_t **out_friendly_name, in parse_bag_attributes()
331 CBS attr, oid, values; in parse_bag_attributes()
341 CBS value; in parse_bag_attributes()
[all …]
Dp5_pbev2.c121 static const EVP_CIPHER *cbs_to_cipher(const CBS *cbs) { in cbs_to_cipher()
214 const char *pass, size_t pass_len, CBS *param) { in PKCS5_pbe2_decrypt_init()
215 CBS pbe_param, kdf, kdf_obj, enc_scheme, enc_obj; in PKCS5_pbe2_decrypt_init()
241 CBS pbkdf2_params, salt; in PKCS5_pbe2_decrypt_init()
273 CBS alg_id, prf; in PKCS5_pbe2_decrypt_init()
293 CBS null; in PKCS5_pbe2_decrypt_init()
306 CBS iv; in PKCS5_pbe2_decrypt_init()
Dinternal.h70 int pkcs8_pbe_decrypt(uint8_t **out, size_t *out_len, CBS *algorithm,
105 const char *pass, size_t pass_len, CBS *param);
112 const char *pass, size_t pass_len, CBS *param);
Dpkcs8.c85 CBS cbs; in pkcs12_encode_password()
259 size_t pass_len, CBS *param) { in pkcs12_pbe_decrypt_init()
260 CBS pbe_param, salt; in pkcs12_pbe_decrypt_init()
360 int pkcs8_pbe_decrypt(uint8_t **out, size_t *out_len, CBS *algorithm, in pkcs8_pbe_decrypt()
368 CBS obj; in pkcs8_pbe_decrypt()
419 EVP_PKEY *PKCS8_parse_encrypted_private_key(CBS *cbs, const char *pass, in PKCS8_parse_encrypted_private_key()
422 CBS epki, algorithm, ciphertext; in PKCS8_parse_encrypted_private_key()
438 CBS pki; in PKCS8_parse_encrypted_private_key()
/external/boringssl/src/crypto/dh/
Ddh_asn1.c68 static int parse_integer(CBS *cbs, BIGNUM **out) { in parse_integer()
86 DH *DH_parse_parameters(CBS *cbs) { in DH_parse_parameters()
92 CBS child; in DH_parse_parameters()
138 CBS cbs; in d2i_DHparams()
/external/boringssl/src/crypto/digest_extra/
Ddigest_extra.c140 static const EVP_MD *cbs_to_md(const CBS *cbs) { in cbs_to_md()
158 CBS cbs; in EVP_get_digestbyobj()
163 const EVP_MD *EVP_parse_digest_algorithm(CBS *cbs) { in EVP_parse_digest_algorithm()
164 CBS algorithm, oid; in EVP_parse_digest_algorithm()
182 CBS param; in EVP_parse_digest_algorithm()
/external/boringssl/src/ssl/test/
Dfuzzer.h295 CBS cbs; in TestOneInput()
436 CBS cbs; in Init()
450 bssl::UniquePtr<SSL> SetupTest(CBS *cbs) { in SetupTest()
474 CBS data; in SetupTest()
500 CBS handoff; in SetupTest()
510 CBS handback; in SetupTest()
527 CBS cbs;
552 CBS packet; in BIORead()

1234