Lines Matching refs:bp

20 static int asn1_parse2(BIO *bp, const unsigned char **pp, long length,
22 static int asn1_print_info(BIO *bp, long offset, int depth, int hl, long len, in asn1_print_info() argument
45 if (bp != NULL) { in asn1_print_info()
46 if (BIO_set_prefix(bp, str) <= 0) { in asn1_print_info()
48 || (bp = BIO_push(bio, bp)) == NULL) in asn1_print_info()
52 saved_indent = BIO_get_indent(bp); in asn1_print_info()
53 if (BIO_set_prefix(bp, str) <= 0 || BIO_set_indent(bp, indent) <= 0) in asn1_print_info()
73 i = (BIO_printf(bp, "%-18s", p) > 0); in asn1_print_info()
76 BIO_set_indent(bp, saved_indent); in asn1_print_info()
78 BIO_pop(bp); in asn1_print_info()
83 int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent) in ASN1_parse() argument
85 return asn1_parse2(bp, &pp, len, 0, 0, indent, 0); in ASN1_parse()
88 int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent, in ASN1_parse_dump() argument
91 return asn1_parse2(bp, &pp, len, 0, 0, indent, dump); in ASN1_parse_dump()
94 static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, in asn1_parse2() argument
109 BIO_puts(bp, "BAD RECURSION DEPTH\n"); in asn1_parse2()
120 BIO_puts(bp, "Error in encoding\n"); in asn1_parse2()
128 if (!asn1_print_info(bp, (long)offset + (long)(op - *pp), depth, in asn1_parse2()
135 if (BIO_write(bp, "\n", 1) <= 0) in asn1_parse2()
138 BIO_printf(bp, "length is greater than %ld\n", length); in asn1_parse2()
143 r = asn1_parse2(bp, &p, (long)(tot - p), in asn1_parse2()
158 r = asn1_parse2(bp, &p, tmp, in asn1_parse2()
168 if (BIO_write(bp, "\n", 1) <= 0) in asn1_parse2()
179 if (BIO_write(bp, ":", 1) <= 0) in asn1_parse2()
181 if ((len > 0) && BIO_write(bp, (const char *)p, (int)len) in asn1_parse2()
187 if (BIO_write(bp, ":", 1) <= 0) in asn1_parse2()
189 i2a_ASN1_OBJECT(bp, o); in asn1_parse2()
191 if (BIO_puts(bp, ":BAD OBJECT") <= 0) in asn1_parse2()
197 if (BIO_puts(bp, ":BAD BOOLEAN") <= 0) in asn1_parse2()
202 BIO_printf(bp, ":%u", p[0]); in asn1_parse2()
227 if (BIO_write(bp, ":", 1) <= 0) in asn1_parse2()
229 if (BIO_write(bp, (const char *)opp, os->length) <= 0) in asn1_parse2()
236 if (BIO_write(bp, "[HEX DUMP]:", 11) <= 0) in asn1_parse2()
239 if (BIO_printf(bp, "%02X", opp[i]) <= 0) in asn1_parse2()
246 if (BIO_write(bp, "\n", 1) <= 0) in asn1_parse2()
249 if (BIO_dump_indent(bp, in asn1_parse2()
267 if (BIO_write(bp, ":", 1) <= 0) in asn1_parse2()
270 if (BIO_write(bp, "-", 1) <= 0) in asn1_parse2()
273 if (BIO_printf(bp, "%02X", ai->data[i]) <= 0) in asn1_parse2()
277 if (BIO_write(bp, "00", 2) <= 0) in asn1_parse2()
281 if (BIO_puts(bp, ":BAD INTEGER") <= 0) in asn1_parse2()
293 if (BIO_write(bp, ":", 1) <= 0) in asn1_parse2()
296 if (BIO_write(bp, "-", 1) <= 0) in asn1_parse2()
299 if (BIO_printf(bp, "%02X", ae->data[i]) <= 0) in asn1_parse2()
303 if (BIO_write(bp, "00", 2) <= 0) in asn1_parse2()
307 if (BIO_puts(bp, ":BAD ENUMERATED") <= 0) in asn1_parse2()
315 if (BIO_write(bp, "\n", 1) <= 0) in asn1_parse2()
318 if (BIO_dump_indent(bp, (const char *)p, in asn1_parse2()
327 if (BIO_puts(bp, ":[") <= 0) in asn1_parse2()
330 if (BIO_printf(bp, "%02X", tmp[i]) <= 0) in asn1_parse2()
333 if (BIO_puts(bp, "]") <= 0) in asn1_parse2()
339 if (BIO_write(bp, "\n", 1) <= 0) in asn1_parse2()