Merge "[wpa_supplicant] Read certificates from keystore in DER format" into sc-dev
diff --git a/src/utils/common.c b/src/utils/common.c
index 20f1c6c..2c12751 100644
--- a/src/utils/common.c
+++ b/src/utils/common.c
@@ -720,20 +720,6 @@
}
-int has_non_nvt_ascii_char(const u8 *data, size_t len)
-{
- size_t i;
-
- for (i = 0; i < len; i++) {
- if (data[i] < 7
- || (13 < data[i] && data[i] < 32)
- || data[i] == 127)
- return 1;
- }
- return 0;
-}
-
-
int has_newline(const char *str)
{
while (*str) {
diff --git a/src/utils/common.h b/src/utils/common.h
index 660951e..45f72bb 100644
--- a/src/utils/common.h
+++ b/src/utils/common.h
@@ -509,7 +509,6 @@
char * wpa_config_parse_string(const char *value, size_t *len);
int is_hex(const u8 *data, size_t len);
int has_ctrl_char(const u8 *data, size_t len);
-int has_non_nvt_ascii_char(const u8 *data, size_t len);
int has_newline(const char *str);
size_t merge_byte_arrays(u8 *res, size_t res_len,
const u8 *src1, size_t src1_len,
diff --git a/wpa_supplicant/hidl/1.4/sta_network.cpp b/wpa_supplicant/hidl/1.4/sta_network.cpp
index ac3e974..ee132ac 100644
--- a/wpa_supplicant/hidl/1.4/sta_network.cpp
+++ b/wpa_supplicant/hidl/1.4/sta_network.cpp
@@ -2412,7 +2412,7 @@
PSK_PASSPHRASE_MAX_LEN_IN_BYTES)) {
return 1;
}
- if (has_non_nvt_ascii_char((u8 *)psk.c_str(), psk.size())) {
+ if (has_ctrl_char((u8 *)psk.c_str(), psk.size())) {
return 1;
}
return 0;