Refactor code for uploading different types of certificates

Introduced new Certificate class that caters for a certificate
upload and certificate replace.

As part of refactoring moved the validation of certificate
from Manager class to Certificate class so that the logic
can be used both for replacing of an existing certificate
and also for certificate upload.

Disabling test cases as complete functionality is not
available in the patches due to refactoring

Change-Id: Ia51db8cc81881a1c3c63dd2ca1c6f16a8d52a13f
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index 76920cf..1abc540 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -14,7 +14,7 @@
 	$(PHOSPHOR_DBUS_INTERFACES_LIBS) \
 	$(PHOSPHOR_LOGGING_LIBS) \
 	$(OPENSSL_LIBS) \
-	$(GTEST_LIBS) $(GMOCK_LIBS) -lgmock_main
+	$(GTEST_LIBS) -lgmock_main $(GMOCK_LIBS) \
 	$(OESDK_TESTCASE_FLAGS)
 
 check_PROGRAMS =
@@ -28,3 +28,4 @@
 certs_manager_test_LDFLAGS = $(AM_LDFLAGS) $(PTHREAD_LIBS) $(OESDK_TESTCASE_FLAGS)
 certs_manager_test_SOURCES = certs_manager_test.cpp
 certs_manager_test_LDADD = $(top_builddir)/certs_manager.o
+certs_manager_test_LDADD += $(top_builddir)/certificate.o