pib: Fix compilation error with new version of ndn-cxx library
Change-Id: I6903ebc9bd169851ee7eac6b7a2d375296a4b913
Refs: #3083
diff --git a/tools/pib/pib-db.cpp b/tools/pib/pib-db.cpp
index 2f35606..330af14 100644
--- a/tools/pib/pib-db.cpp
+++ b/tools/pib/pib-db.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -585,7 +585,7 @@
-1, &statement, nullptr);
sqlite3_bind_block(statement, 1, identity.wireEncode(), SQLITE_TRANSIENT);
sqlite3_bind_block(statement, 2, keyName.wireEncode(), SQLITE_TRANSIENT);
- sqlite3_bind_int(statement, 3, key.getKeyType());
+ sqlite3_bind_int(statement, 3, static_cast<int>(key.getKeyType()));
sqlite3_bind_blob(statement, 4, key.get().buf(), key.get().size(), SQLITE_STATIC);
sqlite3_step(statement);
sqlite3_finalize(statement);
diff --git a/tools/pib/pib.cpp b/tools/pib/pib.cpp
index 23c9bea..042bf2e 100644
--- a/tools/pib/pib.cpp
+++ b/tools/pib/pib.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -114,7 +114,7 @@
shared_ptr<IdentityCertificate> mgmtCert = m_db.getMgmtCertificate();
if (mgmtCert == nullptr ||
- !m_tpm->doesKeyExistInTpm(mgmtCert->getPublicKeyName(), KEY_CLASS_PRIVATE)) {
+ !m_tpm->doesKeyExistInTpm(mgmtCert->getPublicKeyName(), KeyClass::PRIVATE)) {
// If mgmt cert is set, or corresponding private key of the current mgmt cert is missing,
// generate new mgmt cert
@@ -177,7 +177,7 @@
EncodingBuffer encoder;
certificate->wireEncode(encoder, true);
Block signatureValue = m_tpm->signInTpm(encoder.buf(), encoder.size(),
- signingKeyName, DIGEST_ALGORITHM_SHA256);
+ signingKeyName, DigestAlgorithm::SHA256);
certificate->wireEncode(encoder, signatureValue);
return certificate;