build: Fix conditional compilation on availability of getpass()

Change-Id: I3aa95c1b6afe2239f24642507da8090f7f58abac
Refs: #2419
diff --git a/src/security/sec-tpm.cpp b/src/security/sec-tpm.cpp
index eb107b1..5c12049 100644
--- a/src/security/sec-tpm.cpp
+++ b/src/security/sec-tpm.cpp
@@ -363,7 +363,7 @@
 {
   bool isInitialized = false;
 
-#ifndef NDN_CXX_HAVE_GETPASS
+#ifdef NDN_CXX_HAVE_GETPASS
   char* pw0 = 0;
 
   pw0 = getpass(prompt.c_str());