Home
last modified time | relevance | path

Searched refs:pkt (Results 1 – 25 of 62) sorted by relevance

123

/openssl-master/test/
A Dwpackettest.c33 WPACKET_cleanup(pkt); in cleanup()
39 WPACKET pkt; in test_WPACKET_init() local
58 return cleanup(&pkt); in test_WPACKET_init()
66 return cleanup(&pkt); in test_WPACKET_init()
74 return cleanup(&pkt); in test_WPACKET_init()
115 WPACKET pkt; in test_WPACKET_set_max_size() local
162 WPACKET pkt; in test_WPACKET_start_sub_packet() local
244 WPACKET pkt; in test_WPACKET_set_flags() local
304 WPACKET pkt; in test_WPACKET_allocate_bytes() local
334 WPACKET pkt; in test_WPACKET_memcpy() local
[all …]
A Dpackettest.c19 PACKET pkt; in test_PACKET_remaining() local
34 PACKET pkt; in test_PACKET_end() local
51 PACKET pkt; in test_PACKET_get_1() local
68 PACKET pkt; in test_PACKET_get_4() local
85 PACKET pkt; in test_PACKET_get_net_2() local
102 PACKET pkt; in test_PACKET_get_net_3() local
119 PACKET pkt; in test_PACKET_get_net_4() local
157 PACKET pkt; in test_PACKET_get_bytes() local
181 PACKET pkt; in test_PACKET_copy_bytes() local
205 PACKET pkt; in test_PACKET_copy_all() local
[all …]
A Dbad_dtls_test.c119 PACKET pkt, pkt2; in validate_client_hello() local
127 if (!PACKET_buf_init(&pkt, data, len)) in validate_client_hello()
161 if (!PACKET_get_length_prefixed_1(&pkt, &pkt2)) in validate_client_hello()
170 if (!PACKET_get_net_2(&pkt, &u) || !PACKET_forward(&pkt, u)) in validate_client_hello()
174 if (!PACKET_get_1(&pkt, &u) || !PACKET_forward(&pkt, u)) in validate_client_hello()
178 if (!PACKET_get_net_2(&pkt, &u) || !PACKET_forward(&pkt, u)) in validate_client_hello()
182 if (PACKET_remaining(&pkt)) in validate_client_hello()
395 PACKET pkt; in validate_ccs() local
404 if (!PACKET_buf_init(&pkt, data, len)) in validate_ccs()
422 if (!PACKET_get_net_2(&pkt, &u) || u != 0x0002) in validate_ccs()
[all …]
A Dclienthellotest.c67 PACKET pkt, pkt2, pkt3; in test_client_hello() local
80 memset(&pkt, 0, sizeof(pkt)); in test_client_hello()
195 || !TEST_true(PACKET_buf_init(&pkt, data, len)) in test_client_hello()
197 || !PACKET_forward(&pkt, SSL3_RT_HEADER_LENGTH)) in test_client_hello()
200 msglen = PACKET_remaining(&pkt); in test_client_hello()
203 if (!TEST_true(PACKET_forward(&pkt, SSL3_HM_HEADER_LENGTH)) in test_client_hello()
205 || !TEST_true(PACKET_forward(&pkt, CLIENT_VERSION_LEN in test_client_hello()
208 || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2)) in test_client_hello()
210 || !TEST_true(PACKET_get_length_prefixed_2(&pkt, &pkt2)) in test_client_hello()
212 || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2)) in test_client_hello()
[all …]
A Dservername_test.c45 PACKET pkt, pkt2, pkt3, pkt4, pkt5; in get_sni_from_client_hello() local
49 memset(&pkt, 0, sizeof(pkt)); in get_sni_from_client_hello()
56 || !TEST_true(PACKET_buf_init(&pkt, data, len)) in get_sni_from_client_hello()
58 || !PACKET_forward(&pkt, SSL3_RT_HEADER_LENGTH) in get_sni_from_client_hello()
60 || !TEST_true(PACKET_forward(&pkt, SSL3_HM_HEADER_LENGTH)) in get_sni_from_client_hello()
62 || !TEST_true(PACKET_forward(&pkt, CLIENT_VERSION_LEN in get_sni_from_client_hello()
65 || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2)) in get_sni_from_client_hello()
67 || !TEST_true(PACKET_get_length_prefixed_2(&pkt, &pkt2)) in get_sni_from_client_hello()
69 || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2)) in get_sni_from_client_hello()
71 || !TEST_true(PACKET_as_length_prefixed_2(&pkt, &pkt2))) in get_sni_from_client_hello()
/openssl-master/include/internal/
A Dpacket.h32 pkt->curr += len; in packet_forward()
52 return pkt->curr + pkt->remaining; in PACKET_end()
61 return pkt->curr; in PACKET_data()
77 pkt->curr = buf; in PACKET_buf_init()
403 memcpy(dest, pkt->curr, pkt->remaining); in PACKET_copy_all()
460 return memchr(pkt->curr, 0, pkt->remaining) != NULL; in PACKET_contains_zero_byte()
492 *pkt = tmp; in PACKET_get_length_prefixed_1()
515 *pkt = tmp; in PACKET_as_length_prefixed_1()
541 *pkt = tmp; in PACKET_get_length_prefixed_2()
565 *pkt = tmp; in PACKET_as_length_prefixed_2()
[all …]
A Dder.h72 int ossl_DER_w_precompiled(WPACKET *pkt, int tag,
76 int ossl_DER_w_boolean(WPACKET *pkt, int tag, int b);
77 int ossl_DER_w_ulong(WPACKET *pkt, int tag, unsigned long v);
78 int ossl_DER_w_bn(WPACKET *pkt, int tag, const BIGNUM *v);
79 int ossl_DER_w_null(WPACKET *pkt, int tag);
80 int ossl_DER_w_octet_string(WPACKET *pkt, int tag,
82 int ossl_DER_w_octet_string_uint32(WPACKET *pkt, int tag, uint32_t value);
87 int ossl_DER_w_begin_sequence(WPACKET *pkt, int tag);
88 int ossl_DER_w_end_sequence(WPACKET *pkt, int tag);
/openssl-master/crypto/
A Dpacket.c22 pkt->curr += len; in WPACKET_allocate_bytes()
49 if (pkt->maxsize - pkt->written < len) in WPACKET_reserve_bytes()
52 if (pkt->buf != NULL && (pkt->buf->length - pkt->written < len)) { in WPACKET_reserve_bytes()
56 reflen = (len > pkt->buf->length) ? len : pkt->buf->length; in WPACKET_reserve_bytes()
315 if (pkt->subs == NULL || pkt->subs->parent == NULL) in WPACKET_close()
318 return wpacket_intern_close(pkt, pkt->subs, 1); in WPACKET_close()
329 if (pkt->subs == NULL || pkt->subs->parent != NULL) in WPACKET_finish()
332 ret = wpacket_intern_close(pkt, pkt->subs, 1); in WPACKET_finish()
480 *len = pkt->written - pkt->subs->pwritten; in WPACKET_get_length()
493 return buf + pkt->maxsize - pkt->curr; in WPACKET_get_curr()
[all …]
A Dder_writer.c22 return WPACKET_start_sub_packet(pkt); in int_start_context()
46 && WPACKET_close(pkt) in int_end_context()
55 return int_start_context(pkt, tag) in ossl_DER_w_precompiled()
57 && int_end_context(pkt, tag); in ossl_DER_w_precompiled()
65 && !WPACKET_close(pkt) in ossl_DER_w_boolean()
67 && int_end_context(pkt, tag); in ossl_DER_w_boolean()
76 && WPACKET_close(pkt) in ossl_DER_w_octet_string()
78 && int_end_context(pkt, tag); in ossl_DER_w_octet_string()
104 && WPACKET_close(pkt) in int_der_w_integer()
165 && WPACKET_close(pkt) in ossl_DER_w_null()
[all …]
A Dasn1_dsa.c45 if (!WPACKET_put_bytes_u8(pkt, 0x82) in ossl_encode_der_length()
85 if (!WPACKET_start_sub_packet(pkt) in ossl_encode_der_integer()
89 || !WPACKET_close(pkt)) in ossl_encode_der_integer()
110 int isnull = WPACKET_is_null_buf(pkt); in ossl_encode_der_dsa_sig()
112 if (!WPACKET_start_sub_packet(pkt)) in ossl_encode_der_dsa_sig()
121 dummypkt = pkt; in ossl_encode_der_dsa_sig()
143 || !WPACKET_close(pkt)) in ossl_encode_der_dsa_sig()
159 if (!PACKET_get_1(pkt, &byte)) in ossl_decode_der_length()
193 if (!PACKET_get_1(pkt, &tag) in ossl_decode_der_integer()
237 PACKET pkt, contpkt; in ossl_decode_der_dsa_sig() local
[all …]
/openssl-master/ssl/statem/
A Dstatem_local.h57 typedef int (*confunc_f) (SSL *s, WPACKET *pkt);
65 int parse_ca_names(SSL *s, PACKET *pkt);
78 int ossl_statem_client_construct_message(SSL *s, WPACKET *pkt,
110 __owur int tls_construct_finished(SSL *s, WPACKET *pkt);
111 __owur int tls_construct_key_update(SSL *s, WPACKET *pkt);
118 __owur int tls_construct_client_hello(SSL *s, WPACKET *pkt);
125 __owur int tls_construct_cert_verify(SSL *s, WPACKET *pkt);
132 __owur int tls_construct_cert_status(SSL *s, WPACKET *pkt);
138 __owur int tls_construct_next_proto(SSL *s, WPACKET *pkt);
147 __owur int tls_construct_server_hello(SSL *s, WPACKET *pkt);
[all …]
A Dextensions_clnt.c236 if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) { in tls_construct_ctos_supported_groups()
357 if (!WPACKET_close(pkt) in tls_construct_ctos_status_request()
377 if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) { in tls_construct_ctos_status_request()
460 if (!WPACKET_close(pkt) in tls_construct_ctos_use_srtp()
555 if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) { in tls_construct_ctos_supported_versions()
697 if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) { in tls_construct_ctos_key_share()
1259 if (PACKET_remaining(pkt) != 1 || !PACKET_get_1(pkt, &value)) { in tls_parse_stoc_maxfragmentlen()
1476 PACKET_data(pkt), PACKET_remaining(pkt), in tls_parse_stoc_sct()
1527 tmppkt = *pkt; in tls_parse_stoc_npn()
1578 || PACKET_remaining(pkt) != len || !PACKET_get_1_len(pkt, &len) in tls_parse_stoc_alpn()
[all …]
A Dextensions_srvr.c48 if (!PACKET_get_1(pkt, &ilen) in tls_parse_ctos_renegotiate()
171 if (PACKET_remaining(pkt) != 1 || !PACKET_get_1(pkt, &value)) { in tls_parse_ctos_maxfragmentlen()
518 || PACKET_remaining(pkt)) { in tls_parse_ctos_use_srtp()
1243 || !WPACKET_close(pkt) in tls_construct_stoc_renegotiate()
1290 || !WPACKET_close(pkt)) { in tls_construct_stoc_maxfragmentlen()
1376 if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) { in tls_construct_stoc_supported_groups()
1432 if (!WPACKET_close(pkt)) { in tls_construct_stoc_status_request()
1482 || !WPACKET_close(pkt) in tls_construct_stoc_alpn()
1760 || !WPACKET_close(pkt) in tls_construct_stoc_cookie()
1775 || !WPACKET_close(pkt) in tls_construct_stoc_cookie()
[all …]
A Dstatem_clnt.c1214 || !WPACKET_close(pkt)) { in tls_construct_client_hello()
1239 if (!WPACKET_close(pkt)) { in tls_construct_client_hello()
1264 if (!WPACKET_put_bytes_u8(pkt, 0) || !WPACKET_close(pkt)) { in tls_construct_client_hello()
1283 if (!PACKET_forward(pkt, 2) in dtls_process_hello_verify()
2124 if (!PACKET_get_1(pkt, &curve_type) || !PACKET_get_net_2(pkt, &curve_id)) { in tls_process_ske_ecdhe()
2182 save_param_start = *pkt; in tls_process_key_exchange()
2418 if (!parse_ca_names(s, pkt)) { in tls_process_certificate_request()
2424 if (PACKET_remaining(pkt) != 0) { in tls_process_certificate_request()
2630 if (!PACKET_get_1(pkt, &type) in tls_process_cert_status_body()
2718 if (PACKET_remaining(pkt) > 0) { in tls_process_server_done()
[all …]
A Dstatem_srvr.c1435 if (!PACKET_get_1(pkt, &mt) in tls_process_client_hello()
2770 || !ssl3_get_req_cert_type(s, pkt) || !WPACKET_close(pkt)) { in tls_construct_certificate_request()
2876 enc_premaster = *pkt; in tls_process_cke_rsa()
2963 if (!PACKET_get_net_2(pkt, &i) || PACKET_remaining(pkt) != i) { in tls_process_cke_dhe()
3026 if (!PACKET_get_1(pkt, &i) || !PACKET_get_bytes(pkt, &data, i) in tls_process_cke_ecdhe()
3068 if (!PACKET_get_net_2(pkt, &i) in tls_process_cke_srp()
3152 ptr = PACKET_data(pkt); in tls_process_cke_gost()
3163 if (!PACKET_forward(pkt, ptr - PACKET_data(pkt))) { in tls_process_cke_gost()
3257 inlen = PACKET_remaining(pkt); in tls_process_cke_gost18()
3258 start = PACKET_data(pkt); in tls_process_cke_gost18()
[all …]
/openssl-master/providers/common/der/
A Dder_ecx_key.c16 return ossl_DER_w_begin_sequence(pkt, cont) in ossl_DER_w_algorithmIdentifier_X25519()
18 && ossl_DER_w_precompiled(pkt, -1, ossl_der_oid_id_X25519, in ossl_DER_w_algorithmIdentifier_X25519()
20 && ossl_DER_w_end_sequence(pkt, cont); in ossl_DER_w_algorithmIdentifier_X25519()
25 return ossl_DER_w_begin_sequence(pkt, cont) in ossl_DER_w_algorithmIdentifier_X448()
27 && ossl_DER_w_precompiled(pkt, -1, ossl_der_oid_id_X448, in ossl_DER_w_algorithmIdentifier_X448()
29 && ossl_DER_w_end_sequence(pkt, cont); in ossl_DER_w_algorithmIdentifier_X448()
34 return ossl_DER_w_begin_sequence(pkt, cont) in ossl_DER_w_algorithmIdentifier_ED25519()
38 && ossl_DER_w_end_sequence(pkt, cont); in ossl_DER_w_algorithmIdentifier_ED25519()
43 return ossl_DER_w_begin_sequence(pkt, cont) in ossl_DER_w_algorithmIdentifier_ED448()
45 && ossl_DER_w_precompiled(pkt, -1, ossl_der_oid_id_Ed448, in ossl_DER_w_algorithmIdentifier_ED448()
[all …]
A Dder_rsa_key.c247 static int DER_w_MaskGenAlgorithm(WPACKET *pkt, int tag, in DER_w_MaskGenAlgorithm() argument
283 int ossl_DER_w_RSASSA_PSS_params(WPACKET *pkt, int tag, in ossl_DER_w_RSASSA_PSS_params() argument
339 return ossl_DER_w_begin_sequence(pkt, tag) in ossl_DER_w_RSASSA_PSS_params()
341 || ossl_DER_w_ulong(pkt, 3, trailerfield)) in ossl_DER_w_RSASSA_PSS_params()
343 && DER_w_MaskGenAlgorithm(pkt, 1, pss) in ossl_DER_w_RSASSA_PSS_params()
346 && ossl_DER_w_end_sequence(pkt, tag); in ossl_DER_w_RSASSA_PSS_params()
358 int ossl_DER_w_algorithmIdentifier_RSA_PSS(WPACKET *pkt, int tag, in ossl_DER_w_algorithmIdentifier_RSA_PSS() argument
376 return ossl_DER_w_begin_sequence(pkt, tag) in ossl_DER_w_algorithmIdentifier_RSA_PSS()
379 || ossl_DER_w_RSASSA_PSS_params(pkt, -1, pss)) in ossl_DER_w_algorithmIdentifier_RSA_PSS()
380 && ossl_DER_w_precompiled(pkt, -1, rsa_oid, rsa_oid_sz) in ossl_DER_w_algorithmIdentifier_RSA_PSS()
[all …]
A Dder_dsa_key.c20 int ossl_DER_w_algorithmIdentifier_DSA(WPACKET *pkt, int tag, DSA *dsa) in ossl_DER_w_algorithmIdentifier_DSA() argument
22 return ossl_DER_w_begin_sequence(pkt, tag) in ossl_DER_w_algorithmIdentifier_DSA()
24 && ossl_DER_w_precompiled(pkt, -1, ossl_der_oid_id_dsa, in ossl_DER_w_algorithmIdentifier_DSA()
26 && ossl_DER_w_end_sequence(pkt, tag); in ossl_DER_w_algorithmIdentifier_DSA()
A Dder_ec_key.c14 int ossl_DER_w_algorithmIdentifier_EC(WPACKET *pkt, int cont, EC_KEY *ec) in ossl_DER_w_algorithmIdentifier_EC() argument
16 return ossl_DER_w_begin_sequence(pkt, cont) in ossl_DER_w_algorithmIdentifier_EC()
18 && ossl_DER_w_precompiled(pkt, -1, ossl_der_oid_id_ecPublicKey, in ossl_DER_w_algorithmIdentifier_EC()
20 && ossl_DER_w_end_sequence(pkt, cont); in ossl_DER_w_algorithmIdentifier_EC()
A Dder_sm2_key.c15 int ossl_DER_w_algorithmIdentifier_SM2(WPACKET *pkt, int cont, EC_KEY *ec) in ossl_DER_w_algorithmIdentifier_SM2() argument
17 return ossl_DER_w_begin_sequence(pkt, cont) in ossl_DER_w_algorithmIdentifier_SM2()
20 && ossl_DER_w_precompiled(pkt, -1, ossl_der_oid_id_ecPublicKey, in ossl_DER_w_algorithmIdentifier_SM2()
22 && ossl_DER_w_end_sequence(pkt, cont); in ossl_DER_w_algorithmIdentifier_SM2()
A Dder_rsa_sig.c33 int ossl_DER_w_algorithmIdentifier_MDWithRSAEncryption(WPACKET *pkt, int tag, in ossl_DER_w_algorithmIdentifier_MDWithRSAEncryption() argument
67 return ossl_DER_w_begin_sequence(pkt, tag) in ossl_DER_w_algorithmIdentifier_MDWithRSAEncryption()
69 && ossl_DER_w_null(pkt, -1) in ossl_DER_w_algorithmIdentifier_MDWithRSAEncryption()
71 && ossl_DER_w_precompiled(pkt, -1, precompiled, precompiled_sz) in ossl_DER_w_algorithmIdentifier_MDWithRSAEncryption()
72 && ossl_DER_w_end_sequence(pkt, tag); in ossl_DER_w_algorithmIdentifier_MDWithRSAEncryption()
A Dder_sm2_sig.c23 int ossl_DER_w_algorithmIdentifier_SM2_with_MD(WPACKET *pkt, int cont, in ossl_DER_w_algorithmIdentifier_SM2_with_MD() argument
35 return ossl_DER_w_begin_sequence(pkt, cont) in ossl_DER_w_algorithmIdentifier_SM2_with_MD()
37 && ossl_DER_w_precompiled(pkt, -1, precompiled, precompiled_sz) in ossl_DER_w_algorithmIdentifier_SM2_with_MD()
38 && ossl_DER_w_end_sequence(pkt, cont); in ossl_DER_w_algorithmIdentifier_SM2_with_MD()
/openssl-master/providers/implementations/kdfs/
A Dx942kdf.c99 static int DER_w_keyinfo(WPACKET *pkt, in DER_w_keyinfo() argument
103 return ossl_DER_w_begin_sequence(pkt, -1) in DER_w_keyinfo()
110 && ossl_DER_w_end_sequence(pkt, -1); in DER_w_keyinfo()
123 WPACKET_init_null_der(pkt)) in der_encode_sharedinfo()
124 && ossl_DER_w_begin_sequence(pkt, -1) in der_encode_sharedinfo()
135 && ossl_DER_w_end_sequence(pkt, -1) in der_encode_sharedinfo()
136 && WPACKET_finish(pkt); in der_encode_sharedinfo()
210 WPACKET pkt; in x942_encode_otherinfo() local
226 WPACKET_cleanup(&pkt); in x942_encode_otherinfo()
242 if (WPACKET_get_curr(&pkt) != der_buf) in x942_encode_otherinfo()
[all …]
/openssl-master/doc/internal/man7/
A DDERlib.pod17 int DER_w_something(WPACKET *pkt, int tag, ...);
23 int DER_r_something(PACKET *pkt, int tag, ...);
27 I<pkt> is the packet context used, and I<tag> should be the
53 int ok = ossl_DER_w_begin_sequence(pkt, -1)
56 && ossl_DER_w_end_sequence(pkt, -1);
64 ossl_DER_w_bn(pkt, 1, v)
119 return ossl_DER_w_begin_sequence(pkt, tag)
121 && ossl_DER_w_ulong(pkt, 2, 20)
122 && ossl_DER_w_precompiled(pkt, 1,
125 && ossl_DER_w_precompiled(pkt, 0,
[all …]
/openssl-master/include/crypto/
A Dasn1_dsa.h16 int ossl_encode_der_length(WPACKET *pkt, size_t cont_len);
17 int ossl_encode_der_integer(WPACKET *pkt, const BIGNUM *n);
18 int ossl_encode_der_dsa_sig(WPACKET *pkt, const BIGNUM *r, const BIGNUM *s);
19 int ossl_decode_der_length(PACKET *pkt, PACKET *subpkt);
20 int ossl_decode_der_integer(PACKET *pkt, BIGNUM *n);

Completed in 67 milliseconds

123