_X509CertificateStoreImpl::~_X509CertificateStoreImpl(void)
{
- __pCertServiceProxy->CloseCertificateStore(__certType);
+ if ((__certType > _CERT_TYPE_NOT_BOUNDED) && (__certType < _CERT_TYPE_MAX))
+ {
+ __pCertServiceProxy->CloseCertificateStore(__certType);
+ }
}
result
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)
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));
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