Lines Matching refs:mem
57 static int any2obj_decode_final(void *provctx, int objtype, BUF_MEM *mem, in any2obj_decode_final() argument
66 if (mem != NULL) { in any2obj_decode_final()
73 mem->data, mem->length); in any2obj_decode_final()
77 BUF_MEM_free(mem); in any2obj_decode_final()
88 BUF_MEM *mem = NULL; in der2obj_decode() local
95 ok = (asn1_d2i_read_bio(in, &mem) >= 0); in der2obj_decode()
97 if (!ok && mem != NULL) { in der2obj_decode()
98 BUF_MEM_free(mem); in der2obj_decode()
99 mem = NULL; in der2obj_decode()
104 return any2obj_decode_final(provctx, OSSL_OBJECT_UNKNOWN, mem, in der2obj_decode()
114 BUF_MEM *mem = NULL; in msblob2obj_decode() local
126 if ((mem = BUF_MEM_new()) == NULL in msblob2obj_decode()
127 || !BUF_MEM_grow(mem, mem_want)) { in msblob2obj_decode()
133 ok = BIO_read(in, &mem->data[0], mem_want) == (int)mem_want; in msblob2obj_decode()
141 p = (unsigned char *)&mem->data[0]; in msblob2obj_decode()
149 if (!BUF_MEM_grow(mem, mem_len + mem_want)) { in msblob2obj_decode()
155 ok = BIO_read(in, &mem->data[mem_len], mem_want) == (int)mem_want; in msblob2obj_decode()
162 if (!ok && mem != NULL) { in msblob2obj_decode()
163 BUF_MEM_free(mem); in msblob2obj_decode()
164 mem = NULL; in msblob2obj_decode()
168 return any2obj_decode_final(provctx, OSSL_OBJECT_PKEY, mem, in msblob2obj_decode()
173 BUF_MEM_free(mem); in msblob2obj_decode()
183 BUF_MEM *mem = NULL; in pvk2obj_decode() local
193 if ((mem = BUF_MEM_new()) == NULL in pvk2obj_decode()
194 || !BUF_MEM_grow(mem, mem_want)) { in pvk2obj_decode()
200 ok = BIO_read(in, &mem->data[0], mem_want) == (int)mem_want; in pvk2obj_decode()
208 p = (unsigned char *)&mem->data[0]; in pvk2obj_decode()
216 if (!BUF_MEM_grow(mem, mem_len + mem_want)) { in pvk2obj_decode()
222 ok = BIO_read(in, &mem->data[mem_len], mem_want) == (int)mem_want; in pvk2obj_decode()
229 if (!ok && mem != NULL) { in pvk2obj_decode()
230 BUF_MEM_free(mem); in pvk2obj_decode()
231 mem = NULL; in pvk2obj_decode()
235 return any2obj_decode_final(provctx, OSSL_OBJECT_PKEY, mem, in pvk2obj_decode()
240 BUF_MEM_free(mem); in pvk2obj_decode()