Home
last modified time | relevance | path

Searched refs:bag (Results 1 – 25 of 85) sorted by relevance

1234

/third_party/openssl/crypto/pkcs12/
Dp12_sbag.c16 ASN1_TYPE *PKCS12_get_attr(const PKCS12_SAFEBAG *bag, int attr_nid) in PKCS12_get_attr() argument
18 return PKCS12_get_attr_gen(bag->attrib, attr_nid); in PKCS12_get_attr()
22 const ASN1_TYPE *PKCS12_SAFEBAG_get0_attr(const PKCS12_SAFEBAG *bag, in PKCS12_SAFEBAG_get0_attr() argument
25 return PKCS12_get_attr_gen(bag->attrib, attr_nid); in PKCS12_SAFEBAG_get0_attr()
33 const PKCS8_PRIV_KEY_INFO *PKCS12_SAFEBAG_get0_p8inf(const PKCS12_SAFEBAG *bag) in PKCS12_SAFEBAG_get0_p8inf() argument
35 if (PKCS12_SAFEBAG_get_nid(bag) != NID_keyBag) in PKCS12_SAFEBAG_get0_p8inf()
37 return bag->value.keybag; in PKCS12_SAFEBAG_get0_p8inf()
40 const X509_SIG *PKCS12_SAFEBAG_get0_pkcs8(const PKCS12_SAFEBAG *bag) in PKCS12_SAFEBAG_get0_pkcs8() argument
42 if (OBJ_obj2nid(bag->type) != NID_pkcs8ShroudedKeyBag) in PKCS12_SAFEBAG_get0_pkcs8()
44 return bag->value.shkeybag; in PKCS12_SAFEBAG_get0_pkcs8()
[all …]
Dp12_crt.c16 PKCS12_SAFEBAG *bag);
18 static int copy_bag_attr(PKCS12_SAFEBAG *bag, EVP_PKEY *pkey, int nid) in copy_bag_attr() argument
26 if (!X509at_add1_attr(&bag->attrib, attr)) in copy_bag_attr()
38 PKCS12_SAFEBAG *bag = NULL; in PKCS12_create() local
70 bag = PKCS12_add_cert(&bags, cert); in PKCS12_create()
71 if (name && !PKCS12_add_friendlyname(bag, name, -1)) in PKCS12_create()
73 if (keyidlen && !PKCS12_add_localkeyid(bag, keyid, keyidlen)) in PKCS12_create()
90 bag = PKCS12_add_key(&bags, pkey, keytype, iter, nid_key, pass); in PKCS12_create()
92 if (!bag) in PKCS12_create()
95 if (!copy_bag_attr(bag, pkey, NID_ms_csp_name)) in PKCS12_create()
[all …]
Dp12_attr.c17 int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, unsigned char *name, in PKCS12_add_localkeyid() argument
20 if (X509at_add1_attr_by_NID(&bag->attrib, NID_localKeyID, in PKCS12_add_localkeyid()
38 int PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, const char *name, in PKCS12_add_friendlyname_asc() argument
41 if (X509at_add1_attr_by_NID(&bag->attrib, NID_friendlyName, in PKCS12_add_friendlyname_asc()
48 int PKCS12_add_friendlyname_utf8(PKCS12_SAFEBAG *bag, const char *name, in PKCS12_add_friendlyname_utf8() argument
51 if (X509at_add1_attr_by_NID(&bag->attrib, NID_friendlyName, in PKCS12_add_friendlyname_utf8()
58 int PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag, in PKCS12_add_friendlyname_uni() argument
61 if (X509at_add1_attr_by_NID(&bag->attrib, NID_friendlyName, in PKCS12_add_friendlyname_uni()
68 int PKCS12_add_CSPName_asc(PKCS12_SAFEBAG *bag, const char *name, int namelen) in PKCS12_add_CSPName_asc() argument
70 if (X509at_add1_attr_by_NID(&bag->attrib, NID_ms_csp_name, in PKCS12_add_CSPName_asc()
[all …]
Dp12_add.c20 PKCS12_BAGS *bag; in PKCS12_item_pack_safebag() local
23 if ((bag = PKCS12_BAGS_new()) == NULL) { in PKCS12_item_pack_safebag()
27 bag->type = OBJ_nid2obj(nid1); in PKCS12_item_pack_safebag()
28 if (!ASN1_item_pack(obj, it, &bag->value.octet)) { in PKCS12_item_pack_safebag()
36 safebag->value.bag = bag; in PKCS12_item_pack_safebag()
41 PKCS12_BAGS_free(bag); in PKCS12_item_pack_safebag()
141 PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey(const PKCS12_SAFEBAG *bag, in PKCS12_decrypt_skey() argument
144 return PKCS8_decrypt(bag->value.shkeybag, pass, passlen); in PKCS12_decrypt_skey()
Dp12_kiss.c22 static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen,
177 static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, in parse_bag() argument
186 if ((attrib = PKCS12_SAFEBAG_get0_attr(bag, NID_friendlyName))) in parse_bag()
189 if ((attrib = PKCS12_SAFEBAG_get0_attr(bag, NID_localKeyID))) in parse_bag()
192 switch (PKCS12_SAFEBAG_get_nid(bag)) { in parse_bag()
196 *pkey = EVP_PKCS82PKEY(PKCS12_SAFEBAG_get0_p8inf(bag)); in parse_bag()
204 if ((p8 = PKCS12_decrypt_skey(bag, pass, passlen)) == NULL) in parse_bag()
213 if (PKCS12_SAFEBAG_get_bag_nid(bag) != NID_x509Certificate) in parse_bag()
215 if ((x509 = PKCS12_SAFEBAG_get1_cert(bag)) == NULL) in parse_bag()
243 return parse_bags(PKCS12_SAFEBAG_get0_safes(bag), pass, passlen, pkey, in parse_bag()
Dp12_npas.c23 static int newpass_bag(PKCS12_SAFEBAG *bag, const char *oldpass,
146 static int newpass_bag(PKCS12_SAFEBAG *bag, const char *oldpass, in newpass_bag() argument
154 if (PKCS12_SAFEBAG_get_nid(bag) != NID_pkcs8ShroudedKeyBag) in newpass_bag()
157 if ((p8 = PKCS8_decrypt(bag->value.shkeybag, oldpass, -1)) == NULL) in newpass_bag()
159 X509_SIG_get0(bag->value.shkeybag, &shalg, NULL); in newpass_bag()
167 X509_SIG_free(bag->value.shkeybag); in newpass_bag()
168 bag->value.shkeybag = p8new; in newpass_bag()
Dp12_asn.c55 ADB_ENTRY(NID_certBag, ASN1_EXP(PKCS12_SAFEBAG, value.bag, PKCS12_BAGS, 0)),
56 ADB_ENTRY(NID_crlBag, ASN1_EXP(PKCS12_SAFEBAG, value.bag, PKCS12_BAGS, 0)),
57 ADB_ENTRY(NID_secretBag, ASN1_EXP(PKCS12_SAFEBAG, value.bag, PKCS12_BAGS, 0))
/third_party/alsa-lib/src/mixer/
Dbag.c24 int bag_new(bag_t **bag) in bag_new() argument
30 *bag = b; in bag_new()
34 void bag_free(bag_t *bag) in bag_free() argument
36 assert(list_empty(bag)); in bag_free()
37 free(bag); in bag_free()
40 int bag_empty(bag_t *bag) in bag_empty() argument
42 return list_empty(bag); in bag_empty()
45 int bag_add(bag_t *bag, void *ptr) in bag_add() argument
51 list_add_tail(&b->list, bag); in bag_add()
55 int bag_del(bag_t *bag, void *ptr) in bag_del() argument
[all …]
Dmixer_local.h32 int bag_new(bag_t **bag);
33 void bag_free(bag_t *bag);
34 int bag_add(bag_t *bag, void *ptr);
35 int bag_del(bag_t *bag, void *ptr);
36 int bag_empty(bag_t *bag);
37 void bag_del_all(bag_t *bag);
42 #define bag_for_each(pos, bag) list_for_each(pos, bag) argument
43 #define bag_for_each_safe(pos, next, bag) list_for_each_safe(pos, next, bag) argument
Dmixer.c94 bag_t *bag = snd_hctl_elem_get_callback_private(helem); in snd_mixer_elem_attach() local
96 err = bag_add(bag, melem); in snd_mixer_elem_attach()
113 bag_t *bag = snd_hctl_elem_get_callback_private(helem); in snd_mixer_elem_detach() local
115 err = bag_del(bag, melem); in snd_mixer_elem_detach()
137 bag_t *bag = snd_hctl_elem_get_callback_private(helem); in hctl_elem_event_handler() local
142 bag_for_each_safe(i, n, bag) { in hctl_elem_event_handler()
149 assert(bag_empty(bag)); in hctl_elem_event_handler()
150 bag_free(bag); in hctl_elem_event_handler()
156 bag_for_each_safe(i, n, bag) { in hctl_elem_event_handler()
174 bag_t *bag; in hctl_event_handler() local
[all …]
DMakefile.am3 libmixer_la_SOURCES = bag.c mixer.c simple.c simple_none.c
/third_party/openssl/include/openssl/
Dpkcs12.h75 DEPRECATEDIN_1_1_0(ASN1_TYPE *PKCS12_get_attr(const PKCS12_SAFEBAG *bag, int attr_nid))
85 const ASN1_TYPE *PKCS12_SAFEBAG_get0_attr(const PKCS12_SAFEBAG *bag,
87 const ASN1_OBJECT *PKCS12_SAFEBAG_get0_type(const PKCS12_SAFEBAG *bag);
88 int PKCS12_SAFEBAG_get_nid(const PKCS12_SAFEBAG *bag);
89 int PKCS12_SAFEBAG_get_bag_nid(const PKCS12_SAFEBAG *bag);
91 X509 *PKCS12_SAFEBAG_get1_cert(const PKCS12_SAFEBAG *bag);
92 X509_CRL *PKCS12_SAFEBAG_get1_crl(const PKCS12_SAFEBAG *bag);
94 PKCS12_SAFEBAG_get0_safes(const PKCS12_SAFEBAG *bag);
95 const PKCS8_PRIV_KEY_INFO *PKCS12_SAFEBAG_get0_p8inf(const PKCS12_SAFEBAG *bag);
96 const X509_SIG *PKCS12_SAFEBAG_get0_pkcs8(const PKCS12_SAFEBAG *bag);
[all …]
/third_party/python/Lib/test/test_asyncio/
Dtest_futures.py669 def _make_callback(self, bag, thing): argument
672 bag.append(thing)
679 bag = []
682 cb1 = self._make_callback(bag, 42)
683 cb2 = self._make_callback(bag, 17)
684 cb3 = self._make_callback(bag, 100)
693 self.assertEqual(bag, [])
698 self.assertEqual(bag, [17, 100])
702 bag = []
705 cb1 = self._make_callback(bag, 42)
[all …]
/third_party/grpc/src/core/lib/iomgr/
Dpollset_set.cc47 void grpc_pollset_set_add_pollset_set(grpc_pollset_set* bag, in grpc_pollset_set_add_pollset_set() argument
49 grpc_pollset_set_impl->add_pollset_set(bag, item); in grpc_pollset_set_add_pollset_set()
52 void grpc_pollset_set_del_pollset_set(grpc_pollset_set* bag, in grpc_pollset_set_del_pollset_set() argument
54 grpc_pollset_set_impl->del_pollset_set(bag, item); in grpc_pollset_set_del_pollset_set()
Dpollset_set.h38 void (*add_pollset_set)(grpc_pollset_set* bag, grpc_pollset_set* item);
39 void (*del_pollset_set)(grpc_pollset_set* bag, grpc_pollset_set* item);
50 void grpc_pollset_set_add_pollset_set(grpc_pollset_set* bag,
52 void grpc_pollset_set_del_pollset_set(grpc_pollset_set* bag,
Dev_poll_posix.cc1254 static void pollset_set_add_pollset_set(grpc_pollset_set* bag, argument
1257 gpr_mu_lock(&bag->mu);
1258 if (bag->pollset_set_count == bag->pollset_set_capacity) {
1259 bag->pollset_set_capacity = GPR_MAX(8, 2 * bag->pollset_set_capacity);
1260 bag->pollset_sets = static_cast<grpc_pollset_set**>(
1261 gpr_realloc(bag->pollset_sets,
1262 bag->pollset_set_capacity * sizeof(*bag->pollset_sets)));
1264 bag->pollset_sets[bag->pollset_set_count++] = item;
1265 for (i = 0, j = 0; i < bag->fd_count; i++) {
1266 if (fd_is_orphaned(bag->fds[i])) {
[all …]
Dpollset_set_windows.cc40 static void pollset_set_add_pollset_set(grpc_pollset_set* bag, in pollset_set_add_pollset_set() argument
43 static void pollset_set_del_pollset_set(grpc_pollset_set* bag, in pollset_set_del_pollset_set() argument
Dev_posix.cc375 static void pollset_set_add_pollset_set(grpc_pollset_set* bag, in pollset_set_add_pollset_set() argument
377 GRPC_POLLING_API_TRACE("pollset_set_add_pollset_set(%p, %p)", bag, item); in pollset_set_add_pollset_set()
378 g_event_engine->pollset_set_add_pollset_set(bag, item); in pollset_set_add_pollset_set()
381 static void pollset_set_del_pollset_set(grpc_pollset_set* bag, in pollset_set_del_pollset_set() argument
383 GRPC_POLLING_API_TRACE("pollset_set_del_pollset_set(%p, %p)", bag, item); in pollset_set_del_pollset_set()
384 g_event_engine->pollset_set_del_pollset_set(bag, item); in pollset_set_del_pollset_set()
Dev_posix.h80 void (*pollset_set_add_pollset_set)(grpc_pollset_set* bag,
82 void (*pollset_set_del_pollset_set)(grpc_pollset_set* bag,
/third_party/openssl/demos/pkcs12/
Dpkread.c25 PKCS12_SAFEBAG *bag; in find_friendly_name() local
37 bag = sk_PKCS12_SAFEBAG_value(bags, m); in find_friendly_name()
38 name = PKCS12_get_friendlyname(bag); in find_friendly_name()
/third_party/openssl/apps/
Dpkcs12.c655 int dump_certs_pkeys_bag(BIO *out, const PKCS12_SAFEBAG *bag, in dump_certs_pkeys_bag() argument
666 attrs = PKCS12_SAFEBAG_get0_attrs(bag); in dump_certs_pkeys_bag()
668 switch (PKCS12_SAFEBAG_get_nid(bag)) { in dump_certs_pkeys_bag()
675 p8c = PKCS12_SAFEBAG_get0_p8inf(bag); in dump_certs_pkeys_bag()
689 tp8 = PKCS12_SAFEBAG_get0_pkcs8(bag); in dump_certs_pkeys_bag()
696 if ((p8 = PKCS12_decrypt_skey(bag, pass, passlen)) == NULL) in dump_certs_pkeys_bag()
713 if (PKCS12_SAFEBAG_get0_attr(bag, NID_localKeyID)) { in dump_certs_pkeys_bag()
719 if (PKCS12_SAFEBAG_get_bag_nid(bag) != NID_x509Certificate) in dump_certs_pkeys_bag()
721 if ((x509 = PKCS12_SAFEBAG_get1_cert(bag)) == NULL) in dump_certs_pkeys_bag()
732 return dump_certs_pkeys_bags(out, PKCS12_SAFEBAG_get0_safes(bag), in dump_certs_pkeys_bag()
[all …]
/third_party/python/Lib/test/
Dtest_string.py294 m.bag = Bag()
295 m.bag.foo = Bag()
296 m.bag.foo.who = 'tim'
297 m.bag.what = 'ham'
342 m.bag = Bag()
343 m.bag.foo = Bag()
344 m.bag.foo.who = 'tim'
345 m.bag.what = 'ham'
Dtest_file.py267 bag = self.open(TESTFN, "wb")
268 bag.write(filler * nchunks)
269 bag.writelines(testlines)
270 bag.close()
/third_party/ntfs-3g/ntfsprogs/
Dntfsdecrypt.c477 gnutls_pkcs12_bag_t bag = NULL; in ntfs_pkcs12_extract_rsa_key() local
525 err = gnutls_pkcs12_bag_init(&bag); in ntfs_pkcs12_extract_rsa_key()
532 err = gnutls_pkcs12_get_bag(pkcs12, bag_index, bag); in ntfs_pkcs12_extract_rsa_key()
544 err = gnutls_pkcs12_bag_get_count(bag); in ntfs_pkcs12_extract_rsa_key()
550 err = gnutls_pkcs12_bag_get_type(bag, 0); in ntfs_pkcs12_extract_rsa_key()
562 err = gnutls_pkcs12_bag_get_data(bag, 0, &dkey); in ntfs_pkcs12_extract_rsa_key()
615 err = gnutls_pkcs12_bag_decrypt(bag, password); in ntfs_pkcs12_extract_rsa_key()
623 err = gnutls_pkcs12_bag_get_data(bag, 0, &dkey); in ntfs_pkcs12_extract_rsa_key()
703 gnutls_pkcs12_bag_deinit(bag); in ntfs_pkcs12_extract_rsa_key()
718 if (bag) in ntfs_pkcs12_extract_rsa_key()
[all …]
/third_party/ffmpeg/libavformat/
Dmp3enc.c123 uint64_t bag[XING_NUM_BAGS]; member
299 mp3->bag[mp3->pos] = mp3->size; in mp3_xing_add_frame()
304 mp3->bag[i >> 1] = mp3->bag[i]; in mp3_xing_add_frame()
420 int seek_point = 256LL * mp3->bag[j] / mp3->size; in mp3_update_xing()

1234