Lines Matching refs:cbs
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()
254 CBS cbs; in d2i_PrivateKey() local
255 CBS_init(&cbs, *inp, (size_t)len); in d2i_PrivateKey()
256 EVP_PKEY *ret = old_priv_decode(&cbs, type); in d2i_PrivateKey()
260 CBS_init(&cbs, *inp, (size_t)len); in d2i_PrivateKey()
261 ret = EVP_parse_private_key(&cbs); in d2i_PrivateKey()
276 *inp = CBS_data(&cbs); in d2i_PrivateKey()
283 CBS cbs, sequence; in num_elements() local
284 CBS_init(&cbs, in, (size_t)in_len); in num_elements()
286 if (!CBS_get_asn1(&cbs, &sequence, CBS_ASN1_SEQUENCE)) { in num_elements()
309 CBS cbs; in d2i_AutoPrivateKey() local
310 CBS_init(&cbs, *inp, (size_t)len); in d2i_AutoPrivateKey()
311 EVP_PKEY *ret = EVP_parse_private_key(&cbs); in d2i_AutoPrivateKey()
317 *inp = CBS_data(&cbs); in d2i_AutoPrivateKey()
356 CBS cbs; in d2i_PublicKey() local
357 CBS_init(&cbs, *inp, len < 0 ? 0 : (size_t)len); in d2i_PublicKey()
360 RSA *rsa = RSA_parse_public_key(&cbs); in d2i_PublicKey()
378 *inp = CBS_data(&cbs); in d2i_PublicKey()