security: Bug fixing

1. correct the error message for non-existing public key.
2. rename private key export/import methods to avoid confusion.

Refs: #1527

Change-Id: I3ea8378378a66e1fbec7f0d4f210057c8f9b969b
diff --git a/src/security/sec-tpm-file.cpp b/src/security/sec-tpm-file.cpp
index ba3cca8..94ed510 100644
--- a/src/security/sec-tpm-file.cpp
+++ b/src/security/sec-tpm-file.cpp
@@ -149,7 +149,7 @@
   string keyURI = keyName.toUri();
 
   if (!doesKeyExistInTpm(keyName, KEY_CLASS_PUBLIC))
-    throw Error("Public Key already exist");
+    throw Error("Public Key does not exist");
 
   ostringstream os;
   try
@@ -169,7 +169,7 @@
 }
 
 ConstBufferPtr
-SecTpmFile::exportPrivateKeyPkcs1FromTpm(const Name& keyName)
+SecTpmFile::exportPrivateKeyPkcs8FromTpm(const Name& keyName)
 {
   OBufferStream privateKeyOs;
   CryptoPP::FileSource(m_impl->nameTransform(keyName.toUri(), ".pri").string().c_str(), true,
@@ -179,7 +179,7 @@
 }
 
 bool
-SecTpmFile::importPrivateKeyPkcs1IntoTpm(const Name& keyName, const uint8_t* buf, size_t size)
+SecTpmFile::importPrivateKeyPkcs8IntoTpm(const Name& keyName, const uint8_t* buf, size_t size)
 {
   try
     {