• Home
  • Raw
  • Download

Lines Matching refs:pkt

16 static int int_start_context(WPACKET *pkt, int tag)  in int_start_context()  argument
22 return WPACKET_start_sub_packet(pkt); in int_start_context()
25 static int int_end_context(WPACKET *pkt, int tag) in int_end_context() argument
45 return WPACKET_get_total_written(pkt, &size1) in int_end_context()
46 && WPACKET_close(pkt) in int_end_context()
47 && WPACKET_get_total_written(pkt, &size2) in int_end_context()
48 && (size1 == size2 || WPACKET_put_bytes_u8(pkt, tag)); in int_end_context()
51 int ossl_DER_w_precompiled(WPACKET *pkt, int tag, in ossl_DER_w_precompiled() argument
55 return int_start_context(pkt, tag) in ossl_DER_w_precompiled()
56 && WPACKET_memcpy(pkt, precompiled, precompiled_n) in ossl_DER_w_precompiled()
57 && int_end_context(pkt, tag); in ossl_DER_w_precompiled()
60 int ossl_DER_w_boolean(WPACKET *pkt, int tag, int b) in ossl_DER_w_boolean() argument
62 return int_start_context(pkt, tag) in ossl_DER_w_boolean()
63 && WPACKET_start_sub_packet(pkt) in ossl_DER_w_boolean()
64 && (!b || WPACKET_put_bytes_u8(pkt, 0xFF)) in ossl_DER_w_boolean()
65 && !WPACKET_close(pkt) in ossl_DER_w_boolean()
66 && !WPACKET_put_bytes_u8(pkt, DER_P_BOOLEAN) in ossl_DER_w_boolean()
67 && int_end_context(pkt, tag); in ossl_DER_w_boolean()
70 int ossl_DER_w_octet_string(WPACKET *pkt, int tag, in ossl_DER_w_octet_string() argument
73 return int_start_context(pkt, tag) in ossl_DER_w_octet_string()
74 && WPACKET_start_sub_packet(pkt) in ossl_DER_w_octet_string()
75 && WPACKET_memcpy(pkt, data, data_n) in ossl_DER_w_octet_string()
76 && WPACKET_close(pkt) in ossl_DER_w_octet_string()
77 && WPACKET_put_bytes_u8(pkt, DER_P_OCTET_STRING) in ossl_DER_w_octet_string()
78 && int_end_context(pkt, tag); in ossl_DER_w_octet_string()
81 int ossl_DER_w_octet_string_uint32(WPACKET *pkt, int tag, uint32_t value) in ossl_DER_w_octet_string_uint32() argument
90 return ossl_DER_w_octet_string(pkt, tag, tmp, sizeof(tmp)); in ossl_DER_w_octet_string_uint32()
93 static int int_der_w_integer(WPACKET *pkt, int tag, in int_der_w_integer() argument
94 int (*put_bytes)(WPACKET *pkt, const void *v, in int_der_w_integer() argument
100 return int_start_context(pkt, tag) in int_der_w_integer()
101 && WPACKET_start_sub_packet(pkt) in int_der_w_integer()
102 && put_bytes(pkt, v, &top_byte) in int_der_w_integer()
103 && ((top_byte & 0x80) == 0 || WPACKET_put_bytes_u8(pkt, 0)) in int_der_w_integer()
104 && WPACKET_close(pkt) in int_der_w_integer()
105 && WPACKET_put_bytes_u8(pkt, DER_P_INTEGER) in int_der_w_integer()
106 && int_end_context(pkt, tag); in int_der_w_integer()
109 static int int_put_bytes_uint32(WPACKET *pkt, const void *v, in int_put_bytes_uint32() argument
124 return WPACKET_put_bytes__(pkt, *value, n); in int_put_bytes_uint32()
128 int ossl_DER_w_uint32(WPACKET *pkt, int tag, uint32_t v) in ossl_DER_w_uint32() argument
130 return int_der_w_integer(pkt, tag, int_put_bytes_uint32, &v); in ossl_DER_w_uint32()
133 static int int_put_bytes_bn(WPACKET *pkt, const void *v, in int_put_bytes_bn() argument
144 if (!WPACKET_allocate_bytes(pkt, n, &p)) in int_put_bytes_bn()
151 int ossl_DER_w_bn(WPACKET *pkt, int tag, const BIGNUM *v) in ossl_DER_w_bn() argument
156 return ossl_DER_w_uint32(pkt, tag, 0); in ossl_DER_w_bn()
158 return int_der_w_integer(pkt, tag, int_put_bytes_bn, v); in ossl_DER_w_bn()
161 int ossl_DER_w_null(WPACKET *pkt, int tag) in ossl_DER_w_null() argument
163 return int_start_context(pkt, tag) in ossl_DER_w_null()
164 && WPACKET_start_sub_packet(pkt) in ossl_DER_w_null()
165 && WPACKET_close(pkt) in ossl_DER_w_null()
166 && WPACKET_put_bytes_u8(pkt, DER_P_NULL) in ossl_DER_w_null()
167 && int_end_context(pkt, tag); in ossl_DER_w_null()
171 int ossl_DER_w_begin_sequence(WPACKET *pkt, int tag) in ossl_DER_w_begin_sequence() argument
173 return int_start_context(pkt, tag) in ossl_DER_w_begin_sequence()
174 && WPACKET_start_sub_packet(pkt); in ossl_DER_w_begin_sequence()
177 int ossl_DER_w_end_sequence(WPACKET *pkt, int tag) in ossl_DER_w_end_sequence() argument
192 return WPACKET_get_total_written(pkt, &size1) in ossl_DER_w_end_sequence()
193 && WPACKET_close(pkt) in ossl_DER_w_end_sequence()
194 && WPACKET_get_total_written(pkt, &size2) in ossl_DER_w_end_sequence()
196 ? WPACKET_set_flags(pkt, WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH) in ossl_DER_w_end_sequence()
197 : WPACKET_put_bytes_u8(pkt, DER_F_CONSTRUCTED | DER_P_SEQUENCE)) in ossl_DER_w_end_sequence()
198 && int_end_context(pkt, tag); in ossl_DER_w_end_sequence()