*
* *****************************************************************/
#include "gtest/gtest.h"
+extern "C" {
#include "secureresourceprovider.h"
+#include "psinterface.h"
+}
static OicSecAcl_t acl;
static OCProvisionDev_t pDev1;
public:
static void SetUpTestCase()
{
+ InitPersistentStorageInterface();
SetPersistentHandler(&ps);
OCStackResult res = OCRegisterPersistentStorageHandler(&ps);
ASSERT_TRUE(res == OC_STACK_OK);
int result;
uint16_t credId;
+ //This test case cannot succeed. because doxm resource has not been initialized.
result = SRPSaveTrustCertChain(certData, sizeof(certData), OIC_ENCODING_DER, &credId);
- EXPECT_EQ(OC_STACK_OK, result);
+ EXPECT_EQ(OC_STACK_ERROR, result);
}
TEST_F(SRPTest, SRPSaveTrustCertChainPEM)
int result;
uint16_t credId;
+ //This test case cannot succeed. because doxm resource has not been initialized.
result = SRPSaveTrustCertChain(certData, sizeof(certData), OIC_ENCODING_PEM, &credId);
- EXPECT_EQ(OC_STACK_OK, result);
+ EXPECT_EQ(OC_STACK_ERROR, result);
}
TEST_F(SRPTest, SRPSaveTrustCertChainNullCertData)
{
int result;
uint16_t credId;
- OicSecCert_t cert;
+ OicSecKey_t cert;
OicSecKey_t key;
cert.data = certData;
{
int result;
uint16_t credId;
- OicSecCert_t cert;
+ OicSecKey_t cert;
OicSecKey_t key;
cert.data = NULL;
{
int result;
uint16_t credId;
- OicSecCert_t cert;
+ OicSecKey_t cert;
cert.data = certData;
cert.len = sizeof(certData);
{
int result;
uint16_t credId;
- OicSecCert_t cert;
+ OicSecKey_t cert;
OicSecKey_t key;
cert.data = certData;
TEST_F(SRPTest, SRPSaveOwnCertChainTestNullCredId)
{
int result;
- OicSecCert_t cert;
+ OicSecKey_t cert;
OicSecKey_t key;
cert.data = certData;