Avoid using deprecated ndn-cxx functions
Change-Id: I51e0abcb7454e31efbcc779a17d2c490802108ec
diff --git a/src/util/util.cpp b/src/util/util.cpp
index 7d350a5..8466733 100644
--- a/src/util/util.cpp
+++ b/src/util/util.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
*
* This file is part of NDNS (Named Data Networking Domain Name Service).
* See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -64,8 +64,11 @@
bufferSource(block.wire(), block.size()) >> base64Encode() >> streamSink(os);
}
else {
- os << "Name: " << data.getName().toUri() << std::endl;
- os << "KeyLocator: " << data.getSignature().getKeyLocator().getName().toUri() << std::endl;
+ os << "Name: " << data.getName() << std::endl;
+ auto kl = data.getKeyLocator();
+ if (kl) {
+ os << "KeyLocator: " << kl->getName() << std::endl;
+ }
bufferSource(block.wire(), block.size()) >> base64Encode() >> streamSink(os);
os << std::endl;
}