aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/tncc.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-11-27 13:55:33 (GMT)
committerJouni Malinen <j@w1.fi>2019-11-28 14:39:09 (GMT)
commit8e5e36a184a69db0ea5418eeffa0077ded00d50e (patch)
treec20af6f9c87d1e8614eb315226e8cb08d64f688d /src/eap_peer/tncc.c
parentb22608423bb6dd4b484f22574aaa673c7fa702b0 (diff)
downloadhostap-8e5e36a184a69db0ea5418eeffa0077ded00d50e.zip
hostap-8e5e36a184a69db0ea5418eeffa0077ded00d50e.tar.gz
hostap-8e5e36a184a69db0ea5418eeffa0077ded00d50e.tar.bz2
Clean up base64_{encode,decode} pointer types
Allow any pointer to be used as source for encoding and use char * as the return value from encoding and input value for decoding to reduce number of type casts needed in the callers. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'src/eap_peer/tncc.c')
-rw-r--r--src/eap_peer/tncc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/eap_peer/tncc.c b/src/eap_peer/tncc.c
index a9bafe2..c460980 100644
--- a/src/eap_peer/tncc.c
+++ b/src/eap_peer/tncc.c
@@ -144,7 +144,7 @@ static TNC_Result TNC_TNCC_SendMessage(
TNC_MessageType messageType)
{
struct tnc_if_imc *imc;
- unsigned char *b64;
+ char *b64;
size_t b64len;
wpa_printf(MSG_DEBUG, "TNC: TNC_TNCC_SendMessage(imcID=%lu "
@@ -629,8 +629,7 @@ static unsigned char * tncc_get_base64(char *start, size_t *decoded_len)
return NULL;
*pos2 = '\0';
- decoded = base64_decode((unsigned char *) pos, os_strlen(pos),
- decoded_len);
+ decoded = base64_decode(pos, os_strlen(pos), decoded_len);
*pos2 = '<';
if (decoded == NULL) {
wpa_printf(MSG_DEBUG, "TNC: Failed to decode Base64 data");