Lines Matching refs:oid
335 static int oid_is_rsadsi(struct asn1_oid *oid) in oid_is_rsadsi() argument
337 return oid->len >= 4 && in oid_is_rsadsi()
338 oid->oid[0] == 1 /* iso */ && in oid_is_rsadsi()
339 oid->oid[1] == 2 /* member-body */ && in oid_is_rsadsi()
340 oid->oid[2] == 840 /* us */ && in oid_is_rsadsi()
341 oid->oid[3] == 113549 /* rsadsi */; in oid_is_rsadsi()
345 static int pkcs12_is_bagtype_oid(struct asn1_oid *oid, unsigned long type) in pkcs12_is_bagtype_oid() argument
347 return oid->len == 9 && in pkcs12_is_bagtype_oid()
348 oid_is_rsadsi(oid) && in pkcs12_is_bagtype_oid()
349 oid->oid[4] == 1 /* pkcs */ && in pkcs12_is_bagtype_oid()
350 oid->oid[5] == 12 /* pkcs-12 */ && in pkcs12_is_bagtype_oid()
351 oid->oid[6] == 10 && in pkcs12_is_bagtype_oid()
352 oid->oid[7] == 1 /* bagtypes */ && in pkcs12_is_bagtype_oid()
353 oid->oid[8] == type; in pkcs12_is_bagtype_oid()
357 static int is_oid_pkcs7(struct asn1_oid *oid) in is_oid_pkcs7() argument
359 return oid->len == 7 && in is_oid_pkcs7()
360 oid->oid[0] == 1 /* iso */ && in is_oid_pkcs7()
361 oid->oid[1] == 2 /* member-body */ && in is_oid_pkcs7()
362 oid->oid[2] == 840 /* us */ && in is_oid_pkcs7()
363 oid->oid[3] == 113549 /* rsadsi */ && in is_oid_pkcs7()
364 oid->oid[4] == 1 /* pkcs */ && in is_oid_pkcs7()
365 oid->oid[5] == 7 /* pkcs-7 */; in is_oid_pkcs7()
369 static int is_oid_pkcs7_data(struct asn1_oid *oid) in is_oid_pkcs7_data() argument
371 return is_oid_pkcs7(oid) && oid->oid[6] == 1 /* data */; in is_oid_pkcs7_data()
375 static int is_oid_pkcs7_enc_data(struct asn1_oid *oid) in is_oid_pkcs7_enc_data() argument
377 return is_oid_pkcs7(oid) && oid->oid[6] == 6 /* encryptedData */; in is_oid_pkcs7_enc_data()
381 static int is_oid_pkcs9(struct asn1_oid *oid) in is_oid_pkcs9() argument
383 return oid->len >= 6 && in is_oid_pkcs9()
384 oid->oid[0] == 1 /* iso */ && in is_oid_pkcs9()
385 oid->oid[1] == 2 /* member-body */ && in is_oid_pkcs9()
386 oid->oid[2] == 840 /* us */ && in is_oid_pkcs9()
387 oid->oid[3] == 113549 /* rsadsi */ && in is_oid_pkcs9()
388 oid->oid[4] == 1 /* pkcs */ && in is_oid_pkcs9()
389 oid->oid[5] == 9 /* pkcs-9 */; in is_oid_pkcs9()
393 static int is_oid_pkcs9_friendly_name(struct asn1_oid *oid) in is_oid_pkcs9_friendly_name() argument
395 return oid->len == 7 && is_oid_pkcs9(oid) && in is_oid_pkcs9_friendly_name()
396 oid->oid[6] == 20; in is_oid_pkcs9_friendly_name()
400 static int is_oid_pkcs9_local_key_id(struct asn1_oid *oid) in is_oid_pkcs9_local_key_id() argument
402 return oid->len == 7 && is_oid_pkcs9(oid) && in is_oid_pkcs9_local_key_id()
403 oid->oid[6] == 21; in is_oid_pkcs9_local_key_id()
407 static int is_oid_pkcs9_x509_cert(struct asn1_oid *oid) in is_oid_pkcs9_x509_cert() argument
409 return oid->len == 8 && is_oid_pkcs9(oid) && in is_oid_pkcs9_x509_cert()
410 oid->oid[6] == 22 /* certTypes */ && in is_oid_pkcs9_x509_cert()
411 oid->oid[7] == 1 /* x509Certificate */; in is_oid_pkcs9_x509_cert()
447 struct asn1_oid oid; in pkcs12_certbag() local
470 if (asn1_get_oid(pos, end - pos, &oid, &pos)) { in pkcs12_certbag()
476 asn1_oid_to_str(&oid, obuf, sizeof(obuf)); in pkcs12_certbag()
479 if (!is_oid_pkcs9_x509_cert(&oid)) { in pkcs12_certbag()
626 struct asn1_oid oid; in pkcs12_safebag() local
635 if (asn1_get_oid(pos, end - pos, &oid, &pos)) { in pkcs12_safebag()
641 asn1_oid_to_str(&oid, obuf, sizeof(obuf)); in pkcs12_safebag()
688 if (pkcs12_is_bagtype_oid(&oid, 1)) in pkcs12_safebag()
690 if (pkcs12_is_bagtype_oid(&oid, 2)) in pkcs12_safebag()
692 if (pkcs12_is_bagtype_oid(&oid, 3)) in pkcs12_safebag()
772 struct asn1_oid oid; in pkcs12_parse_content_enc_data() local
830 if (asn1_get_oid(pos, end - pos, &oid, &pos)) { in pkcs12_parse_content_enc_data()
835 asn1_oid_to_str(&oid, buf, sizeof(buf)); in pkcs12_parse_content_enc_data()
839 if (!is_oid_pkcs7_data(&oid)) { in pkcs12_parse_content_enc_data()
888 struct asn1_oid oid; in pkcs12_parse_content() local
894 if (asn1_get_oid(pos, end - pos, &oid, &pos)) { in pkcs12_parse_content()
900 asn1_oid_to_str(&oid, txt, sizeof(txt)); in pkcs12_parse_content()
913 if (is_oid_pkcs7_data(&oid)) in pkcs12_parse_content()
915 if (is_oid_pkcs7_enc_data(&oid)) in pkcs12_parse_content()
930 struct asn1_oid oid; in pkcs12_parse() local
985 if (asn1_get_oid(pos, end - pos, &oid, &pos)) { in pkcs12_parse()
990 asn1_oid_to_str(&oid, buf, sizeof(buf)); in pkcs12_parse()
992 if (!is_oid_pkcs7_data(&oid)) { in pkcs12_parse()