Switch to new KeyChain where possible
signed_interest::POS_RANDOM_VAL and signed_interest::POS_TIMESTAMP
constants are deprecated. Use command_interest:: equivalents instead.
This commit also includes fix for the backward compatibility regression
due to move of deprecated TPM/PublicInfo header files.
Change-Id: Ic3b008fc6758f3ac83f191158b6ac0789483f90d
Refs: #3098
diff --git a/src/security/command-interest-validator.cpp b/src/security/command-interest-validator.cpp
index f877f41..73358bf 100644
--- a/src/security/command-interest-validator.cpp
+++ b/src/security/command-interest-validator.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -118,11 +118,11 @@
uint64_t& timestamp) const
{
const Name& name = interest.getName();
- if (name.size() < signed_interest::MIN_LENGTH) {
+ if (name.size() < command_interest::MIN_SIZE) {
return ErrorCode::NAME_TOO_SHORT;
}
- const name::Component& timestampComp = name[signed_interest::POS_TIMESTAMP];
+ const name::Component& timestampComp = name.at(command_interest::POS_TIMESTAMP);
if (!timestampComp.isNumber()) {
return ErrorCode::BAD_TIMESTAMP;
}