Home | History | Annotate | Download | only in bytestring

Lines Matching defs:in

5  * copyright notice and this permission notice appear in all copies.
9 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
12 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
27 /* cbs_find_ber walks an ASN.1 structure in |orig_in| and sets |*ber_found|
29 * |in| is not changed. It returns one on success (i.e. |*ber_found| was set)
32 CBS in;
38 CBS_init(&in, CBS_data(orig_in), CBS_len(orig_in));
41 while (CBS_len(&in) > 0) {
46 if (!CBS_get_any_ber_asn1_element(&in, &contents, &tag, &header_len)) {
67 * one can just test the "constructed" bit in the tag but, in BER, even
83 /* cbs_convert_ber reads BER data from |in| and writes DER data to |out|. If
84 * |squash_header| is set then the top-level of elements from |in| will not
89 static int cbs_convert_ber(CBS *in, CBB *out, char squash_header,
95 while (CBS_len(in) > 0) {
101 if (!CBS_get_any_ber_asn1_element(in, &contents, &tag, &header_len)) {
131 CBS_init(&in_copy, CBS_data(in), CBS_len(in));
153 if (!cbs_convert_ber(in, out_contents,
196 int CBS_asn1_ber_to_der(CBS *in, uint8_t **out, size_t *out_len) {
202 if (!cbs_find_ber(in, &conversion_needed, 0)) {
212 if (!CBB_init(&cbb, CBS_len(in))) {
215 if (!cbs_convert_ber(in, &cbb, 0, 0, 0)) {