Removed un-necessary error message
authorBhanu Singh Rao <bhanu.singh@samsung.com>
Tue, 2 Apr 2013 06:44:13 +0000 (12:14 +0530)
committerso.yu <so.yu@samsung.com>
Tue, 2 Apr 2013 11:35:18 +0000 (20:35 +0900)
Change-Id: Ib16957478d93d0c4193dce24b4b26d15d826b300
Signed-off-by: Bhanu Singh Rao <bhanu.singh@samsung.com>
src/security/cert/FSecCert_X509CertificateStoreImpl.cpp [changed mode: 0755->0644]
src/security/cert/FSecCert_X509CertificateStoreImpl.h [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 353f52f..573165f
@@ -50,7 +50,10 @@ _X509CertificateStoreImpl::_X509CertificateStoreImpl(void)
 
 _X509CertificateStoreImpl::~_X509CertificateStoreImpl(void)
 {
-       __pCertServiceProxy->CloseCertificateStore(__certType);
+       if ((__certType > _CERT_TYPE_NOT_BOUNDED) && (__certType < _CERT_TYPE_MAX))
+       {
+               __pCertServiceProxy->CloseCertificateStore(__certType);
+       }
 }
 
 result
@@ -72,7 +75,10 @@ _X509CertificateStoreImpl::SetCertificateSelector(const Tizen::Security::Cert::I
 
        CertificateType certType = (const_cast< ICertificateSelector& >(selector)).GetType();
 
-       __pCertServiceProxy->CloseCertificateStore(__certType);
+       if ((__certType > _CERT_TYPE_NOT_BOUNDED) && (__certType < _CERT_TYPE_MAX))
+       {
+               __pCertServiceProxy->CloseCertificateStore(__certType);
+       }
        __curPos = 0;
 
        switch (certType)
@@ -380,18 +386,19 @@ _X509CertificateStoreImpl::GetInstance(const X509CertificateStore& x509Certifica
        return x509CertificateStore.__pX509CertificateStoreImpl;
 }
 
-int InsertPkcs12Content(const char* pPath, const char* pPassword)
+int
+InsertPkcs12Content(const char* pPath, const char* pPassword)
 {
        result r = E_SUCCESS;
        _X509CertificateStoreImpl store;
        String filePath;
        String password;
 
-       filePath.SetCapacity(strlen(pPath)+1);
-       password.SetCapacity(strlen(pPassword)+1);
+       filePath.SetCapacity(strlen(pPath) + 1);
+       password.SetCapacity(strlen(pPassword) + 1);
 
-       filePath.Format(strlen(pPath)+1, L"%s", pPath);
-       password.Format(strlen(pPassword)+1, L"%s", pPassword);
+       filePath.Format(strlen(pPath) + 1, L"%s", pPath);
+       password.Format(strlen(pPassword) + 1, L"%s", pPassword);
 
        r = store.InsertPkcs12(filePath, password, false);
        SysTryReturn(NID_SEC_CERT, !IsFailed(r), -1, r, "[%s] Failed to remove certificate.", GetErrorMessage(r));
old mode 100755 (executable)
new mode 100644 (file)
index a686de8..237b199
@@ -204,8 +204,7 @@ private:
        friend class X509CertificateStore;
 }; //X509CertificateStoreImpl
 
-extern "C" _OSP_EXPORT_ int  InsertPkcs12Content(const char* pPath, const char* pPassword);
-//extern "C" _OSP_EXPORT_ int  kkkkk(const char* pPath, const char* pPassword);
+extern "C" _OSP_EXPORT_ int InsertPkcs12Content(const char* pPath, const char* pPassword);
 
 } } } //Tizen::Security::Cert