Handle keynames with special characters such as - and .

Bug: http://code.google.com/p/android/issues/detail?id=34577
Bug: 6837950

(cherry-picked from 0114bd9f9bbc2458ca77bf3508e7c15992a432b1)

Change-Id: I0c265fe73c1b2c430ffd196a21691264f8f3b555
diff --git a/keystore-engine/eng_keystore.cpp b/keystore-engine/eng_keystore.cpp
index 9a3e7f4..ad2b638 100644
--- a/keystore-engine/eng_keystore.cpp
+++ b/keystore-engine/eng_keystore.cpp
@@ -36,7 +36,7 @@
 #include <openssl/engine.h>
 #include <openssl/evp.h>
 
-#define LOG_NDEBUG 0
+//#define LOG_NDEBUG 0
 #define LOG_TAG "OpenSSL-keystore"
 #include <cutils/log.h>
 
@@ -210,9 +210,14 @@
     return 1;
 }
 
-static EVP_PKEY* keystore_loadkey(ENGINE* e, const char* key_id, UI_METHOD *ui_method,
-        void *callback_data) {
+static EVP_PKEY* keystore_loadkey(ENGINE* e, const char* key_id, UI_METHOD* ui_method,
+        void* callback_data) {
+#if LOG_NDEBUG
+    (void)ui_method;
+    (void)callback_data;
+#else
     ALOGV("keystore_loadkey(%p, \"%s\", %p, %p)", e, key_id, ui_method, callback_data);
+#endif
 
     Keystore_Reply reply;
     if (keystore_cmd(CommandCodes[GET_PUBKEY], &reply, 1, strlen(key_id), key_id) != NO_ERROR) {