From: sourav bhuwalka Date: Mon, 14 Jan 2019 13:34:49 +0000 (+0530) Subject: Changing the length of access token X-Git-Tag: accepted/tizen/5.0/unified/20190123.074155^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e376c1976b9044389f5d01907c975a2e1d65e606;p=platform%2Fupstream%2Fiotivity.git Changing the length of access token Access token property of the cloud needs to be changed from 256bytes to 1kb https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/392 (cherry picked from commit 89f95a89892e44f893c3d395bcd3cde142efb0c0) Change-Id: I57d5b1caeeca75f526df9e51d78d80fa75d6aae2 Signed-off-by: DoHyun Pyun --- diff --git a/service/easy-setup/enrollee/inc/ESEnrolleeCommon.h b/service/easy-setup/enrollee/inc/ESEnrolleeCommon.h index 91811a5..08c2bbe 100755 --- a/service/easy-setup/enrollee/inc/ESEnrolleeCommon.h +++ b/service/easy-setup/enrollee/inc/ESEnrolleeCommon.h @@ -65,7 +65,7 @@ typedef struct typedef struct { char authCode[OIC_STRING_MAX_VALUE]; /**< Auth code issued by OAuth2.0-compatible account server **/ - char accessToken[OIC_STRING_MAX_VALUE]; /**< Access token resolved with an auth code **/ + char accessToken[OIC_STRING_ACCESS_TOKEN_MAX_VALUE]; /**< Access token resolved with an auth code **/ OAUTH_TOKENTYPE accessTokenType; /**< Access token type **/ char authProvider[OIC_STRING_MAX_VALUE]; /**< Auth provider ID **/ char ciServer[OIC_STRING_MAX_VALUE]; /**< Cloud interface server URL which an Enrollee is going to registered **/ diff --git a/service/easy-setup/enrollee/src/resourcehandler.c b/service/easy-setup/enrollee/src/resourcehandler.c index bebd813..1156390 100755 --- a/service/easy-setup/enrollee/src/resourcehandler.c +++ b/service/easy-setup/enrollee/src/resourcehandler.c @@ -442,7 +442,7 @@ void updateCoapCloudConfResource(OCRepPayload* input) } memset(cloudData->authCode, 0, OIC_STRING_MAX_VALUE); - memset(cloudData->accessToken, 0, OIC_STRING_MAX_VALUE); + memset(cloudData->accessToken, 0, OIC_STRING_ACCESS_TOKEN_MAX_VALUE); g_ESCoapCloudConfResource.accessTokenType = NONE_OAUTH_TOKENTYPE; memset(cloudData->authProvider, 0, OIC_STRING_MAX_VALUE); memset(cloudData->ciServer, 0, OIC_STRING_MAX_VALUE); diff --git a/service/easy-setup/enrollee/src/resourcehandler.h b/service/easy-setup/enrollee/src/resourcehandler.h index 3696171..aa5aeaf 100755 --- a/service/easy-setup/enrollee/src/resourcehandler.h +++ b/service/easy-setup/enrollee/src/resourcehandler.h @@ -68,7 +68,7 @@ typedef struct { OCResourceHandle handle; char authCode[OIC_STRING_MAX_VALUE]; - char accessToken[OIC_STRING_MAX_VALUE]; + char accessToken[OIC_STRING_ACCESS_TOKEN_MAX_VALUE]; OAUTH_TOKENTYPE accessTokenType; char authProvider[OIC_STRING_MAX_VALUE]; char ciServer[OIC_STRING_MAX_VALUE]; diff --git a/service/easy-setup/inc/escommon.h b/service/easy-setup/inc/escommon.h index 94c5df1..d2e16f6 100644 --- a/service/easy-setup/inc/escommon.h +++ b/service/easy-setup/inc/escommon.h @@ -36,10 +36,11 @@ extern "C" -#define OIC_STRING_MAX_VALUE 256 -#define MAX_WEBLINKLEN 3 -#define NUM_WIFIMODE 10 -#define NUM_CONNECT_TYPE 3 +#define OIC_STRING_MAX_VALUE 256 +#define OIC_STRING_ACCESS_TOKEN_MAX_VALUE 1024 +#define MAX_WEBLINKLEN 3 +#define NUM_WIFIMODE 10 +#define NUM_CONNECT_TYPE 3 /** * Attributes used to form a proper easysetup conforming JSON message.