sync up with tizen_4.0 branch for coding rules 77/157777/4 submit/tizen/20171101.110420
authorjkjo92 <jkjo92@samsung.com>
Thu, 26 Oct 2017 07:42:27 +0000 (16:42 +0900)
committerjkjo92 <jkjo92@samsung.com>
Tue, 31 Oct 2017 08:02:02 +0000 (17:02 +0900)
Change-Id: I2172b7874644bceddf1acd614eba483053ec029c
Signed-off-by: jkjo92 <jkjo92@samsung.com>
common/cryptoutil/src/AsmCrypto.cpp
common/datatypes/auth/AuthnrTypes.h
common/datatypes/inc/AsmRegResponse.h [changed mode: 0644->0755]
common/datatypes/src/AsmRequest.cpp
common/uafv1tlvutil/src/AttBasicSurrTlvEncoder.cpp [changed mode: 0644->0755]
common/uafv1tlvutil/src/TlvEncoderFactory.cpp [changed mode: 0644->0755]
common/uiutil/src/AcUiAdaptor.cpp
common/uiutil/src/AuthUiFactory.cpp [changed mode: 0644->0755]
server/auth_discovery/src/AuthManager.cpp
server/ops/inc/RegisterOp.h
silent_auth/silent_auth_entry.cpp

index 8f35618..8c73676 100755 (executable)
@@ -98,14 +98,12 @@ __der_cert_new(unsigned char *raw_cert, size_t cert_size, _der_cert_s **ppcert)
 
        _der_cert_s *pcert;
 
-       if (raw_cert == NULL || cert_size <= 0 || ppcert == NULL) {
+       if (raw_cert == NULL || cert_size <= 0 || ppcert == NULL)
                return -1;
-       }
 
        pcert = static_cast<_der_cert_s*>(malloc(sizeof(_der_cert_s)));
