/mbedtls-3.6.0/library/ |
D | asn1write.c | 23 int mbedtls_asn1_write_len(unsigned char **p, const unsigned char *start, size_t len) in mbedtls_asn1_write_len() argument 39 if (required > (*p - start)) { in mbedtls_asn1_write_len() 44 *--(*p) = MBEDTLS_BYTE_0(len); in mbedtls_asn1_write_len() 49 *--(*p) = (unsigned char) (0x80 + required - 1); in mbedtls_asn1_write_len() 55 int mbedtls_asn1_write_tag(unsigned char **p, const unsigned char *start, unsigned char tag) in mbedtls_asn1_write_tag() argument 57 if (*p - start < 1) { in mbedtls_asn1_write_tag() 61 *--(*p) = tag; in mbedtls_asn1_write_tag() 68 static int mbedtls_asn1_write_len_and_tag(unsigned char **p, in mbedtls_asn1_write_len_and_tag() argument 75 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(p, start, len)); in mbedtls_asn1_write_len_and_tag() 76 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(p, start, tag)); in mbedtls_asn1_write_len_and_tag() [all …]
|
D | asn1parse.c | 27 int mbedtls_asn1_get_len(unsigned char **p, in mbedtls_asn1_get_len() argument 31 if ((end - *p) < 1) { in mbedtls_asn1_get_len() 35 if ((**p & 0x80) == 0) { in mbedtls_asn1_get_len() 36 *len = *(*p)++; in mbedtls_asn1_get_len() 38 int n = (**p) & 0x7F; in mbedtls_asn1_get_len() 42 if ((end - *p) <= n) { in mbedtls_asn1_get_len() 46 (*p)++; in mbedtls_asn1_get_len() 48 *len = (*len << 8) | **p; in mbedtls_asn1_get_len() 49 (*p)++; in mbedtls_asn1_get_len() 53 if (*len > (size_t) (end - *p)) { in mbedtls_asn1_get_len() [all …]
|
D | x509.c | 63 int mbedtls_x509_get_serial(unsigned char **p, const unsigned char *end, in mbedtls_x509_get_serial() argument 68 if ((end - *p) < 1) { in mbedtls_x509_get_serial() 73 if (**p != (MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_PRIMITIVE | 2) && in mbedtls_x509_get_serial() 74 **p != MBEDTLS_ASN1_INTEGER) { in mbedtls_x509_get_serial() 79 serial->tag = *(*p)++; in mbedtls_x509_get_serial() 81 if ((ret = mbedtls_asn1_get_len(p, end, &serial->len)) != 0) { in mbedtls_x509_get_serial() 85 serial->p = *p; in mbedtls_x509_get_serial() 86 *p += serial->len; in mbedtls_x509_get_serial() 97 int mbedtls_x509_get_alg_null(unsigned char **p, const unsigned char *end, in mbedtls_x509_get_alg_null() argument 102 if ((ret = mbedtls_asn1_get_alg_null(p, end, alg)) != 0) { in mbedtls_x509_get_alg_null() [all …]
|
D | x509_csr.c | 42 static int x509_csr_get_version(unsigned char **p, in x509_csr_get_version() argument 48 if ((ret = mbedtls_asn1_get_int(p, end, ver)) != 0) { in x509_csr_get_version() 64 unsigned char **p, const unsigned char *end) in x509_csr_parse_extensions() argument 69 while (*p < end) { in x509_csr_parse_extensions() 74 if ((ret = mbedtls_asn1_get_tag(p, end, &len, in x509_csr_parse_extensions() 79 end_ext_data = *p + len; in x509_csr_parse_extensions() 82 if ((ret = mbedtls_asn1_get_tag(p, end_ext_data, &extn_oid.len, in x509_csr_parse_extensions() 88 extn_oid.p = *p; in x509_csr_parse_extensions() 89 *p += extn_oid.len; in x509_csr_parse_extensions() 92 if ((ret = mbedtls_asn1_get_tag(p, end_ext_data, &len, in x509_csr_parse_extensions() [all …]
|
D | x509_crl.c | 50 static int x509_crl_get_version(unsigned char **p, in x509_crl_get_version() argument 56 if ((ret = mbedtls_asn1_get_int(p, end, ver)) != 0) { in x509_crl_get_version() 75 static int x509_get_crl_ext(unsigned char **p, in x509_get_crl_ext() argument 81 if (*p == end) { in x509_get_crl_ext() 89 if ((ret = mbedtls_x509_get_ext(p, end, ext, 0)) != 0) { in x509_get_crl_ext() 93 end = ext->p + ext->len; in x509_get_crl_ext() 95 while (*p < end) { in x509_get_crl_ext() 107 if ((ret = mbedtls_asn1_get_tag(p, end, &len, in x509_get_crl_ext() 112 end_ext_data = *p + len; in x509_get_crl_ext() 115 if ((ret = mbedtls_asn1_get_tag(p, end_ext_data, &len, in x509_get_crl_ext() [all …]
|
D | pkcs7.c | 40 static int pkcs7_get_next_content_len(unsigned char **p, unsigned char *end, in pkcs7_get_next_content_len() argument 45 ret = mbedtls_asn1_get_tag(p, end, len, MBEDTLS_ASN1_CONSTRUCTED in pkcs7_get_next_content_len() 49 } else if ((size_t) (end - *p) != *len) { in pkcs7_get_next_content_len() 61 static int pkcs7_get_version(unsigned char **p, unsigned char *end, int *ver) in pkcs7_get_version() argument 65 ret = mbedtls_asn1_get_int(p, end, ver); in pkcs7_get_version() 84 static int pkcs7_get_content_info_type(unsigned char **p, unsigned char *end, in pkcs7_get_content_info_type() argument 90 unsigned char *start = *p; in pkcs7_get_content_info_type() 92 ret = mbedtls_asn1_get_tag(p, end, &len, MBEDTLS_ASN1_CONSTRUCTED in pkcs7_get_content_info_type() 95 *p = start; in pkcs7_get_content_info_type() 98 *seq_end = *p + len; in pkcs7_get_content_info_type() [all …]
|
D | ssl_tls13_client.c | 51 unsigned char *p = buf; in ssl_tls13_write_supported_versions_ext() local 65 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 5 + versions_len); in ssl_tls13_write_supported_versions_ext() 67 MBEDTLS_PUT_UINT16_BE(MBEDTLS_TLS_EXT_SUPPORTED_VERSIONS, p, 0); in ssl_tls13_write_supported_versions_ext() 68 MBEDTLS_PUT_UINT16_BE(versions_len + 1, p, 2); in ssl_tls13_write_supported_versions_ext() 69 p += 4; in ssl_tls13_write_supported_versions_ext() 72 *p++ = versions_len; in ssl_tls13_write_supported_versions_ext() 78 mbedtls_ssl_write_version(p, MBEDTLS_SSL_TRANSPORT_STREAM, in ssl_tls13_write_supported_versions_ext() 84 mbedtls_ssl_write_version(p + 2, MBEDTLS_SSL_TRANSPORT_STREAM, in ssl_tls13_write_supported_versions_ext() 130 const unsigned char *p = buf; in ssl_tls13_parse_alpn_ext() local 150 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_alpn_ext() [all …]
|
D | ssl_client.c | 31 unsigned char *p = buf; in ssl_write_hostname_ext() local 46 MBEDTLS_SSL_CHK_BUF_PTR(p, end, hostname_len + 9); in ssl_write_hostname_ext() 74 MBEDTLS_PUT_UINT16_BE(MBEDTLS_TLS_EXT_SERVERNAME, p, 0); in ssl_write_hostname_ext() 75 p += 2; in ssl_write_hostname_ext() 77 MBEDTLS_PUT_UINT16_BE(hostname_len + 5, p, 0); in ssl_write_hostname_ext() 78 p += 2; in ssl_write_hostname_ext() 80 MBEDTLS_PUT_UINT16_BE(hostname_len + 3, p, 0); in ssl_write_hostname_ext() 81 p += 2; in ssl_write_hostname_ext() 83 *p++ = MBEDTLS_BYTE_0(MBEDTLS_TLS_EXT_SERVERNAME_HOSTNAME); in ssl_write_hostname_ext() 85 MBEDTLS_PUT_UINT16_BE(hostname_len, p, 0); in ssl_write_hostname_ext() [all …]
|
D | x509_crt.c | 279 if (name->len < 3 || name->p[0] != '*' || name->p[1] != '.') { in x509_check_wildcard() 295 x509_memcasecmp(name->p + 1, cn + cn_idx, name->len - 1) == 0) { in x509_check_wildcard() 312 memcmp(a->p, b->p, b->len) == 0) { in x509_string_cmp() 319 x509_memcasecmp(a->p, b->p, b->len) == 0) { in x509_string_cmp() 347 memcmp(a->oid.p, b->oid.p, b->oid.len) != 0) { in x509_name_cmp() 392 static int x509_get_version(unsigned char **p, in x509_get_version() argument 399 if ((ret = mbedtls_asn1_get_tag(p, end, &len, in x509_get_version() 410 end = *p + len; in x509_get_version() 412 if ((ret = mbedtls_asn1_get_int(p, end, ver)) != 0) { in x509_get_version() 416 if (*p != end) { in x509_get_version() [all …]
|
D | pkparse.c | 168 static int pk_get_ecparams(unsigned char **p, const unsigned char *end, in pk_get_ecparams() argument 173 if (end - *p < 1) { in pk_get_ecparams() 179 params->tag = **p; in pk_get_ecparams() 189 if ((ret = mbedtls_asn1_get_tag(p, end, ¶ms->len, params->tag)) != 0) { in pk_get_ecparams() 193 params->p = *p; in pk_get_ecparams() 194 *p += params->len; in pk_get_ecparams() 196 if (*p != end) { in pk_get_ecparams() 227 unsigned char *p = params->p; in pk_group_from_specified() local 228 const unsigned char *const end = params->p + params->len; in pk_group_from_specified() 234 if ((ret = mbedtls_asn1_get_int(&p, end, &ver)) != 0) { in pk_group_from_specified() [all …]
|
D | x509_create.c | 245 unsigned char *p = der + 1; in parse_attribute_value_hex_der_encoded() local 246 if (mbedtls_asn1_get_len(&p, der + der_length, data_len) != 0) { in parse_attribute_value_hex_der_encoded() 259 if (p[i] == 0) { in parse_attribute_value_hex_der_encoded() 269 memcpy(data, p, *data_len); in parse_attribute_value_hex_der_encoded() 285 mbedtls_asn1_buf oid = { .p = NULL, .len = 0, .tag = MBEDTLS_ASN1_NULL }; in mbedtls_x509_string_to_names() 306 oid.p = mbedtls_calloc(1, oid.len); in mbedtls_x509_string_to_names() 307 memcpy(oid.p, attr_descr->oid, oid.len); in mbedtls_x509_string_to_names() 317 mbedtls_free(oid.p); in mbedtls_x509_string_to_names() 326 mbedtls_free(oid.p); in mbedtls_x509_string_to_names() 331 mbedtls_free(oid.p); in mbedtls_x509_string_to_names() [all …]
|
D | bignum_mod.c | 27 mbedtls_mpi_uint *p, in mbedtls_mpi_mod_residue_setup() argument 30 if (p_limbs != N->limbs || !mbedtls_mpi_core_lt_ct(p, N->p, N->limbs)) { in mbedtls_mpi_mod_residue_setup() 35 r->p = p; in mbedtls_mpi_mod_residue_setup() 47 r->p = NULL; in mbedtls_mpi_mod_residue_release() 56 N->p = NULL; in mbedtls_mpi_mod_modulus_init() 84 N->p = NULL; in mbedtls_mpi_mod_modulus_free() 110 memcpy(N.p, A, sizeof(mbedtls_mpi_uint) * limbs); in set_mont_const_square() 115 *X = RR.p; in set_mont_const_square() 116 RR.p = NULL; in set_mont_const_square() 127 const mbedtls_mpi_uint *p, in standard_modulus_setup() argument [all …]
|
D | ssl_tls13_server.c | 55 const unsigned char *p = buf; in ssl_tls13_parse_key_exchange_modes_ext() local 60 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 1); in ssl_tls13_parse_key_exchange_modes_ext() 61 ke_modes_len = *p++; in ssl_tls13_parse_key_exchange_modes_ext() 70 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, ke_modes_len); in ssl_tls13_parse_key_exchange_modes_ext() 73 switch (*p++) { in ssl_tls13_parse_key_exchange_modes_ext() 384 for (const unsigned char *p = cipher_suites; in ssl_tls13_select_ciphersuite_for_psk() local 385 p < cipher_suites_end; p += 2) { in ssl_tls13_select_ciphersuite_for_psk() 389 cipher_suite = MBEDTLS_GET_UINT16_BE(p, 0); in ssl_tls13_select_ciphersuite_for_psk() 422 for (const unsigned char *p = cipher_suites; p < cipher_suites_end; p += 2) { in ssl_tls13_select_ciphersuite_for_resumption() local 423 uint16_t cipher_suite = MBEDTLS_GET_UINT16_BE(p, 0); in ssl_tls13_select_ciphersuite_for_resumption() [all …]
|
D | pkwrite.c | 111 static int pk_write_rsa_pubkey(unsigned char **p, unsigned char *start, in pk_write_rsa_pubkey() argument 123 (ret = mbedtls_asn1_write_mpi(p, start, &T)) < 0) { in pk_write_rsa_pubkey() 130 (ret = mbedtls_asn1_write_mpi(p, start, &T)) < 0) { in pk_write_rsa_pubkey() 142 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(p, start, len)); in pk_write_rsa_pubkey() 143 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(p, start, MBEDTLS_ASN1_CONSTRUCTED | in pk_write_rsa_pubkey() 152 static int pk_write_ec_pubkey(unsigned char **p, unsigned char *start, in pk_write_ec_pubkey() argument 167 if (*p < start || (size_t) (*p - start) < len) { in pk_write_ec_pubkey() 171 *p -= len; in pk_write_ec_pubkey() 172 memcpy(*p, buf, len); in pk_write_ec_pubkey() 177 static int pk_write_ec_pubkey(unsigned char **p, unsigned char *start, in pk_write_ec_pubkey() argument [all …]
|
D | bignum.c | 84 void * const p[2] = { X->p, Y->p }; in mbedtls_mpi_lt_mpi_ct() local 86 mbedtls_ct_condition_t lt = mbedtls_mpi_core_lt_ct(p[i], p[i ^ 1], X->n); in mbedtls_mpi_lt_mpi_ct() 127 mbedtls_mpi_core_cond_assign(X->p, Y->p, Y->n, do_assign); in mbedtls_mpi_safe_cond_assign() 131 X->p[i] = mbedtls_ct_mpi_uint_if_else_0(do_not_assign, X->p[i]); in mbedtls_mpi_safe_cond_assign() 167 mbedtls_mpi_core_cond_swap(X->p, Y->p, X->n, do_swap); in mbedtls_mpi_safe_cond_swap() 185 X->p = NULL; in mbedtls_mpi_init() 197 if (X->p != NULL) { in mbedtls_mpi_free() 198 mbedtls_mpi_zeroize_and_free(X->p, X->n); in mbedtls_mpi_free() 203 X->p = NULL; in mbedtls_mpi_free() 211 mbedtls_mpi_uint *p; in mbedtls_mpi_grow() local [all …]
|
D | ssl_tls13_generic.c | 91 const unsigned char *p = buf; in mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts() local 99 if (p == end) { in mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts() 111 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts() 112 extensions_len = MBEDTLS_GET_UINT16_BE(p, 0); in mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts() 113 p += 2; in mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts() 116 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, extensions_len); in mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts() 117 extensions_end = p + extensions_len; in mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts() 119 while (p < extensions_end) { in mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts() 123 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, extensions_end, 4); in mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts() 124 extension_type = MBEDTLS_GET_UINT16_BE(p, 0); in mbedtls_ssl_tls13_is_supported_versions_ext_present_in_exts() [all …]
|
D | ssl_tls12_server.c | 186 const unsigned char *p; in ssl_parse_supported_groups_ext() local 228 p = buf + 2; in ssl_parse_supported_groups_ext() 230 uint16_t curr_tls_id = MBEDTLS_GET_UINT16_BE(p, 0); in ssl_parse_supported_groups_ext() 239 p += 2; in ssl_parse_supported_groups_ext() 251 const unsigned char *p; in ssl_parse_supported_point_formats() local 261 p = buf + 1; in ssl_parse_supported_point_formats() 263 if (p[0] == MBEDTLS_ECP_PF_UNCOMPRESSED || in ssl_parse_supported_point_formats() 264 p[0] == MBEDTLS_ECP_PF_COMPRESSED) { in ssl_parse_supported_point_formats() 267 ssl->handshake->ecdh_ctx.point_format = p[0]; in ssl_parse_supported_point_formats() 272 p[0]); in ssl_parse_supported_point_formats() [all …]
|
D | ssl_tls12_client.c | 56 unsigned char *p = buf; in ssl_write_renegotiation_ext() local 70 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 5 + ssl->verify_data_len); in ssl_write_renegotiation_ext() 75 MBEDTLS_PUT_UINT16_BE(MBEDTLS_TLS_EXT_RENEGOTIATION_INFO, p, 0); in ssl_write_renegotiation_ext() 76 p += 2; in ssl_write_renegotiation_ext() 78 *p++ = 0x00; in ssl_write_renegotiation_ext() 79 *p++ = MBEDTLS_BYTE_0(ssl->verify_data_len + 1); in ssl_write_renegotiation_ext() 80 *p++ = MBEDTLS_BYTE_0(ssl->verify_data_len); in ssl_write_renegotiation_ext() 82 memcpy(p, ssl->own_verify_data, ssl->verify_data_len); in ssl_write_renegotiation_ext() 100 unsigned char *p = buf; in ssl_write_supported_point_formats_ext() local 107 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 6); in ssl_write_supported_point_formats_ext() [all …]
|
D | ecjpake.c | 146 ctx->s.p == NULL) { in mbedtls_ecjpake_check() 156 static int ecjpake_write_len_point(unsigned char **p, in ecjpake_write_len_point() argument 166 if (end < *p || end - *p < 5) { in ecjpake_write_len_point() 171 &len, *p + 4, end - (*p + 4)); in ecjpake_write_len_point() 176 MBEDTLS_PUT_UINT32_BE(len, *p, 0); in ecjpake_write_len_point() 178 *p += 4 + len; in ecjpake_write_len_point() 203 unsigned char *p = buf; in ecjpake_hash() local 209 MBEDTLS_MPI_CHK(ecjpake_write_len_point(&p, end, grp, pf, G)); in ecjpake_hash() 210 MBEDTLS_MPI_CHK(ecjpake_write_len_point(&p, end, grp, pf, V)); in ecjpake_hash() 211 MBEDTLS_MPI_CHK(ecjpake_write_len_point(&p, end, grp, pf, X)); in ecjpake_hash() [all …]
|
D | base64.c | 66 unsigned char *p; in mbedtls_base64_encode() local 89 for (i = 0, p = dst; i < n; i += 3) { in mbedtls_base64_encode() 94 *p++ = mbedtls_ct_base64_enc_char((C1 >> 2) & 0x3F); in mbedtls_base64_encode() 95 *p++ = mbedtls_ct_base64_enc_char((((C1 & 3) << 4) + (C2 >> 4)) in mbedtls_base64_encode() 97 *p++ = mbedtls_ct_base64_enc_char((((C2 & 15) << 2) + (C3 >> 6)) in mbedtls_base64_encode() 99 *p++ = mbedtls_ct_base64_enc_char(C3 & 0x3F); in mbedtls_base64_encode() 106 *p++ = mbedtls_ct_base64_enc_char((C1 >> 2) & 0x3F); in mbedtls_base64_encode() 107 *p++ = mbedtls_ct_base64_enc_char((((C1 & 3) << 4) + (C2 >> 4)) in mbedtls_base64_encode() 111 *p++ = mbedtls_ct_base64_enc_char(((C2 & 15) << 2) & 0x3F); in mbedtls_base64_encode() 113 *p++ = '='; in mbedtls_base64_encode() [all …]
|
D | ssl_tls.c | 253 if ((ret = mbedtls_x509_crt_parse_der(dst->peer_cert, src->peer_cert->raw.p, in mbedtls_ssl_session_copy() 1188 uint16_t *p; in ssl_handshake_init() local 1220 p = (uint16_t *) ssl->handshake->sig_algs; in ssl_handshake_init() 1227 *p = ((hash << 8) | MBEDTLS_SSL_SIG_ECDSA); in ssl_handshake_init() 1228 p++; in ssl_handshake_init() 1231 *p = ((hash << 8) | MBEDTLS_SSL_SIG_RSA); in ssl_handshake_init() 1232 p++; in ssl_handshake_init() 1235 *p = MBEDTLS_TLS_SIG_NONE; in ssl_handshake_init() 1251 unsigned char **p, unsigned char *end, in ssl_cookie_write_dummy() argument 1255 ((void) p); in ssl_cookie_write_dummy() [all …]
|
/mbedtls-3.6.0/programs/test/ |
D | udp_proxy.c | 180 char *p, *q; in get_options() local 195 p = argv[i]; in get_options() 196 if ((q = strchr(p, '=')) == NULL) { in get_options() 197 exit_usage(p, NULL); in get_options() 201 if (strcmp(p, "server_addr") == 0) { in get_options() 203 } else if (strcmp(p, "server_port") == 0) { in get_options() 205 } else if (strcmp(p, "listen_addr") == 0) { in get_options() 207 } else if (strcmp(p, "listen_port") == 0) { in get_options() 209 } else if (strcmp(p, "duplicate") == 0) { in get_options() 212 exit_usage(p, q); in get_options() [all …]
|
/mbedtls-3.6.0/include/mbedtls/ |
D | asn1write.h | 52 int mbedtls_asn1_write_len(unsigned char **p, const unsigned char *start, 66 int mbedtls_asn1_write_tag(unsigned char **p, const unsigned char *start, 84 int mbedtls_asn1_write_raw_buffer(unsigned char **p, const unsigned char *start, 102 int mbedtls_asn1_write_mpi(unsigned char **p, const unsigned char *start, 118 int mbedtls_asn1_write_null(unsigned char **p, const unsigned char *start); 134 int mbedtls_asn1_write_oid(unsigned char **p, const unsigned char *start, 152 int mbedtls_asn1_write_algorithm_identifier(unsigned char **p, 173 int mbedtls_asn1_write_algorithm_identifier_ext(unsigned char **p, 191 int mbedtls_asn1_write_bool(unsigned char **p, const unsigned char *start, 208 int mbedtls_asn1_write_int(unsigned char **p, const unsigned char *start, int val); [all …]
|
/mbedtls-3.6.0/tests/suites/ |
D | test_suite_bignum_mod.function | 10 TEST_MEMORY_COMPARE((a).p, (a).limbs * sizeof(mbedtls_mpi_uint), \ 11 (b).p, (b).limbs * sizeof(mbedtls_mpi_uint)) 18 mbedtls_mpi_uint *p = NULL; 21 int ret = mbedtls_test_read_mpi_core(&p, &limbs, input); 27 r->p = p; 33 return mbedtls_mpi_mod_residue_setup(r, m, p, limbs); 80 TEST_ASSERT(m.p != mp); 131 TEST_MEMORY_COMPARE(rX.p, bytes, rR.p, bytes); 134 memcpy(rX.p, rA.p, bytes); 136 TEST_MEMORY_COMPARE(rX.p, bytes, rR.p, bytes); [all …]
|
D | test_suite_asn1parse.function | 19 static int nested_parse(unsigned char **const p, 25 unsigned char *const start = *p; 40 TEST_EQUAL(mbedtls_asn1_get_tag(p, end, &len2, tag ^ 1), 42 *p = start; 43 TEST_EQUAL(mbedtls_asn1_get_tag(p, end, &len2, tag), 0); 45 TEST_ASSERT(*p == content_start); 46 *p = content_start; 52 *p = start; 53 ret = mbedtls_asn1_get_bool(p, end, &val); 65 *p = start; [all …]
|