security: fixing bugs and adding methods

1. changing getCertificate to take only one argument, now validation checking is always enforced.
2. changing KSK-... DSK-... to lower case ksk-..., dsk-...
3. adding a addCertificateAsSystemDefault method to facilitate setting default certificate of the system.
4. using static_cast<int> (rather than floor) to round time.
5. sanity checking for key name in SecPublicInfo and SecPublicInfoSqlite3.

Change-Id: Id67af9873efef3df92458ed7a87623f22167c558
diff --git a/src/c/util/time.c b/src/c/util/time.c
index 4c3be3a..29c20c6 100644
--- a/src/c/util/time.c
+++ b/src/c/util/time.c
@@ -43,7 +43,7 @@
     // Don't expect this to happen.
     fraction = ".000000";
     
-  time_t seconds = (time_t)floor(secondsSince1970);
+  time_t seconds = (time_t)secondsSince1970;
   struct tm* gmt = gmtime(&seconds);
   sprintf(isoString, "%04d%02d%02dT%02d%02d%02d%s", 1900 + gmt->tm_year, gmt->tm_mon + 1, gmt->tm_mday,
     gmt->tm_hour, gmt->tm_min, gmt->tm_sec, fraction);