Lines Matching refs:flags
221 #define PEM_FREE(p, flags, num) \ argument
222 pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
223 static void pem_free(void *p, unsigned int flags, size_t num, in pem_free() argument
226 if (flags & PEM_FLAG_SECURE) in pem_free()
232 #define PEM_MALLOC(num, flags) \ argument
233 pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
234 static void *pem_malloc(int num, unsigned int flags, in pem_malloc() argument
237 return (flags & PEM_FLAG_SECURE) ? CRYPTO_secure_malloc(num, file, line) in pem_malloc()
245 unsigned int flags) in pem_bytes_read_bio_flags() argument
254 PEM_FREE(nm, flags, 0); in pem_bytes_read_bio_flags()
255 PEM_FREE(header, flags, 0); in pem_bytes_read_bio_flags()
256 PEM_FREE(data, flags, len); in pem_bytes_read_bio_flags()
257 if (!PEM_read_bio_ex(bp, &nm, &header, &data, &len, flags)) { in pem_bytes_read_bio_flags()
278 PEM_FREE(nm, flags, 0); in pem_bytes_read_bio_flags()
279 PEM_FREE(header, flags, 0); in pem_bytes_read_bio_flags()
281 PEM_FREE(data, flags, len); in pem_bytes_read_bio_flags()
701 static int sanitize_line(char *linebuf, int len, unsigned int flags, int first_call) in sanitize_line() argument
716 if (flags & PEM_FLAG_EAY_COMPATIBLE) { in sanitize_line()
722 } else if (flags & PEM_FLAG_ONLY_B64) { in sanitize_line()
754 static int get_name(BIO *bp, char **name, unsigned int flags) in get_name() argument
765 linebuf = PEM_MALLOC(LINESIZE + 1, flags); in get_name()
778 len = sanitize_line(linebuf, len, flags & ~PEM_FLAG_ONLY_B64, first_call); in get_name()
787 *name = PEM_MALLOC(len, flags); in get_name()
794 PEM_FREE(linebuf, flags, LINESIZE + 1); in get_name()
817 unsigned int flags) in get_header_and_data() argument
829 linebuf = PEM_MALLOC(LINESIZE + 1, flags); in get_header_and_data()
855 len = sanitize_line(linebuf, len, flags & flags_mask, 0); in get_header_and_data()
914 PEM_FREE(linebuf, flags, LINESIZE + 1); in get_header_and_data()
925 unsigned char **data, long *len_out, unsigned int flags) in PEM_read_bio_ex() argument
937 if ((flags & PEM_FLAG_EAY_COMPATIBLE) && (flags & PEM_FLAG_ONLY_B64)) { in PEM_read_bio_ex()
942 bmeth = (flags & PEM_FLAG_SECURE) ? BIO_s_secmem() : BIO_s_mem(); in PEM_read_bio_ex()
951 if (!get_name(bp, &name, flags)) in PEM_read_bio_ex()
953 if (!get_header_and_data(bp, &headerB, &dataB, name, flags)) in PEM_read_bio_ex()
981 *header = PEM_MALLOC(headerlen + 1, flags); in PEM_read_bio_ex()
982 *data = PEM_MALLOC(len, flags); in PEM_read_bio_ex()
997 PEM_FREE(*header, flags, 0); in PEM_read_bio_ex()
999 PEM_FREE(*data, flags, 0); in PEM_read_bio_ex()
1003 PEM_FREE(name, flags, 0); in PEM_read_bio_ex()