/openthread-3.4.0/third_party/mbedtls/repo/library/ |
D | asn1parse.c | 45 int mbedtls_asn1_get_len( unsigned char **p, in mbedtls_asn1_get_len() argument 49 if( ( end - *p ) < 1 ) in mbedtls_asn1_get_len() 52 if( ( **p & 0x80 ) == 0 ) in mbedtls_asn1_get_len() 53 *len = *(*p)++; in mbedtls_asn1_get_len() 56 switch( **p & 0x7F ) in mbedtls_asn1_get_len() 59 if( ( end - *p ) < 2 ) in mbedtls_asn1_get_len() 62 *len = (*p)[1]; in mbedtls_asn1_get_len() 63 (*p) += 2; in mbedtls_asn1_get_len() 67 if( ( end - *p ) < 3 ) in mbedtls_asn1_get_len() 70 *len = ( (size_t)(*p)[1] << 8 ) | (*p)[2]; in mbedtls_asn1_get_len() [all …]
|
D | asn1write.c | 37 int mbedtls_asn1_write_len( unsigned char **p, unsigned char *start, size_t len ) in mbedtls_asn1_write_len() argument 41 if( *p - start < 1 ) in mbedtls_asn1_write_len() 44 *--(*p) = (unsigned char) len; in mbedtls_asn1_write_len() 50 if( *p - start < 2 ) in mbedtls_asn1_write_len() 53 *--(*p) = (unsigned char) len; in mbedtls_asn1_write_len() 54 *--(*p) = 0x81; in mbedtls_asn1_write_len() 60 if( *p - start < 3 ) in mbedtls_asn1_write_len() 63 *--(*p) = MBEDTLS_BYTE_0( len ); in mbedtls_asn1_write_len() 64 *--(*p) = MBEDTLS_BYTE_1( len ); in mbedtls_asn1_write_len() 65 *--(*p) = 0x82; in mbedtls_asn1_write_len() [all …]
|
D | x509.c | 78 int mbedtls_x509_get_serial( unsigned char **p, const unsigned char *end, in mbedtls_x509_get_serial() argument 83 if( ( end - *p ) < 1 ) in mbedtls_x509_get_serial() 87 if( **p != ( MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_PRIMITIVE | 2 ) && in mbedtls_x509_get_serial() 88 **p != MBEDTLS_ASN1_INTEGER ) in mbedtls_x509_get_serial() 92 serial->tag = *(*p)++; in mbedtls_x509_get_serial() 94 if( ( ret = mbedtls_asn1_get_len( p, end, &serial->len ) ) != 0 ) in mbedtls_x509_get_serial() 97 serial->p = *p; in mbedtls_x509_get_serial() 98 *p += serial->len; in mbedtls_x509_get_serial() 109 int mbedtls_x509_get_alg_null( unsigned char **p, const unsigned char *end, in mbedtls_x509_get_alg_null() argument 114 if( ( ret = mbedtls_asn1_get_alg_null( p, end, alg ) ) != 0 ) in mbedtls_x509_get_alg_null() [all …]
|
D | x509_crl.c | 68 static int x509_crl_get_version( unsigned char **p, in x509_crl_get_version() argument 74 if( ( ret = mbedtls_asn1_get_int( p, end, ver ) ) != 0 ) in x509_crl_get_version() 95 static int x509_get_crl_ext( unsigned char **p, in x509_get_crl_ext() argument 101 if( *p == end ) in x509_get_crl_ext() 108 if( ( ret = mbedtls_x509_get_ext( p, end, ext, 0 ) ) != 0 ) in x509_get_crl_ext() 111 end = ext->p + ext->len; in x509_get_crl_ext() 113 while( *p < end ) in x509_get_crl_ext() 126 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, in x509_get_crl_ext() 130 end_ext_data = *p + len; in x509_get_crl_ext() 133 if( ( ret = mbedtls_asn1_get_tag( p, end_ext_data, &len, in x509_get_crl_ext() [all …]
|
D | pkparse.c | 183 static int pk_get_ecparams( unsigned char **p, const unsigned char *end, in pk_get_ecparams() argument 188 if ( end - *p < 1 ) in pk_get_ecparams() 193 params->tag = **p; in pk_get_ecparams() 204 if( ( ret = mbedtls_asn1_get_tag( p, end, ¶ms->len, params->tag ) ) != 0 ) in pk_get_ecparams() 209 params->p = *p; in pk_get_ecparams() 210 *p += params->len; in pk_get_ecparams() 212 if( *p != end ) in pk_get_ecparams() 242 unsigned char *p = params->p; in pk_group_from_specified() local 243 const unsigned char * const end = params->p + params->len; in pk_group_from_specified() 249 if( ( ret = mbedtls_asn1_get_int( &p, end, &ver ) ) != 0 ) in pk_group_from_specified() [all …]
|
D | x509_csr.c | 62 static int x509_csr_get_version( unsigned char **p, in x509_csr_get_version() argument 68 if( ( ret = mbedtls_asn1_get_int( p, end, ver ) ) != 0 ) in x509_csr_get_version() 90 unsigned char *p, *end; in mbedtls_x509_csr_parse_der() local 106 p = mbedtls_calloc( 1, len = buflen ); in mbedtls_x509_csr_parse_der() 108 if( p == NULL ) in mbedtls_x509_csr_parse_der() 111 memcpy( p, buf, buflen ); in mbedtls_x509_csr_parse_der() 113 csr->raw.p = p; in mbedtls_x509_csr_parse_der() 115 end = p + len; in mbedtls_x509_csr_parse_der() 124 if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, in mbedtls_x509_csr_parse_der() 131 if( len != (size_t) ( end - p ) ) in mbedtls_x509_csr_parse_der() [all …]
|
D | x509_crt.c | 263 if( name->len < 3 || name->p[0] != '*' || name->p[1] != '.' ) in x509_check_wildcard() 279 x509_memcasecmp( name->p + 1, cn + cn_idx, name->len - 1 ) == 0 ) in x509_check_wildcard() 297 memcmp( a->p, b->p, b->len ) == 0 ) in x509_string_cmp() 305 x509_memcasecmp( a->p, b->p, b->len ) == 0 ) in x509_string_cmp() 334 memcmp( a->oid.p, b->oid.p, b->oid.len ) != 0 ) in x509_name_cmp() 379 static int x509_get_version( unsigned char **p, in x509_get_version() argument 386 if( ( ret = mbedtls_asn1_get_tag( p, end, &len, in x509_get_version() 398 end = *p + len; in x509_get_version() 400 if( ( ret = mbedtls_asn1_get_int( p, end, ver ) ) != 0 ) in x509_get_version() 403 if( *p != end ) in x509_get_version() [all …]
|
/openthread-3.4.0/tests/scripts/thread-cert/ |
D | Cert_9_2_06_DatasetDissemination.py | 233 must_verify(lambda p: p.thread_meshcop.tlv.state == 1) 252 filter(lambda p: p.mle.tlv.active_tstamp == TIMESTAMP_INIT and \ 253 (p.mle.tlv.leader_data.data_version - 255 p.mle.tlv.leader_data.stable_data_version == 257 p.thread_nwd.tlv.stable == [0] and \ 258 NWD_COMMISSIONING_DATA_TLV in p.thread_nwd.tlv.type and \ 259 NM_COMMISSIONER_SESSION_ID_TLV in p.thread_meshcop.tlv.type and \ 260 NM_STEERING_DATA_TLV in p.thread_meshcop.tlv.type and \ 261 NM_BORDER_AGENT_LOCATOR_TLV in p.thread_meshcop.tlv.type 283 filter(lambda p: p.mle.tlv.active_tstamp == TIMESTAMP_INIT and \ [all …]
|
D | Cert_9_2_04_ActiveDataset.py | 210 … MGMT_ACTIVE_SET_URI).filter(lambda p: p.thread_meshcop.tlv.xpan_id == '000db70000000000' and p. 211 … thread_meshcop.tlv.net_name == ['GRL'] and p.thread_meshcop.tlv.chan_mask_mask 212 … == '001fffe0' and p.thread_meshcop.tlv.active_tstamp == 101).must_next() 216 lambda p: p.thread_meshcop.tlv.state == 1).must_next() 224 …MGMT_ACTIVE_GET_URI).filter(lambda p: p.thread_meshcop.tlv.active_tstamp == 101 and p.thread_meshc… 225 … xpan_id == '000db70000000000' and p.thread_meshcop.tlv.net_name == ['GRL'] and 226 … p.thread_meshcop.tlv.chan_mask_mask == '001fffe0').must_next() 231 … lambda p: p.thread_meshcop.tlv.active_tstamp == 102 and p.thread_meshcop.tlv.xpan_id == 232 … '000db70000000001' and p.thread_meshcop.tlv.net_name == ['threadcert'] and p.thread_meshcop.tlv. 233 chan_mask_mask == '001fffe0' and p.thread_meshcop.tlv.channel == [18]).must_next() [all …]
|
D | Cert_9_2_09_PendingPartition.py | 248 must_verify(lambda p: p.thread_meshcop.tlv.state == 1) 272 filter(lambda p: p.mle.tlv.active_tstamp == TIMESTAMP_INIT and\ 273 p.mle.tlv.pending_tstamp == COMM_PENDING_TIMESTAMP and\ 274 (p.mle.tlv.leader_data.data_version - 276 (p.mle.tlv.leader_data.stable_data_version - 278 p.thread_nwd.tlv.stable == [0] and\ 279 NWD_COMMISSIONING_DATA_TLV in p.thread_nwd.tlv.type and\ 280 NM_COMMISSIONER_SESSION_ID_TLV in p.thread_meshcop.tlv.type and\ 281 NM_BORDER_AGENT_LOCATOR_TLV in p.thread_meshcop.tlv.type 288 filter(lambda p: { [all …]
|
D | v1_2_LowPower_7_2_01_ForwardTrackingSeries.py | 194 … .filter(lambda p: LinkMetricsSubTlvType.FORWARD_PROBING_REGISTRATION in p.mle.tlv.link_sub_tlv) \ 195 .filter(lambda p: 4 in p.mle.tlv.link_forward_series) \ 196 ….filter(lambda p: consts.LINK_METRICS_TYPE_AVERAGE_ENUM_COUNT in p.mle.tlv.metric_type_id_flags.ty… 197 ….filter(lambda p: consts.LINK_METRICS_METRIC_TYPE_ENUM_PDU_COUNT in p.mle.tlv.metric_type_id_flags… 198 .filter(lambda p: 1 in p.mle.tlv.metric_type_id_flags.l) \ 205 .filter(lambda p: p.mle.tlv.link_status_sub_tlv == consts.LINK_METRICS_STATUS_SUCCESS) \ 212 .filter(lambda p: TlvType.LINK_METRICS_REPORT in p.mle.tlv.type) \ 213 ….filter(lambda p: consts.LINK_METRICS_TYPE_AVERAGE_ENUM_COUNT in p.mle.tlv.metric_type_id_flags.ty… 214 ….filter(lambda p: consts.LINK_METRICS_METRIC_TYPE_ENUM_PDU_COUNT in p.mle.tlv.metric_type_id_flags… 224 … .filter(lambda p: LinkMetricsSubTlvType.FORWARD_PROBING_REGISTRATION in p.mle.tlv.link_sub_tlv) \ [all …]
|
D | v1_2_LowPower_7_1_02_SingleProbeLinkMetricsWithoutEnhancedAck.py | 209 … .filter(lambda p: LinkMetricsSubTlvType.LINK_METRICS_QUERY_ID in p.mle.tlv.link_sub_tlv) \ 210 .filter(lambda p: p.mle.tlv.query_id == 0) \ 211 … .filter(lambda p: LinkMetricsSubTlvType.LINK_METRICS_QUERY_OPTIONS in p.mle.tlv.link_sub_tlv) \ 225 .filter(lambda p: LinkMetricsSubTlvType.LINK_METRICS_REPORT in p.mle.tlv.link_sub_tlv) \ 226 ….filter(lambda p: consts.LINK_METRICS_TYPE_AVERAGE_ENUM_EXPONENTIAL in p.mle.tlv.metric_type_id_fl… 227 ….filter(lambda p: consts.LINK_METRICS_METRIC_TYPE_ENUM_RSSI in p.mle.tlv.metric_type_id_flags.metr… 245 … .filter(lambda p: LinkMetricsSubTlvType.LINK_METRICS_QUERY_ID in p.mle.tlv.link_sub_tlv) \ 246 .filter(lambda p: p.mle.tlv.query_id == 0) \ 247 … .filter(lambda p: LinkMetricsSubTlvType.LINK_METRICS_QUERY_OPTIONS in p.mle.tlv.link_sub_tlv) \ 261 .filter(lambda p: LinkMetricsSubTlvType.LINK_METRICS_REPORT in p.mle.tlv.link_sub_tlv) \ [all …]
|
D | Cert_5_8_04_SecurityPolicyTLV.py | 205 filter(lambda p: p.thread_meshcop.tlv.type is nullField).\ 217 filter(lambda p: (p.thread_meshcop.tlv.sec_policy_rot == 3600 and 218 p.thread_meshcop.tlv.sec_policy_o == 1 and 219 p.thread_meshcop.tlv.sec_policy_n == 1 and 220 p.thread_meshcop.tlv.sec_policy_r == 1 and 221 p.thread_meshcop.tlv.sec_policy_c == 1) or 222 (p.thread_meshcop.tlv.unknown == '0e10f7')).\ 235 filter(lambda p: { 239 } == set(p.thread_meshcop.tlv.type) and\ 240 p.thread_meshcop.tlv.active_tstamp == 15 and\ [all …]
|
D | Cert_8_3_01_CommissionerPetition.py | 123 filter(lambda p: { 125 } == set(p.coap.tlv.type)\ 146 filter(lambda p: { 150 } <= set(p.coap.tlv.type) and\ 151 p.thread_meshcop.tlv.state == MESHCOP_ACCEPT 157 filter(lambda p: { 162 } == set(p.mle.tlv.type) and\ 165 } == set(p.thread_nwd.tlv.type) and\ 170 } == set(p.thread_meshcop.tlv.type) and\ 171 p.mle.tlv.leader_data.data_version == [all …]
|
D | Cert_5_6_09_NetworkDataForwarding.py | 149 ).must_verify(lambda p: {Ipv6Addr('2001:2:0:1::'), Ipv6Addr('2001:2:0:2::')} == set( 150 … p.thread_nwd.tlv.prefix) and p.thread_nwd.tlv.border_router.flag.p == [0] and p.thread_nwd.tlv. 151 … border_router.flag.s == [1] and p.thread_nwd.tlv.border_router.flag.r == [1] and p.thread_nwd.tlv 152 … .border_router.flag.o == [1] and p.thread_nwd.tlv.stable == [0, 1, 1, 1, 1, 1]) 157 …).must_verify(lambda p: {SOURCE_ADDRESS_TLV, LEADER_DATA_TLV, NETWORK_DATA_TLV, ACTIVE_TIMESTAMP_T… 158 p.mle.tlv.type 160 p.thread_nwd.tlv.type) and {Ipv6Addr('2001:2:0:1::'), Ipv6Addr('2001:2:0:2::')} == set( 161 … p.thread_nwd.tlv.prefix) and {0xFFFE, 0xFFFE} == set(p.thread_nwd.tlv.border_router_16)) 168 lambda p: p.wpan.dst16 == leader_rloc16 and p.wpan.src16 == router1_rloc16) 173 lambda p: p.wpan.dst16 == leader_rloc16 and p.wpan.src16 == router1_rloc16) [all …]
|
D | Cert_5_8_02_KeyIncrement.py | 91 …leader_pkts.filter_mle_cmd(MLE_ADVERTISEMENT).must_next().must_verify(lambda p: p.wpan.aux_sec.key… 101 …MLE_ADVERTISEMENT).must_next().must_verify(lambda p: p.wpan.aux_sec.key_index == 1 and p.wpan.aux_… 102 … key_id_mode == 2 and p.wpan.aux_sec.key_source == 0) 109 … _lpkts.filter(lambda p: p.ipv6.dst == router_mleid).filter_ping_request().must_next().must_verify( 110 lambda p: p.wpan.aux_sec.key_index == 1 and p.wpan.aux_sec.key_id_mode == 1) 115 … _rpkts.filter(lambda p: p.ipv6.dst == leader_mleid).filter_ping_reply().must_next().must_verify( 116 lambda p: p.wpan.aux_sec.key_index == 1 and p.wpan.aux_sec.key_id_mode == 1) 122 … _lpkts.filter(lambda p: p.ipv6.dst == router_mleid).filter_ping_request().must_next().must_verify( 123 lambda p: p.wpan.aux_sec.key_index == 2 and p.wpan.aux_sec.key_id_mode == 1) 128 … _rpkts.filter(lambda p: p.ipv6.dst == leader_mleid).filter_ping_reply().must_next().must_verify( [all …]
|
D | Cert_7_1_06_BorderRouterAsLeader.py | 202 filter(lambda p: 204 p.thread_nwd.tlv.prefix and\ 206 p.thread_nwd.tlv.border_router_16 228 filter(lambda p: { 232 } <= set(p.mle.tlv.type) and\ 233 p.thread_nwd.tlv.border_router.flag.p == [1] and\ 234 p.thread_nwd.tlv.border_router.flag.s == [1] and\ 235 p.thread_nwd.tlv.border_router.flag.r == [1] and\ 236 p.thread_nwd.tlv.border_router.flag.o == [1] and\ 238 p.thread_nwd.tlv.prefix [all …]
|
D | v1_2_LowPower_7_1_01_SingleProbeLinkMetricsWithEnhancedAcks.py | 205 … .filter(lambda p: consts.LM_ENHANCED_ACK_CONFIGURATION_SUB_TLV in p.mle.tlv.link_sub_tlv) \ 206 … .filter(lambda p: p.mle.tlv.link_enh_ack_flags == consts.LINK_METRICS_ENH_ACK_PROBING_REGISTER) \ 207 .filter(lambda p: p.mle.tlv.link_requested_type_id_flags == '0a') \ 216 .filter(lambda p: p.mle.tlv.link_status_sub_tlv == consts.LINK_METRICS_STATUS_SUCCESS) \ 234 … .filter(lambda p: consts.LM_ENHANCED_ACK_CONFIGURATION_SUB_TLV in p.mle.tlv.link_sub_tlv) \ 235 … .filter(lambda p: p.mle.tlv.link_enh_ack_flags == consts.LINK_METRICS_ENH_ACK_PROBING_REGISTER) \ 236 .filter(lambda p: p.mle.tlv.link_requested_type_id_flags == '0a0b') \ 242 .filter(lambda p: p.mle.tlv.link_status_sub_tlv == consts.LINK_METRICS_STATUS_SUCCESS) \ 265 … .filter(lambda p: p.wpan.payload_ie.vendor.oui == consts.THREAD_IEEE_802154_COMPANY_ID) \ 287 … .filter(lambda p: p.wpan.payload_ie.vendor.oui == consts.THREAD_IEEE_802154_COMPANY_ID) \ [all …]
|
D | Cert_5_8_03_KeyIncrementRollOver.py | 103 …MLE_ADVERTISEMENT).must_next().must_verify(lambda p: p.wpan.aux_sec.key_index == 128 and p.wpan.au… 104 … key_id_mode == 2 and p.wpan.aux_sec.key_source == 127) 111 … _lpkts.filter(lambda p: p.ipv6.dst == router_mleid).filter_ping_request().must_next().must_verify( 112 lambda p: p.wpan.aux_sec.key_index == 128 and p.wpan.aux_sec.key_id_mode == 1) 117 … _rpkts.filter(lambda p: p.ipv6.dst == leader_mleid).filter_ping_reply().must_next().must_verify( 118 lambda p: p.wpan.aux_sec.key_index == 128 and p.wpan.aux_sec.key_id_mode == 1) 125 … _lpkts.filter(lambda p: p.ipv6.dst == router_mleid).filter_ping_request().must_next().must_verify( 126 lambda p: p.wpan.aux_sec.key_index == 1 and p.wpan.aux_sec.key_id_mode == 1) 131 … _rpkts.filter(lambda p: p.ipv6.dst == leader_mleid).filter_ping_reply().must_next().must_verify( 132 lambda p: p.wpan.aux_sec.key_index == 1 and p.wpan.aux_sec.key_id_mode == 1)
|
D | Cert_8_1_01_Commissioning.py | 127 filter(lambda p: 128 [THREAD_DISCOVERY_TLV] == p.mle.tlv.type and\ 129 [NM_DISCOVERY_REQUEST_TLV] == p.thread_meshcop.tlv.type and\ 130 p.thread_meshcop.tlv.discovery_req_ver == JOINER_VERSION 153 filter(lambda p: { 159 } <= set(p.thread_meshcop.tlv.type) and\ 160 p.thread_meshcop.tlv.discovery_rsp_ver == COMMISSIONER_VERSION 173 filter(lambda p: 174 p.dtls.handshake.type == [HANDSHAKE_CLIENT_HELLO] and\ 175 p.udp.srcport in _rs_pkt.thread_meshcop.tlv.udp_port and\ [all …]
|
D | Cert_7_1_01_BorderRouterAsLeader.py | 139 filter(lambda p: { 149 } < set(p.mle.tlv.type) and\ 150 p.mle.tlv.mode.network_data == 1 164 filter(lambda p: { 167 } == set(p.thread_nwd.tlv.prefix) and\ 168 p.thread_nwd.tlv.border_router.flag.p == [1, 1] and\ 169 p.thread_nwd.tlv.border_router.flag.s == [1, 1] and\ 170 p.thread_nwd.tlv.border_router.flag.r == [1, 1] and\ 171 p.thread_nwd.tlv.border_router.flag.o == [1, 1] and\ 172 p.thread_nwd.tlv.stable == [0, 1, 1, 1, 0, 0, 0] [all …]
|
D | Cert_9_2_02_MGMTCommissionerSet.py | 155 filter(lambda p: 156 [NM_STEERING_DATA_TLV] == p.coap.tlv.type and\ 157 p.thread_meshcop.tlv.steering_data == Bytes('ff') 169 filter(lambda p: 170 [NM_STATE_TLV] == p.coap.tlv.type and\ 171 p.thread_meshcop.tlv.state == MESHCOP_REJECT 185 filter(lambda p: { 188 } == set(p.thread_meshcop.tlv.type) and\ 189 p.thread_meshcop.tlv.steering_data == Bytes('ff') 201 filter(lambda p: [all …]
|
D | Cert_7_1_07_BorderRouterAsLeader.py | 226 filter(lambda p: 228 p.thread_nwd.tlv.prefix and\ 230 p.thread_nwd.tlv.border_router_16 236 filter(lambda p: p.coap.mid == _dn_pkt.coap.mid).\ 257 filter(lambda p: { 261 } <= set(p.mle.tlv.type) and\ 263 p.thread_nwd.tlv.prefix and\ 264 p.mle.tlv.leader_data.data_version == 266 p.mle.tlv.leader_data.stable_data_version == 274 filter(lambda p: { [all …]
|
/openthread-3.4.0/tests/scripts/thread-cert/pktverify/ |
D | packet_filter.py | 58 def _always_true(p): argument 166 filter_func=lambda p: self._filter_func(p) and func(p), 207 p = self._pkts[idx] 210 if self._filter_func(p): 211 … if p.wpan and not (self._index[0] <= idx < self._stop_index[0]): # wpan matched but not in range 213 … elif p.eth and not (self._index[1] <= idx < self._stop_index[1]): # eth matched but not in range 216 self._on_found_next(idx, p) 218 return p 230 p = self.next() 231 if p is not None: [all …]
|
/openthread-3.4.0/third_party/mbedtls/repo/include/mbedtls/ |
D | asn1write.h | 58 int mbedtls_asn1_write_len( unsigned char **p, unsigned char *start, 72 int mbedtls_asn1_write_tag( unsigned char **p, unsigned char *start, 88 int mbedtls_asn1_write_raw_buffer( unsigned char **p, unsigned char *start, 106 int mbedtls_asn1_write_mpi( unsigned char **p, unsigned char *start, 122 int mbedtls_asn1_write_null( unsigned char **p, unsigned char *start ); 138 int mbedtls_asn1_write_oid( unsigned char **p, unsigned char *start, 156 int mbedtls_asn1_write_algorithm_identifier( unsigned char **p, 174 int mbedtls_asn1_write_bool( unsigned char **p, unsigned char *start, 191 int mbedtls_asn1_write_int( unsigned char **p, unsigned char *start, int val ); 206 int mbedtls_asn1_write_enum( unsigned char **p, unsigned char *start, int val ); [all …]
|