-       if (pcert == NULL) {
+       if (pcert == NULL)
                return -1;
-       }
 
        pcert->raw_cert = reinterpret_cast<unsigned char*>(malloc(cert_size));
        if (pcert->raw_cert == NULL) {
@@ -127,9 +125,8 @@ __load_cert_from_x509(X509 *xCert, _der_cert_s **cert)
 {
         _INFO("__load_cert_from_x509 start");
 
-       if (xCert == NULL) {
-       return -1;
-       }
+       if (xCert == NULL)
+               return -1;
 
        BIO *bcert = BIO_new(BIO_s_mem());
 
@@ -323,11 +320,10 @@ AsmCrypto::genRandom(unsigned char *random, int num)
 {
        int ret;
        ret = RAND_bytes(random, num);
-       if (ret != -1)  {
+       if (ret != -1)
                return 0;
-       } else {
+       else
                return -1;
-       }
 }
 
 bool
@@ -737,7 +733,6 @@ AsmCrypto::digestSignRSAPSSMGF1(const char *message, int m_len,
                                                                  const char *privKeyFile, const char *pwd,
                                                                  unsigned char **signature, int *sig_len)
 {
-
        OpenSSL_add_all_algorithms();
 
        FILE *fp;
@@ -962,7 +957,6 @@ AsmCrypto::onPkgList(pkgmgrinfo_pkginfo_h handle, void *user_data)
 
        int ret = pkgmgrinfo_pkginfo_get_pkgid(handle, &pkgid);
        if (ret != PMINFO_R_OK) {
-
                _ERR("pkgmgrinfo_pkginfo_get_pkgid failed [%d]", ret);
                pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
                return 0;
@@ -1144,7 +1138,6 @@ AsmCrypto::fidoSignWithKey(const unsigned char *msg, int msg_len,
 
        *sig_len = sig_len_loc;
        return sig;
-
 }
 
 unsigned char*
index dedb35d..ddd8ac6 100755 (executable)
@@ -222,7 +222,6 @@ typedef struct _GetAuthInfoResp {
        char *title;
        char *description;
        char *icon;
-
 } GetAuthInfoResp;
 
 /*
@@ -242,7 +241,6 @@ typedef struct _RegisterReq {
  * https://fidoalliance.org/specs/fido-uaf-v1.0-ps-20141208/fido-uaf-authnr-cmds-v1.0-ps-20141208.html#command-structure-2
  */
 typedef struct _AuthenticateReq {
-
        int authIdx;
        char *appId;
        Buffer *fch;
@@ -337,7 +335,6 @@ typedef struct _DeregResp {
 
 
 typedef struct _AuthnrMetaData {
-
        int authenticatorType;
        int maxKeyHandles;
        int userVerification;
@@ -351,7 +348,6 @@ typedef struct _AuthnrMetaData {
  * https://fidoalliance.org/specs/fido-uaf-v1.0-ps-20141208/fido-uaf-asm-api-v1.0-ps-20141208.html#dictionary-authenticatorinfo-members
  */
 typedef struct __DisplayTc {
-
        int width;
        int height;
        int bitDepth;
old mode 100644 (file)
new mode 100755 (executable)
index 8d58f88..4f0aec6
@@ -25,7 +25,6 @@
  * https://fidoalliance.org/specs/fido-uaf-v1.0-ps-20141208/fido-uaf-asm-api-v1.0-ps-20141208.html#dictionary-registerout-members
  */
 class AsmRegResponse {
-
 public:
        ~AsmRegResponse(void);
 
@@ -40,7 +39,6 @@ private:
        std::string __assertionScheme;
 
        friend class RegisterState;
-
 };
 
 #endif //__ASM_REG_RESP_H__
index 4b6ee64..819d3ff 100755 (executable)
@@ -42,7 +42,6 @@ AsmRequest::~AsmRequest(void)
                        delete static_cast<AsmDeregRequest*>(__args);
                }
        }
-
 }
 
 AsmVersion *
old mode 100644 (file)
new mode 100755 (executable)
index 7b37eaf..0a87420
 #include "AuthnrTypes.h"
 #include "stdio.h"
 
-AttBasicSurrTlvEncoder::AttBasicSurrTlvEncoder(void)
-{
-
-}
+AttBasicSurrTlvEncoder::AttBasicSurrTlvEncoder(void) {}
 
 Buffer *
 AttBasicSurrTlvEncoder::encode(const void *authData)
@@ -83,9 +80,7 @@ AttBasicSurrTlvEncoder::decode(const unsigned char *rawData)
        bool foundMember = false;
 
        while(1) {
-
                switch(child->tag) {
-
                        case TAG_SIGNATURE:
                                getAttBasicSurrInfo->sig = (Buffer*)__buffTlvEncoder.decode(rawData + rawIter);
                                foundMember = true;
old mode 100644 (file)
new mode 100755 (executable)
index 1a4ad83..98d39a5
@@ -42,10 +42,7 @@ TlvEncoderFactory::getTlvEncoderById(int id)
        return __encoderTable->find(id)->second;
 }
 
-TlvEncoderFactory::TlvEncoderFactory(void)
-{
-
-}
+TlvEncoderFactory::TlvEncoderFactory(void) {}
 
 std::map<int, ITlvEncoder*>*
 TlvEncoderFactory::loadAllEncoders(void)
index 8cabeae..7a3f653 100755 (executable)
@@ -182,7 +182,6 @@ AcUiAdaptor::OnAccountResponseFromUi(const char *sessionData, int result, const
        }
 
        g_main_loop_quit(AcUiAdaptor::getInstance()->__mainLoop);
-
 }
 
 AcUiAdaptor::AcUiAdaptor(void)
old mode 100644 (file)
new mode 100755 (executable)
index 354ee1c..779ff2a
@@ -24,7 +24,6 @@ AuthUiFactory::getAuthUiAdaptor(auth_ui_type_e type)
 {
        _BEGIN;
        switch (type) {
-
        case AUTH_UI_TYPE_PIN:
                _INFO("AuthUiFactory::getAuthUiAdaptor:: PinAuthUiAdaptor");
                return PinAuthUiAdaptor::getInstance();
index fcd9c99..934271d 100755 (executable)
@@ -80,7 +80,6 @@ AuthManager::appendToFullStubList(std::vector<IAuthStub*> *origList,
 
        std::vector<IAuthStub*>::iterator stIter = stubList->begin();
        for (; stIter != stubList->end(); ++stIter) {
-
                IAuthStub *stub = (IAuthStub*)(*stIter);
                if (stub != NULL) {
                        origList->push_back(stub);
@@ -98,7 +97,6 @@ AuthManager::getAuthStubList(auth_type_e type)
 
        std::vector<IADProvider*>::iterator adIter = __providerList.begin();
        for (; adIter != __providerList.end(); ++adIter) {
-
                IADProvider *pro = (IADProvider*)(*adIter);
 
                if ((type == AUTH_TYPE_ALL) || (pro->getType() == type)) {
index 0486c1c..7470149 100755 (executable)
@@ -23,7 +23,6 @@
 #include <vector>
 
 class RegisterOp:public AsmOp {
-
 public:
        ~RegisterOp(void);
        virtual char* execute(void);
index 9336f4e..b6b6ed6 100755 (executable)
@@ -517,7 +517,6 @@ processAuthenticate(unsigned char *assert_req)
 
                /*tcHash when authMode = 0x02 i.e transaction content is not empty*/
                if (getAuthReqInfo->tc != NULL) {
-
                        unsigned char tcHash[32];
                        getAuthRespInfo->authAssertion->sigData->assrtInfo->authMode = 0x02;
                        int ret = AsmCrypto::genHash256(getAuthReqInfo->tc, strlen(getAuthReqInfo->tc), tcHash);
@@ -1248,7 +1247,6 @@ fido_auth_plugin_verify(const char *cmd, const char *fch, char **verif_token)
                                }
                        }
                }
-
        }
        _ERR("Out of while!!");
        return 0;