From cb016c14432d066e0ead2ec1c2ee96f7bc850492 Mon Sep 17 00:00:00 2001 From: MyeongSeong Seo Date: Fri, 19 Apr 2013 10:13:45 +0900 Subject: [PATCH] Apply the secure log in exception log Change-Id: I2ce3266fe2a646712e052b0aa1e3b1013014b9bb Signed-off-by: MyeongSeong Seo --- src/http/FNetHttp_HttpCookieStorageManagerImpl.cpp | 22 +++++++++++----------- src/http/FNetHttp_HttpTransactionImpl.cpp | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/http/FNetHttp_HttpCookieStorageManagerImpl.cpp b/src/http/FNetHttp_HttpCookieStorageManagerImpl.cpp index 1be285a..ba1053c 100644 --- a/src/http/FNetHttp_HttpCookieStorageManagerImpl.cpp +++ b/src/http/FNetHttp_HttpCookieStorageManagerImpl.cpp @@ -71,7 +71,7 @@ _HttpCookieStorageManagerImpl::GetCookies(const Tizen::Base::String& url, Tizen: { result r = E_SUCCESS; - SysTryReturnResult(NID_NET_HTTP, !url.IsEmpty(), + SysSecureTryReturnResult(NID_NET_HTTP, !url.IsEmpty(), E_INVALID_ARG, "The input argument is empty(%ls).", url.GetPointer()); Mutex* pHttpMutex = null; @@ -94,7 +94,7 @@ _HttpCookieStorageManagerImpl::GetCookies(const Tizen::Base::String& url, Tizen: r = uri.SetUri(hostName); r = TransExceptionsExclusive(r, E_INVALID_ARG, E_OUT_OF_MEMORY); - SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, + SysSecureTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "Failed to check the url(%ls).", url.GetPointer()); hostName = uri.GetHost(); @@ -111,7 +111,7 @@ _HttpCookieStorageManagerImpl::GetCookies(const Tizen::Base::String& url, Tizen: } SysSecureLog(NID_NET_HTTP, "The domain name of cookie is %ls.", domainName.GetPointer()); - SysTryReturnResult(NID_NET_HTTP, !domainName.IsEmpty(), + SysSecureTryReturnResult(NID_NET_HTTP, !domainName.IsEmpty(), E_INVALID_ARG, "The input argument is invalid(%ls).", url.GetPointer()); String filePath = _HttpUtility::GetCookieFilePath(); @@ -132,7 +132,7 @@ _HttpCookieStorageManagerImpl::GetCookies(const Tizen::Base::String& url, Tizen: String cookieLine; r = cookieFile.Construct(filePath, L"r", false); r = TransExceptionsExclusive(r, E_INVALID_STATE, E_OUT_OF_MEMORY); - SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, + SysSecureTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "Failed to construct the cookie path(%ls).", filePath.GetPointer()); while (cookieFile.Read(cookieLine) == E_SUCCESS) @@ -204,7 +204,7 @@ _HttpCookieStorageManagerImpl::RemoveCookies(const Tizen::Base::String& url) { result r = E_SUCCESS; - SysTryReturnResult(NID_NET_HTTP, !url.IsEmpty(), + SysSecureTryReturnResult(NID_NET_HTTP, !url.IsEmpty(), E_INVALID_ARG, "The input argument is empty(%ls).", url.GetPointer()); Mutex* pHttpMutex = null; @@ -228,7 +228,7 @@ _HttpCookieStorageManagerImpl::RemoveCookies(const Tizen::Base::String& url) Uri uri; r = uri.SetUri(hostName); r = TransExceptionsExclusive(r, E_INVALID_ARG, E_OUT_OF_MEMORY); - SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, + SysSecureTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "Failed to check the url(%ls).", url.GetPointer()); hostName = uri.GetHost(); @@ -245,7 +245,7 @@ _HttpCookieStorageManagerImpl::RemoveCookies(const Tizen::Base::String& url) } SysSecureLog(NID_NET_HTTP, " The domain name of url is %ls.", domainName.GetPointer()); - SysTryReturnResult(NID_NET_HTTP, !domainName.IsEmpty(), + SysSecureTryReturnResult(NID_NET_HTTP, !domainName.IsEmpty(), E_INVALID_ARG, "The input argument is invalid(%ls).", url.GetPointer()); String filePath = _HttpUtility::GetCookieFilePath(); @@ -270,7 +270,7 @@ _HttpCookieStorageManagerImpl::RemoveCookies(const Tizen::Base::String& url) r = pCookieFile->Construct(filePath, L"r", false); r = TransExceptionsExclusive(r, E_INVALID_STATE, E_OUT_OF_MEMORY); - SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, + SysSecureTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "Failed to construct the cookie path(%ls).", filePath.GetPointer()); while (pCookieFile->Read(cookieLine) == E_SUCCESS) @@ -337,7 +337,7 @@ _HttpCookieStorageManagerImpl::RemoveCookies(const Tizen::Base::String& url) r = pCookieFile->Construct(filePath, L"w", true); r = TransExceptionsExclusive(r, E_INVALID_STATE, E_OUT_OF_MEMORY); - SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, + SysSecureTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "Failed to construct the cookie path(%ls).", filePath.GetPointer()); for (int i = 0; i < countOfCookie; i++) @@ -349,7 +349,7 @@ _HttpCookieStorageManagerImpl::RemoveCookies(const Tizen::Base::String& url) r = pCookieFile->Write(*pCookieLine); r = TransExceptionsExclusive(r, E_SYSTEM, E_OUT_OF_MEMORY); - SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, + SysSecureTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "Failed to write the cookie file.(%ls).", filePath.GetPointer()); } @@ -391,7 +391,7 @@ _HttpCookieStorageManagerImpl::RemoveAllCookies() { r = File::Remove(filePath); r = TransExceptionsExclusive(r, E_INVALID_STATE, E_OUT_OF_MEMORY); - SysTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, + SysSecureTryReturnResult(NID_NET_HTTP, r == E_SUCCESS, r, "Failed to remove the cookie file[%ls].", filePath.GetPointer()); SysSecureLog(NID_NET_HTTP, "The cookie file(%ls) was removed.", filePath.GetPointer()); diff --git a/src/http/FNetHttp_HttpTransactionImpl.cpp b/src/http/FNetHttp_HttpTransactionImpl.cpp index 5d33c2b..994da3e 100755 --- a/src/http/FNetHttp_HttpTransactionImpl.cpp +++ b/src/http/FNetHttp_HttpTransactionImpl.cpp @@ -538,7 +538,7 @@ _HttpTransactionImpl::Submit(void) compareHost = _HttpUtility::CompareHost(hostAddress, url); r = GetLastResult(); r = TransExceptionsExclusive(r, E_INVALID_ARG, E_OUT_OF_MEMORY); - SysTryReturnResult(NID_NET_HTTP, compareHost, + SysSecureTryReturnResult(NID_NET_HTTP, compareHost, r, "The host address(%ls) of HttpSession is different with url(%ls).", hostAddress.GetPointer(), url.GetPointer()); } -- 2.7.4