Home
last modified time | relevance | path

Searched refs:CBB_add_asn1 (Results 1 – 25 of 33) sorted by relevance

12

/external/boringssl/src/crypto/evp/
Dp_rsa_asn1.c72 if (!CBB_add_asn1(out, &spki, CBS_ASN1_SEQUENCE) || in rsa_pub_encode()
73 !CBB_add_asn1(&spki, &algorithm, CBS_ASN1_SEQUENCE) || in rsa_pub_encode()
74 !CBB_add_asn1(&algorithm, &oid, CBS_ASN1_OBJECT) || in rsa_pub_encode()
76 !CBB_add_asn1(&algorithm, &null, CBS_ASN1_NULL) || in rsa_pub_encode()
77 !CBB_add_asn1(&spki, &key_bitstring, CBS_ASN1_BITSTRING) || in rsa_pub_encode()
118 if (!CBB_add_asn1(out, &pkcs8, CBS_ASN1_SEQUENCE) || in rsa_priv_encode()
120 !CBB_add_asn1(&pkcs8, &algorithm, CBS_ASN1_SEQUENCE) || in rsa_priv_encode()
121 !CBB_add_asn1(&algorithm, &oid, CBS_ASN1_OBJECT) || in rsa_priv_encode()
123 !CBB_add_asn1(&algorithm, &null, CBS_ASN1_NULL) || in rsa_priv_encode()
124 !CBB_add_asn1(&pkcs8, &private_key, CBS_ASN1_OCTETSTRING) || in rsa_priv_encode()
Dp_ed25519_asn1.c133 if (!CBB_add_asn1(out, &spki, CBS_ASN1_SEQUENCE) || in ed25519_pub_encode()
134 !CBB_add_asn1(&spki, &algorithm, CBS_ASN1_SEQUENCE) || in ed25519_pub_encode()
135 !CBB_add_asn1(&algorithm, &oid, CBS_ASN1_OBJECT) || in ed25519_pub_encode()
137 !CBB_add_asn1(&spki, &key_bitstring, CBS_ASN1_BITSTRING) || in ed25519_pub_encode()
179 if (!CBB_add_asn1(out, &pkcs8, CBS_ASN1_SEQUENCE) || in ed25519_priv_encode()
181 !CBB_add_asn1(&pkcs8, &algorithm, CBS_ASN1_SEQUENCE) || in ed25519_priv_encode()
182 !CBB_add_asn1(&algorithm, &oid, CBS_ASN1_OBJECT) || in ed25519_priv_encode()
184 !CBB_add_asn1(&pkcs8, &private_key, CBS_ASN1_OCTETSTRING) || in ed25519_priv_encode()
185 !CBB_add_asn1(&private_key, &inner, CBS_ASN1_OCTETSTRING) || in ed25519_priv_encode()
Dp_x25519_asn1.c131 if (!CBB_add_asn1(out, &spki, CBS_ASN1_SEQUENCE) || in x25519_pub_encode()
132 !CBB_add_asn1(&spki, &algorithm, CBS_ASN1_SEQUENCE) || in x25519_pub_encode()
133 !CBB_add_asn1(&algorithm, &oid, CBS_ASN1_OBJECT) || in x25519_pub_encode()
135 !CBB_add_asn1(&spki, &key_bitstring, CBS_ASN1_BITSTRING) || in x25519_pub_encode()
177 if (!CBB_add_asn1(out, &pkcs8, CBS_ASN1_SEQUENCE) || in x25519_priv_encode()
179 !CBB_add_asn1(&pkcs8, &algorithm, CBS_ASN1_SEQUENCE) || in x25519_priv_encode()
180 !CBB_add_asn1(&algorithm, &oid, CBS_ASN1_OBJECT) || in x25519_priv_encode()
182 !CBB_add_asn1(&pkcs8, &private_key, CBS_ASN1_OCTETSTRING) || in x25519_priv_encode()
183 !CBB_add_asn1(&private_key, &inner, CBS_ASN1_OCTETSTRING) || in x25519_priv_encode()
Dp_ec_asn1.c75 if (!CBB_add_asn1(out, &spki, CBS_ASN1_SEQUENCE) || in eckey_pub_encode()
76 !CBB_add_asn1(&spki, &algorithm, CBS_ASN1_SEQUENCE) || in eckey_pub_encode()
77 !CBB_add_asn1(&algorithm, &oid, CBS_ASN1_OBJECT) || in eckey_pub_encode()
80 !CBB_add_asn1(&spki, &key_bitstring, CBS_ASN1_BITSTRING) || in eckey_pub_encode()
175 if (!CBB_add_asn1(out, &pkcs8, CBS_ASN1_SEQUENCE) || in eckey_priv_encode()
177 !CBB_add_asn1(&pkcs8, &algorithm, CBS_ASN1_SEQUENCE) || in eckey_priv_encode()
178 !CBB_add_asn1(&algorithm, &oid, CBS_ASN1_OBJECT) || in eckey_priv_encode()
181 !CBB_add_asn1(&pkcs8, &private_key, CBS_ASN1_OCTETSTRING) || in eckey_priv_encode()
Dp_dsa_asn1.c110 if (!CBB_add_asn1(out, &spki, CBS_ASN1_SEQUENCE) || in dsa_pub_encode()
111 !CBB_add_asn1(&spki, &algorithm, CBS_ASN1_SEQUENCE) || in dsa_pub_encode()
112 !CBB_add_asn1(&algorithm, &oid, CBS_ASN1_OBJECT) || in dsa_pub_encode()
116 !CBB_add_asn1(&spki, &key_bitstring, CBS_ASN1_BITSTRING) || in dsa_pub_encode()
178 if (!CBB_add_asn1(out, &pkcs8, CBS_ASN1_SEQUENCE) || in dsa_priv_encode()
180 !CBB_add_asn1(&pkcs8, &algorithm, CBS_ASN1_SEQUENCE) || in dsa_priv_encode()
181 !CBB_add_asn1(&algorithm, &oid, CBS_ASN1_OBJECT) || in dsa_priv_encode()
184 !CBB_add_asn1(&pkcs8, &private_key, CBS_ASN1_OCTETSTRING) || in dsa_priv_encode()
/external/boringssl/src/crypto/pkcs7/
Dpkcs7.c140 if (!CBB_add_asn1(out, &outer_seq, CBS_ASN1_SEQUENCE) || in pkcs7_bundle()
141 !CBB_add_asn1(&outer_seq, &oid, CBS_ASN1_OBJECT) || in pkcs7_bundle()
143 !CBB_add_asn1(&outer_seq, &wrapped_seq, in pkcs7_bundle()
146 !CBB_add_asn1(&wrapped_seq, &seq, CBS_ASN1_SEQUENCE) || in pkcs7_bundle()
147 !CBB_add_asn1(&seq, &version_bytes, CBS_ASN1_INTEGER) || in pkcs7_bundle()
149 !CBB_add_asn1(&seq, &digest_algos_set, CBS_ASN1_SET) || in pkcs7_bundle()
150 !CBB_add_asn1(&seq, &content_info, CBS_ASN1_SEQUENCE) || in pkcs7_bundle()
151 !CBB_add_asn1(&content_info, &oid, CBS_ASN1_OBJECT) || in pkcs7_bundle()
154 !CBB_add_asn1(&seq, &signer_infos, CBS_ASN1_SET)) { in pkcs7_bundle()
Dpkcs7_x509.c178 if (!CBB_add_asn1(out, &certificates, in pkcs7_bundle_certificates_cb()
208 if (!CBB_add_asn1(out, &crl_data, in pkcs7_bundle_crls_cb()
/external/boringssl/src/crypto/pkcs8/
Dpkcs8_x509.c977 if (!CBB_add_asn1(bag, &attrs, CBS_ASN1_SET)) { in add_bag_attributes()
982 if (!CBB_add_asn1(&attrs, &attr, CBS_ASN1_SEQUENCE) || in add_bag_attributes()
983 !CBB_add_asn1(&attr, &oid, CBS_ASN1_OBJECT) || in add_bag_attributes()
985 !CBB_add_asn1(&attr, &values, CBS_ASN1_SET) || in add_bag_attributes()
986 !CBB_add_asn1(&values, &value, CBS_ASN1_BMPSTRING)) { in add_bag_attributes()
1003 if (!CBB_add_asn1(&attrs, &attr, CBS_ASN1_SEQUENCE) || in add_bag_attributes()
1004 !CBB_add_asn1(&attr, &oid, CBS_ASN1_OBJECT) || in add_bag_attributes()
1006 !CBB_add_asn1(&attr, &values, CBS_ASN1_SET) || in add_bag_attributes()
1007 !CBB_add_asn1(&values, &value, CBS_ASN1_OCTETSTRING) || in add_bag_attributes()
1020 !CBB_add_asn1(cbb, &bag, CBS_ASN1_SEQUENCE) || in add_cert_bag()
[all …]
Dp5_pbev2.c135 return CBB_add_asn1(out, &child, CBS_ASN1_OBJECT) && in add_cipher_oid()
183 if (!CBB_add_asn1(out, &algorithm, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_encrypt_init()
184 !CBB_add_asn1(&algorithm, &oid, CBS_ASN1_OBJECT) || in PKCS5_pbe2_encrypt_init()
186 !CBB_add_asn1(&algorithm, &param, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_encrypt_init()
187 !CBB_add_asn1(&param, &kdf, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_encrypt_init()
188 !CBB_add_asn1(&kdf, &kdf_oid, CBS_ASN1_OBJECT) || in PKCS5_pbe2_encrypt_init()
190 !CBB_add_asn1(&kdf, &kdf_param, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_encrypt_init()
191 !CBB_add_asn1(&kdf_param, &salt_cbb, CBS_ASN1_OCTETSTRING) || in PKCS5_pbe2_encrypt_init()
198 !CBB_add_asn1(&param, &cipher_cbb, CBS_ASN1_SEQUENCE) || in PKCS5_pbe2_encrypt_init()
202 !CBB_add_asn1(&cipher_cbb, &iv_cbb, CBS_ASN1_OCTETSTRING) || in PKCS5_pbe2_encrypt_init()
Dpkcs8.c345 if (!CBB_add_asn1(out, &algorithm, CBS_ASN1_SEQUENCE) || in pkcs12_pbe_encrypt_init()
346 !CBB_add_asn1(&algorithm, &oid, CBS_ASN1_OBJECT) || in pkcs12_pbe_encrypt_init()
348 !CBB_add_asn1(&algorithm, &param, CBS_ASN1_SEQUENCE) || in pkcs12_pbe_encrypt_init()
349 !CBB_add_asn1(&param, &salt_cbb, CBS_ASN1_OCTETSTRING) || in pkcs12_pbe_encrypt_init()
485 if (!CBB_add_asn1(out, &epki, CBS_ASN1_SEQUENCE)) { in PKCS8_marshal_encrypted_private_key()
514 if (!CBB_add_asn1(&epki, &ciphertext, CBS_ASN1_OCTETSTRING) || in PKCS8_marshal_encrypted_private_key()
/external/boringssl/src/ssl/
Dssl_asn1.cc200 if (!CBB_add_asn1(cbb, &session, CBS_ASN1_SEQUENCE) || in SSL_SESSION_to_bytes_full()
203 !CBB_add_asn1(&session, &child, CBS_ASN1_OCTETSTRING) || in SSL_SESSION_to_bytes_full()
210 !CBB_add_asn1(&session, &child, kTimeTag) || in SSL_SESSION_to_bytes_full()
212 !CBB_add_asn1(&session, &child, kTimeoutTag) || in SSL_SESSION_to_bytes_full()
222 if (!CBB_add_asn1(&session, &child, kPeerTag) || in SSL_SESSION_to_bytes_full()
232 if (!CBB_add_asn1(&session, &child, kSessionIDContextTag) || in SSL_SESSION_to_bytes_full()
239 if (!CBB_add_asn1(&session, &child, kVerifyResultTag) || in SSL_SESSION_to_bytes_full()
247 if (!CBB_add_asn1(&session, &child, kPSKIdentityTag) || in SSL_SESSION_to_bytes_full()
257 if (!CBB_add_asn1(&session, &child, kTicketLifetimeHintTag) || in SSL_SESSION_to_bytes_full()
265 if (!CBB_add_asn1(&session, &child, kTicketTag) || in SSL_SESSION_to_bytes_full()
[all …]
Dhandoff.cc31 if (!CBB_add_asn1(out, &ciphers, CBS_ASN1_OCTETSTRING)) { in serialize_features()
41 if (!CBB_add_asn1(out, &curves, CBS_ASN1_OCTETSTRING)) { in serialize_features()
64 if (!CBB_add_asn1(out, &seq, CBS_ASN1_SEQUENCE) || in SSL_serialize_handoff()
277 if (!CBB_add_asn1(out, &seq, CBS_ASN1_SEQUENCE) || in SSL_serialize_handback()
310 !CBB_add_asn1(&seq, &key_share, CBS_ASN1_SEQUENCE)) { in SSL_serialize_handback()
/external/fsverity-utils/
Dcmd_sign.c163 if (!CBB_add_asn1(&out, &outer_seq, CBS_ASN1_SEQUENCE) || in sign_pkcs7()
165 !CBB_add_asn1(&outer_seq, &wrapped_seq, CBS_ASN1_CONTEXT_SPECIFIC | in sign_pkcs7()
168 !CBB_add_asn1(&wrapped_seq, &seq, CBS_ASN1_SEQUENCE) || in sign_pkcs7()
170 !CBB_add_asn1(&seq, &digest_algos_set, CBS_ASN1_SET) || in sign_pkcs7()
171 !CBB_add_asn1(&digest_algos_set, &digest_algo, CBS_ASN1_SEQUENCE) || in sign_pkcs7()
173 !CBB_add_asn1(&digest_algo, &null, CBS_ASN1_NULL) || in sign_pkcs7()
174 !CBB_add_asn1(&seq, &content_info, CBS_ASN1_SEQUENCE) || in sign_pkcs7()
176 !CBB_add_asn1(&seq, &signer_infos, CBS_ASN1_SET) || in sign_pkcs7()
177 !CBB_add_asn1(&signer_infos, &signer_info, CBS_ASN1_SEQUENCE) || in sign_pkcs7()
179 !CBB_add_asn1(&signer_info, &issuer_and_serial, in sign_pkcs7()
[all …]
/external/boringssl/src/crypto/digest_extra/
Ddigest_extra.c196 if (!CBB_add_asn1(cbb, &algorithm, CBS_ASN1_SEQUENCE) || in EVP_marshal_digest_algorithm()
197 !CBB_add_asn1(&algorithm, &oid, CBS_ASN1_OBJECT)) { in EVP_marshal_digest_algorithm()
220 if (!CBB_add_asn1(&algorithm, &null, CBS_ASN1_NULL) || in EVP_marshal_digest_algorithm()
/external/boringssl/src/crypto/dsa/
Ddsa_asn1.c104 if (!CBB_add_asn1(cbb, &child, CBS_ASN1_SEQUENCE) || in DSA_SIG_marshal()
135 if (!CBB_add_asn1(cbb, &child, CBS_ASN1_SEQUENCE) || in DSA_marshal_public_key()
167 if (!CBB_add_asn1(cbb, &child, CBS_ASN1_SEQUENCE) || in DSA_marshal_parameters()
215 if (!CBB_add_asn1(cbb, &child, CBS_ASN1_SEQUENCE) || in DSA_marshal_private_key()
/external/boringssl/src/crypto/ec_extra/
Dec_asn1.c200 if (!CBB_add_asn1(cbb, &ec_private_key, CBS_ASN1_SEQUENCE) || in EC_KEY_marshal_private_key()
202 !CBB_add_asn1(&ec_private_key, &private_key, CBS_ASN1_OCTETSTRING) || in EC_KEY_marshal_private_key()
212 if (!CBB_add_asn1(&ec_private_key, &child, kParametersTag) || in EC_KEY_marshal_private_key()
223 if (!CBB_add_asn1(&ec_private_key, &child, kPublicKeyTag) || in EC_KEY_marshal_private_key()
224 !CBB_add_asn1(&child, &public_key, CBS_ASN1_BITSTRING) || in EC_KEY_marshal_private_key()
373 return CBB_add_asn1(cbb, &child, CBS_ASN1_OBJECT) && in EC_KEY_marshal_curve_name()
/external/boringssl/src/crypto/bytestring/
Dbytestring_test.cc476 EXPECT_FALSE(CBB_add_asn1(&child, &contents, 1)); in TEST()
504 ASSERT_TRUE(CBB_add_asn1(cbb.get(), &contents, CBS_ASN1_SEQUENCE)); in TEST()
507 CBB_add_asn1(cbb.get(), &contents, in TEST()
511 CBB_add_asn1(cbb.get(), &contents, in TEST()
515 CBB_add_asn1(cbb.get(), &contents, in TEST()
519 CBB_add_asn1(cbb.get(), &contents, in TEST()
529 ASSERT_TRUE(CBB_add_asn1(cbb.get(), &contents, CBS_ASN1_SEQUENCE)); in TEST()
539 ASSERT_TRUE(CBB_add_asn1(cbb.get(), &contents, CBS_ASN1_SEQUENCE)); in TEST()
549 ASSERT_TRUE(CBB_add_asn1(cbb.get(), &contents, CBS_ASN1_SEQUENCE)); in TEST()
550 ASSERT_TRUE(CBB_add_asn1(&contents, &inner_contents, CBS_ASN1_SEQUENCE)); in TEST()
[all …]
Dcbb.c363 int CBB_add_asn1(CBB *cbb, CBB *out_contents, unsigned tag) { in CBB_add_asn1() function
489 if (!CBB_add_asn1(cbb, &child, CBS_ASN1_INTEGER)) { in CBB_add_asn1_uint64()
522 if (!CBB_add_asn1(cbb, &child, CBS_ASN1_OCTETSTRING) || in CBB_add_asn1_octet_string()
533 if (!CBB_add_asn1(cbb, &child, CBS_ASN1_BOOLEAN) || in CBB_add_asn1_bool()
Dber.c149 if (!CBB_add_asn1(out, &out_contents_storage, out_tag)) { in cbs_convert_ber()
/external/boringssl/src/crypto/asn1/
Dasn1_test.cc117 !CBB_add_asn1(cbb.get(), &cbbs[0], CBS_ASN1_SEQUENCE)) {
121 if (!CBB_add_asn1(&cbbs[i - 1], &cbbs[i], CBS_ASN1_SEQUENCE)) {
/external/boringssl/src/crypto/bn_extra/
Dbn_asn1.c53 if (!CBB_add_asn1(cbb, &child, CBS_ASN1_INTEGER) || in BN_marshal_asn1()
/external/boringssl/src/crypto/rsa_extra/
Drsa_asn1.c129 if (!CBB_add_asn1(cbb, &child, CBS_ASN1_SEQUENCE) || in RSA_marshal_public_key()
218 if (!CBB_add_asn1(cbb, &child, CBS_ASN1_SEQUENCE) || in RSA_marshal_private_key()
/external/boringssl/src/crypto/dh/
Ddh_asn1.c122 if (!CBB_add_asn1(cbb, &child, CBS_ASN1_SEQUENCE) || in DH_marshal_parameters()
/external/boringssl/src/ssl/test/
Dtest_state.cc93 !CBB_add_asn1(&out, &ctx_sessions, CBS_ASN1_SEQUENCE)) { in SerializeContextState()
/external/boringssl/src/crypto/ecdsa_extra/
Decdsa_asn1.c183 if (!CBB_add_asn1(cbb, &child, CBS_ASN1_SEQUENCE) || in ECDSA_SIG_marshal()

12