/external/wpa_supplicant_8/hostapd/src/tls/ |
H A D | asn1.h | 55 size_t len; member in struct:asn1_oid 59 int asn1_get_next(const u8 *buf, size_t len, struct asn1_hdr *hdr); 60 int asn1_parse_oid(const u8 *buf, size_t len, struct asn1_oid *oid); 61 int asn1_get_oid(const u8 *buf, size_t len, struct asn1_oid *oid, 63 void asn1_oid_to_str(const struct asn1_oid *oid, char *buf, size_t len); 64 unsigned long asn1_bit_string_to_long(const u8 *buf, size_t len);
|
H A D | bignum.c | 71 * @len: Length of the buffer, can be %NULL if buffer is known to be long 75 int bignum_get_unsigned_bin(const struct bignum *n, u8 *buf, size_t *len) argument 78 if (len && need > *len) { 79 *len = need; 86 if (len) 87 *len = need; 96 * @len: Length of buf in octets 99 int bignum_set_unsigned_bin(struct bignum *n, const u8 *buf, size_t len) argument 101 if (mp_read_unsigned_bin((mp_int *) n, (u8 *) buf, len) ! [all...] |
H A D | libtommath.c | 202 static void bn_reverse (unsigned char *s, int len) argument 208 iy = len - 1;
|
H A D | pkcs1.c | 138 size_t len; local 141 len = *plain_len; 142 if (crypto_rsa_exptmod(crypt, crypt_len, plain, &len, key, 0) < 0) 156 if (len < 3 + 8 + 16 /* min hash len */ || 170 while (pos < plain + len && *pos == 0xff) 180 if (pos + 16 /* min hash len */ >= plain + len || *pos != 0x00) { 186 len -= pos - plain; 189 os_memmove(plain, pos, len); [all...] |
H A D | pkcs5.c | 31 if (oid->len == 7 && 145 size_t len[2]; local 151 len[0] = os_strlen(passwd); 153 len[1] = params->salt_len; 154 if (md5_vector(2, addr, len, hash) < 0) 157 len[0] = MD5_MAC_LEN; 159 if (md5_vector(1, addr, len, hash) < 0)
|
H A D | pkcs8.c | 19 struct crypto_private_key * pkcs8_key_import(const u8 *buf, size_t len) argument 30 if (asn1_get_next(buf, len, &hdr) < 0 || 71 if (asn1_get_next(pos, len, &hdr) < 0 || 90 if (oid.len != 7 || 122 pkcs8_enc_key_import(const u8 *buf, size_t len, const char *passwd) argument 142 if (asn1_get_next(buf, len, &hdr) < 0 ||
|
H A D | rsa.c | 58 * @len: Key buffer length in bytes 62 crypto_rsa_import_public_key(const u8 *buf, size_t len) argument 87 if (asn1_get_next(buf, len, &hdr) < 0 || 145 * @len: Key buffer length in bytes 149 crypto_rsa_import_private_key(const u8 *buf, size_t len) argument 194 if (asn1_get_next(buf, len, &hdr) < 0 ||
|
H A D | tlsv1_client_read.c | 34 size_t left, len, i; local 63 len = WPA_GET_BE24(pos); 67 if (len > left) 72 wpa_hexdump(MSG_MSGDUMP, "TLSv1: ServerHello", pos, len); 73 end = pos + len; 218 size_t left, len, list_len, cert_len, idx; local 236 "(len=%lu)", (unsigned long) left); 242 len = WPA_GET_BE24(pos); 246 if (len > left) { 248 "length (len 412 count_bits(const u8 *val, size_t len) argument 436 tlsv1_process_diffie_hellman(struct tlsv1_client *conn, const u8 *buf, size_t len, tls_key_exchange key_exchange) argument 571 size_t left, len; local 662 size_t left, len; local 726 size_t left, len; local 854 size_t left, len, hlen; local 1014 tlsv1_client_process_handshake(struct tlsv1_client *conn, u8 ct, const u8 *buf, size_t *len, u8 **out_data, size_t *out_len) argument [all...] |
H A D | tlsv1_client_write.c | 26 size_t len = 0; local 34 len += 3 + cert->cert_len; 41 return len; 49 size_t len, i; local 64 len = 100 + conn->num_cipher_suites * 2 + conn->client_hello_ext_len; 65 hello = os_malloc(len); 68 end = hello + len;
|
H A D | tlsv1_common.c | 145 return 1 /* FIX: public key len > 512 bits */; 155 * @len: Length of the buffer 163 int tls_parse_cert(const u8 *buf, size_t len, struct crypto_public_key **pk) argument 168 buf, len); 170 *pk = crypto_public_key_from_cert(buf, len); 174 cert = x509_certificate_parse(buf, len); 239 size_t len) 242 crypto_hash_update(verify->md5_client, buf, len); 243 crypto_hash_update(verify->sha1_client, buf, len); 246 crypto_hash_update(verify->md5_server, buf, len); 238 tls_verify_hash_add(struct tls_verify_hash *verify, const u8 *buf, size_t len) argument 401 tls_verify_signature(u16 tls_version, struct crypto_public_key *pk, const u8 *data, size_t data_len, const u8 *pos, size_t len, u8 *alert) argument [all...] |
H A D | tlsv1_cred.c | 41 const u8 *buf, size_t len) 46 cert = x509_certificate_parse(buf, len); 85 static const u8 * search_tag(const char *tag, const u8 *buf, size_t len) argument 90 if (len < plen) 93 for (i = 0; i < len - plen; i++) { 103 const u8 *buf, size_t len) 109 pos = search_tag(pem_cert_begin, buf, len); 113 return tlsv1_add_cert_der(chain, buf, len); 121 end = search_tag(pem_cert_end, pos, buf + len - pos); 145 pos = search_tag(pem_cert_begin, end, buf + len 40 tlsv1_add_cert_der(struct x509_certificate **chain, const u8 *buf, size_t len) argument 102 tlsv1_add_cert(struct x509_certificate **chain, const u8 *buf, size_t len) argument 161 size_t len; local 224 tlsv1_set_key_pem(const u8 *key, size_t len) argument 263 tlsv1_set_key_enc_pem(const u8 *key, size_t len, const char *passwd) argument 291 tlsv1_set_key(struct tlsv1_credentials *cred, const u8 *key, size_t len, const char *passwd) argument 333 size_t len; local 352 tlsv1_set_dhparams_der(struct tlsv1_credentials *cred, const u8 *dh, size_t len) argument 430 tlsv1_set_dhparams_blob(struct tlsv1_credentials *cred, const u8 *buf, size_t len) argument 490 size_t len; local [all...] |
H A D | tlsv1_record.c | 235 size_t len = pos - cpayload; local 237 pad = (len + 1) % rl->iv_size; 285 u8 len[2], hash[100]; local 317 wpa_printf(MSG_DEBUG, "TLSv1: Record overflow (len=%lu)", 448 WPA_PUT_BE16(len, plen); 449 crypto_hash_update(hmac, len, 2); 476 wpa_printf(MSG_DEBUG, "TLSv1: Record overflow (len=%lu)",
|
H A D | tlsv1_server_read.c | 53 size_t left, len, i, j; local 84 len = WPA_GET_BE24(pos); 88 if (len > left) 93 wpa_hexdump(MSG_MSGDUMP, "TLSv1: ClientHello", pos, len); 94 end = pos + len; 295 size_t left, len, list_len, cert_len, idx; local 312 tlsv1_server_log(conn, "Too short Certificate message (len=%lu)", 320 len = WPA_GET_BE24(pos); 324 if (len > left) { 325 tlsv1_server_log(conn, "Unexpected Certificate message length (len 697 size_t left, len; local 774 size_t left, len; local 991 size_t left, len, hlen; local 1160 tlsv1_server_process_handshake(struct tlsv1_server *conn, u8 ct, const u8 *buf, size_t *len) argument [all...] |
H A D | tlsv1_server_write.c | 26 size_t len = 0; local 31 len += 3 + cert->cert_len; 38 return len;
|
H A D | x509v3.c | 181 const u8 *buf, size_t len, 194 if (asn1_get_next(buf, len, &hdr) < 0 || 205 if (end > buf + len) 219 static int x509_parse_public_key(const u8 *buf, size_t len, argument 234 end = buf + len; 292 static int x509_parse_name(const u8 *buf, size_t len, struct x509_name *name, argument 312 if (asn1_get_next(buf, len, &hdr) < 0 || 322 if (pos + hdr.length > buf + len) 378 if (oid.len == 4 && 407 } else if (oid.len 180 x509_parse_algorithm_identifier( const u8 *buf, size_t len, struct x509_algorithm_identifier *id, const u8 **next) argument 499 x509_name_string(struct x509_name *name, char *buf, size_t len) argument 540 x509_parse_time(const u8 *buf, size_t len, u8 asn1_tag, os_time_t *val) argument 650 x509_parse_validity(const u8 *buf, size_t len, struct x509_certificate *cert, const u8 **next) argument 724 x509_parse_ext_key_usage(struct x509_certificate *cert, const u8 *pos, size_t len) argument 761 x509_parse_ext_basic_constraints(struct x509_certificate *cert, const u8 *pos, size_t len) argument 846 x509_parse_alt_name_rfc8222(struct x509_name *name, const u8 *pos, size_t len) argument 868 x509_parse_alt_name_dns(struct x509_name *name, const u8 *pos, size_t len) argument 890 x509_parse_alt_name_uri(struct x509_name *name, const u8 *pos, size_t len) argument 914 x509_parse_alt_name_ip(struct x509_name *name, const u8 *pos, size_t len) argument 929 x509_parse_alt_name_rid(struct x509_name *name, const u8 *pos, size_t len) argument 945 x509_parse_ext_alt_name(struct x509_name *name, const u8 *pos, size_t len) argument 1023 x509_parse_ext_subject_alt_name(struct x509_certificate *cert, const u8 *pos, size_t len) argument 1050 x509_parse_ext_issuer_alt_name(struct x509_certificate *cert, const u8 *pos, size_t len) argument 1077 x509_parse_extension_data(struct x509_certificate *cert, struct asn1_oid *oid, const u8 *pos, size_t len) argument 1106 x509_parse_extension(struct x509_certificate *cert, const u8 *pos, size_t len, const u8 **next) argument 1188 x509_parse_extensions(struct x509_certificate *cert, const u8 *pos, size_t len) argument 1218 x509_parse_tbs_certificate(const u8 *buf, size_t len, struct x509_certificate *cert, const u8 **next) argument 1476 x509_certificate_parse(const u8 *buf, size_t len) argument [all...] |
/external/wpa_supplicant_8/hostapd/src/utils/ |
H A D | base64.c | 20 * @len: Length of the data to be encoded 29 unsigned char * base64_encode(const unsigned char *src, size_t len, argument 37 olen = len * 4 / 3 + 4; /* 3-byte blocks to 4-byte */ 40 if (olen < len) 46 end = src + len; 90 * @len: Length of the data to be decoded 97 unsigned char * base64_decode(const unsigned char *src, size_t len, argument 110 for (i = 0; i < len; i++) { 124 for (i = 0; i < len; i++) {
|
H A D | common.c | 125 * @len: Length of the text to convert in bytes (of buf); hex will be double 129 int hexstr2bin(const char *hex, u8 *buf, size_t len) argument 136 for (i = 0; i < len; i++) { 150 * @len: Length of the counter in bytes 156 void inc_byte_array(u8 *counter, size_t len) argument 158 int pos = len - 1; 188 size_t len, int uppercase) 195 for (i = 0; i < len; i++) { 211 * @buf_size: Maximum buffer size in bytes (should be at least 2 * len + 1) 213 * @len 187 _wpa_snprintf_hex(char *buf, size_t buf_size, const u8 *data, size_t len, int uppercase) argument 216 wpa_snprintf_hex(char *buf, size_t buf_size, const u8 *data, size_t len) argument 230 wpa_snprintf_hex_uppercase(char *buf, size_t buf_size, const u8 *data, size_t len) argument 347 printf_encode(char *txt, size_t maxlen, const u8 *data, size_t len) argument 399 size_t len = 0; local 512 wpa_config_parse_string(const char *value, size_t *len) argument 569 is_hex(const u8 *data, size_t len) argument 600 size_t len = 0; local 628 dup_binstr(const void *src, size_t len) argument 835 size_t len = os_strlen(str); local 842 bin_clear_free(void *bin, size_t len) argument [all...] |
H A D | edit.c | 179 size_t len, count = 0; local 205 len = os_strlen(str); 206 h = os_zalloc(sizeof(*h) + len); 210 os_strlcpy(h->str, str, len + 1); 376 static int filter_strings(char **c, char *str, size_t len) argument 381 if (os_strncasecmp(c[j], str, len) == 0) { 399 int len = 0; local 400 while (a[len] && a[len] == b[len]) 408 int len, i; local 429 int i, len, count; local 870 size_t len = os_strlen(search_buf); local 939 size_t len; local 959 size_t len; local [all...] |
H A D | edit_readline.c | 42 static size_t len = 0; local 51 len = os_strlen(text); 54 if (strncmp(pending_completions[pos], text, len) == 0)
|
H A D | ext_password.c | 85 struct wpabuf * ext_password_alloc(size_t len) argument 89 buf = wpabuf_alloc(len);
|
H A D | http-utils.h | 17 size_t len; member in struct:http_othername
|
H A D | http_curl.c | 83 const char *buf, size_t len) 88 for (i = 0; i < len; i++) { 91 wpa_hexdump_ascii(MSG_MSGDUMP, title, buf, len); 96 txt = os_malloc(len + 1); 99 os_memcpy(txt, buf, len); 100 txt[len] = '\0'; 101 while (len > 0) { 102 len--; 103 if (txt[len] == '\n' || txt[len] 82 debug_dump(struct http_ctx *ctx, const char *title, const char *buf, size_t len) argument 113 curl_cb_debug(CURL *curl, curl_infotype info, char *buf, size_t len, void *userdata) argument 440 int res, len; local 1037 int len, status, reason; local [all...] |
H A D | os_internal.c | 122 int os_get_random(unsigned char *buf, size_t len) argument 133 rc = fread(buf, 1, len, f); 136 return rc != len ? -1 : 0; 149 size_t len = 128, cwd_len, rel_len, ret_len; local 155 buf = os_malloc(len); 158 cwd = getcwd(buf, len); 164 len *= 2; 213 char * os_readfile(const char *name, size_t *len) argument 223 *len = ftell(f); 226 buf = os_malloc(*len); 327 size_t len; local 466 os_memcmp_const(const void *a, const void *b, size_t len) argument 482 size_t len = os_strlen(needle); local [all...] |
H A D | os_none.c | 58 int os_get_random(unsigned char *buf, size_t len) argument 99 char * os_readfile(const char *name, size_t *len) argument 221 int os_memcmp_const(const void *a, const void *b, size_t len) argument
|
H A D | os_unix.c | 37 size_t len; member in struct:os_alloc_trace 224 int os_get_random(unsigned char *buf, size_t len) argument 235 rc = fread(buf, 1, len, f); 238 return rc != len ? -1 : 0; 251 size_t len = 128, cwd_len, rel_len, ret_len; local 261 buf = os_malloc(len); 264 cwd = getcwd(buf, len); 270 len *= 2; 271 if (len > 2000) 274 buf[len 373 os_readfile(const char *name, size_t *len) argument 454 os_memcmp_const(const void *a, const void *b, size_t len) argument 546 size_t len; local [all...] |