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-osx.hpp b/src/security/sec-tpm-osx.hpp
index 1a5bd1f..d4363c2 100644
--- a/src/security/sec-tpm-osx.hpp
+++ b/src/security/sec-tpm-osx.hpp
@@ -99,15 +99,15 @@
    * From TrustedPlatformModule *
    ******************************/
   virtual ConstBufferPtr
-  exportPrivateKeyPkcs1FromTpm(const Name& keyName)
+  exportPrivateKeyPkcs8FromTpm(const Name& keyName)
   {
-    return exportPrivateKeyPkcs1FromTpmInternal(keyName, false);
+    return exportPrivateKeyPkcs8FromTpmInternal(keyName, false);
   }
 
   virtual bool
-  importPrivateKeyPkcs1IntoTpm(const Name& keyName, const uint8_t* buf, size_t size)
+  importPrivateKeyPkcs8IntoTpm(const Name& keyName, const uint8_t* buf, size_t size)
   {
-    return importPrivateKeyPkcs1IntoTpmInternal(keyName, buf, size, false);
+    return importPrivateKeyPkcs8IntoTpmInternal(keyName, buf, size, false);
   }
 
   virtual bool
@@ -123,10 +123,10 @@
   deleteKeyPairInTpmInternal(const Name& keyName, bool needRetry);
 
   ConstBufferPtr
-  exportPrivateKeyPkcs1FromTpmInternal(const Name& keyName, bool needRetry);
+  exportPrivateKeyPkcs8FromTpmInternal(const Name& keyName, bool needRetry);
 
   bool
-  importPrivateKeyPkcs1IntoTpmInternal(const Name& keyName,
+  importPrivateKeyPkcs8IntoTpmInternal(const Name& keyName,
                                        const uint8_t* buf, size_t size,
                                        bool needRetry);