Home | History | Annotate | Download | only in evp

Lines Matching refs:cbs

78 static int parse_key_type(CBS *cbs, int *out_type) {
79 CBS oid;
80 if (!CBS_get_asn1(cbs, &oid, CBS_ASN1_OBJECT)) {
96 EVP_PKEY *EVP_parse_public_key(CBS *cbs) {
98 CBS spki, algorithm, key;
101 if (!CBS_get_asn1(cbs, &spki, CBS_ASN1_SEQUENCE) ||
146 EVP_PKEY *EVP_parse_private_key(CBS *cbs) {
148 CBS pkcs8, algorithm, key;
151 if (!CBS_get_asn1(cbs, &pkcs8, CBS_ASN1_SEQUENCE) ||
195 static EVP_PKEY *old_priv_decode(CBS *cbs, int type) {
203 EC_KEY *ec_key = EC_KEY_parse_private_key(cbs, NULL);
211 DSA *dsa = DSA_parse_private_key(cbs);
219 RSA *rsa = RSA_parse_private_key(cbs);
244 CBS cbs;
245 CBS_init(&cbs, *inp, (size_t)len);
246 EVP_PKEY *ret = old_priv_decode(&cbs, type);
250 CBS_init(&cbs, *inp, (size_t)len);
251 ret = EVP_parse_private_key(&cbs);
266 *inp = CBS_data(&cbs);
273 CBS cbs, sequence;
274 CBS_init(&cbs, in, (size_t)in_len);
276 if (!CBS_get_asn1(&cbs, &sequence, CBS_ASN1_SEQUENCE)) {
299 CBS cbs;
300 CBS_init(&cbs, *inp, (size_t)len);
301 EVP_PKEY *ret = EVP_parse_private_key(&cbs);
307 *inp = CBS_data(&cbs);