security: convert more functions to span
Update span-lite to commit 2962cb925c2323b936e4d5f366d2cddfb1b8dc68
and enable the initializer_list constructor.
Change-Id: Ie679315fe2dd69a8b9760c3b7dd47e97fcdc04c2
diff --git a/tests/unit/security/pib/identity.t.cpp b/tests/unit/security/pib/identity.t.cpp
index 4d79bbc..0198816 100644
--- a/tests/unit/security/pib/identity.t.cpp
+++ b/tests/unit/security/pib/identity.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -62,12 +62,12 @@
BOOST_CHECK_NE(identity1, Identity());
BOOST_CHECK_EQUAL(Identity(), Identity());
- identity1.addKey(id1Key1.data(), id1Key1.size(), id1Key1Name);
+ identity1.addKey(id1Key1, id1Key1Name);
BOOST_CHECK_NO_THROW(identity2.getKey(id1Key1Name));
identity2.removeKey(id1Key1Name);
BOOST_CHECK_THROW(identity1.getKey(id1Key1Name), pib::Pib::Error);
- identity1.setDefaultKey(id1Key1.data(), id1Key1.size(), id1Key1Name);
+ identity1.setDefaultKey(id1Key1, id1Key1Name);
BOOST_CHECK_NO_THROW(identity2.getDefaultKey());
}
diff --git a/tests/unit/security/pib/pib.t.cpp b/tests/unit/security/pib/pib.t.cpp
index c40cddc..bcd90f9 100644
--- a/tests/unit/security/pib/pib.t.cpp
+++ b/tests/unit/security/pib/pib.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -46,7 +46,7 @@
BOOST_CHECK(id);
BOOST_CHECK_EQUAL(!id, false);
- Key key = id.addKey(id1Key1.data(), id1Key1.size(), id1Key1Name);
+ Key key = id.addKey(id1Key1, id1Key1Name);
BOOST_CHECK(key);
BOOST_CHECK_EQUAL(!key, false);
}