build: suppress CryptoPP warnings

Change-Id: I52e93fb18c42cf72d73c4477dc4a8093a5221215
diff --git a/src/encoding/cryptopp/asn_ext.hpp b/src/encoding/cryptopp/asn_ext.hpp
index b02b3e9..9140ed9 100644
--- a/src/encoding/cryptopp/asn_ext.hpp
+++ b/src/encoding/cryptopp/asn_ext.hpp
@@ -11,7 +11,7 @@
 
 #include <stdexcept>
 #include "../../common.hpp"
-#include <cryptopp/asn.h>
+#include "../../security/cryptopp.hpp"
 
 namespace ndn {
 
diff --git a/src/encoding/oid.cpp b/src/encoding/oid.cpp
index ae4e12d..5f36473 100644
--- a/src/encoding/oid.cpp
+++ b/src/encoding/oid.cpp
@@ -9,7 +9,7 @@
 
 #include "oid.hpp"
 
-#include <cryptopp/asn.h>
+#include "../security/cryptopp.hpp"
 
 using namespace std;
 using namespace CryptoPP;
diff --git a/src/security/certificate-extension.cpp b/src/security/certificate-extension.cpp
index 69a2d10..7ee0de9 100644
--- a/src/security/certificate-extension.cpp
+++ b/src/security/certificate-extension.cpp
@@ -9,7 +9,7 @@
 #include "common.hpp"
 
 #include "certificate-extension.hpp"
-#include <cryptopp/asn.h>
+#include "cryptopp.hpp"
 
 using namespace std;
 using namespace CryptoPP;
diff --git a/src/security/certificate-subject-description.cpp b/src/security/certificate-subject-description.cpp
index ccf6778..fc6478f 100644
--- a/src/security/certificate-subject-description.cpp
+++ b/src/security/certificate-subject-description.cpp
@@ -10,7 +10,7 @@
 
 #include "certificate-subject-description.hpp"
 
-#include <cryptopp/asn.h>
+#include "cryptopp.hpp"
 
 using namespace std;
 using namespace CryptoPP;
diff --git a/src/security/certificate.cpp b/src/security/certificate.cpp
index 931a40e..eb45d6f 100644
--- a/src/security/certificate.cpp
+++ b/src/security/certificate.cpp
@@ -13,9 +13,7 @@
 #include "../util/logging.hpp"
 #include "../util/time.hpp"
 
-#include <cryptopp/asn.h>
-#include <cryptopp/base64.h>
-#include <cryptopp/files.h>
+#include "cryptopp.hpp"
 
 #include "../encoding/cryptopp/asn_ext.hpp"
 
diff --git a/src/security/cryptopp.hpp b/src/security/cryptopp.hpp
new file mode 100644
index 0000000..f22b87e
--- /dev/null
+++ b/src/security/cryptopp.hpp
@@ -0,0 +1,27 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_SECURITY_CRYPTOPP_HPP
+#define NDN_SECURITY_CRYPTOPP_HPP
+
+// suppress CryptoPP warnings
+#pragma GCC system_header
+#pragma clang system_header
+
+#include <cryptopp/asn.h>
+#include <cryptopp/base64.h>
+#include <cryptopp/des.h>
+#include <cryptopp/files.h>
+#include <cryptopp/filters.h>
+#include <cryptopp/hex.h>
+#include <cryptopp/modes.h>
+#include <cryptopp/osrng.h>
+#include <cryptopp/pssr.h>
+#include <cryptopp/pwdbased.h>
+#include <cryptopp/rsa.h>
+#include <cryptopp/sha.h>
+
+#endif // NDN_SECURITY_CRYPTOPP_HPP
diff --git a/src/security/public-key.cpp b/src/security/public-key.cpp
index c8362af..f6b2fdf 100644
--- a/src/security/public-key.cpp
+++ b/src/security/public-key.cpp
@@ -10,9 +10,7 @@
 
 #include "public-key.hpp"
 
-#include <cryptopp/rsa.h>
-#include <cryptopp/base64.h>
-#include <cryptopp/files.h>
+#include "cryptopp.hpp"
 
 using namespace std;
 using namespace CryptoPP;
diff --git a/src/security/sec-tpm-file.cpp b/src/security/sec-tpm-file.cpp
index bb2ad0b..98e117f 100644
--- a/src/security/sec-tpm-file.cpp
+++ b/src/security/sec-tpm-file.cpp
@@ -14,17 +14,7 @@
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>
 
-#include <cryptopp/rsa.h>
-#include <cryptopp/files.h>
-#include <cryptopp/base64.h>
-#include <cryptopp/hex.h>
-#include <cryptopp/osrng.h>
-#include <cryptopp/sha.h>
-#include <cryptopp/pssr.h>
-#include <cryptopp/modes.h>
-#include <cryptopp/pwdbased.h>
-#include <cryptopp/sha.h>
-#include <cryptopp/des.h>
+#include "cryptopp.hpp"
 
 #include <sys/types.h>
 #include <sys/stat.h>
diff --git a/src/security/sec-tpm-memory.cpp b/src/security/sec-tpm-memory.cpp
index 5ca9673..6e4a371 100644
--- a/src/security/sec-tpm-memory.cpp
+++ b/src/security/sec-tpm-memory.cpp
@@ -13,7 +13,7 @@
 #include <openssl/ssl.h>
 #include <openssl/sha.h>
 #include <openssl/rsa.h>
-#include <cryptopp/osrng.h>
+#include "cryptopp.hpp"
 
 using namespace std;
 
diff --git a/src/security/sec-tpm-osx.cpp b/src/security/sec-tpm-osx.cpp
index 6436b5a..ada0b81 100644
--- a/src/security/sec-tpm-osx.cpp
+++ b/src/security/sec-tpm-osx.cpp
@@ -11,8 +11,7 @@
 
 #include "security/public-key.hpp"
 #include "util/logging.hpp"
-#include <cryptopp/files.h>
-#include <cryptopp/asn.h>
+#include "cryptopp.hpp"
 
 #include <pwd.h>
 #include <unistd.h>
@@ -467,6 +466,8 @@
   keyParams.accessRef = access;
   CFArrayRef outItems;
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
   OSStatus res = SecKeychainItemImport (importedKey,
                                         NULL,
                                         &externalFormat,
@@ -475,6 +476,7 @@
                                         &keyParams,
                                         m_impl->m_keyChainRef,
                                         &outItems);
+#pragma clang diagnostic pop
   
   if(res != errSecSuccess)
     {
diff --git a/src/security/sec-tpm.cpp b/src/security/sec-tpm.cpp
index 56c39b8..e19196c 100644
--- a/src/security/sec-tpm.cpp
+++ b/src/security/sec-tpm.cpp
@@ -7,17 +7,7 @@
 
 #include "sec-tpm.hpp"
 
-#include <cryptopp/rsa.h>
-#include <cryptopp/files.h>
-#include <cryptopp/base64.h>
-#include <cryptopp/hex.h>
-#include <cryptopp/osrng.h>
-#include <cryptopp/sha.h>
-#include <cryptopp/pssr.h>
-#include <cryptopp/modes.h>
-#include <cryptopp/pwdbased.h>
-#include <cryptopp/sha.h>
-#include <cryptopp/des.h>
+#include "cryptopp.hpp"
 
 using namespace std;
 
diff --git a/src/security/validator.cpp b/src/security/validator.cpp
index be166e5..f1d8035 100644
--- a/src/security/validator.cpp
+++ b/src/security/validator.cpp
@@ -12,9 +12,7 @@
 #include "../util/logging.hpp"
 #include "../util/crypto.hpp"
 
-#include <cryptopp/rsa.h>
-#include <cryptopp/files.h>
-#include <cryptopp/hex.h>
+#include "cryptopp.hpp"
 
 
 using namespace std;
diff --git a/src/util/crypto.cpp b/src/util/crypto.cpp
index 3aa114a..1621005 100644
--- a/src/util/crypto.cpp
+++ b/src/util/crypto.cpp
@@ -6,9 +6,7 @@
 #include "../common.hpp"
 
 #include "crypto.hpp"
-#include <cryptopp/sha.h>
-#include <cryptopp/filters.h>
-#include <cryptopp/files.h>
+#include "../security/cryptopp.hpp"
 
 namespace ndn {
 
diff --git a/src/util/io.hpp b/src/util/io.hpp
index 3d39feb..6026f06 100644
--- a/src/util/io.hpp
+++ b/src/util/io.hpp
@@ -13,9 +13,7 @@
 #include <string>
 #include <iostream>
 #include <fstream>
-#include <cryptopp/files.h>
-#include <cryptopp/base64.h>
-#include <cryptopp/hex.h>
+#include "../security/cryptopp.hpp"
 
 
 namespace ndn {
diff --git a/src/util/random.cpp b/src/util/random.cpp
index c63e916..db26a3e 100644
--- a/src/util/random.cpp
+++ b/src/util/random.cpp
@@ -8,7 +8,7 @@
 
 #include "random.hpp"
 
-#include <cryptopp/osrng.h>
+#include "../security/cryptopp.hpp"
 
 namespace ndn {
 namespace random {
diff --git a/src/util/regex/regex-component-set-matcher.hpp b/src/util/regex/regex-component-set-matcher.hpp
index 857c59e..4039388 100644
--- a/src/util/regex/regex-component-set-matcher.hpp
+++ b/src/util/regex/regex-component-set-matcher.hpp
@@ -78,8 +78,6 @@
 inline void 
 RegexComponentSetMatcher::compile()
 {
-  int index = 0;
-
   switch(m_expr[0]){
   case '<':
     return compileSingleComponent();