tests: refactor ChallengePossession test cases
Change-Id: Ia930d373e981bb0f96e0350bb31b4d3cbb69082f
diff --git a/src/challenge/challenge-possession.cpp b/src/challenge/challenge-possession.cpp
index 7c2b30a..81a0bb6 100644
--- a/src/challenge/challenge-possession.cpp
+++ b/src/challenge/challenge-possession.cpp
@@ -229,7 +229,7 @@
void
ChallengePossession::fulfillParameters(std::multimap<std::string, std::string>& params,
ndn::KeyChain& keyChain, const Name& issuedCertName,
- const std::array<uint8_t, 16>& nonce)
+ ndn::span<const uint8_t, 16> nonce)
{
auto keyName = ndn::security::extractKeyNameFromCertName(issuedCertName);
auto id = keyChain.getPib().getIdentity(ndn::security::extractIdentityFromCertName(issuedCertName));
diff --git a/src/challenge/challenge-possession.hpp b/src/challenge/challenge-possession.hpp
index ab5e641..0aa78c3 100644
--- a/src/challenge/challenge-possession.hpp
+++ b/src/challenge/challenge-possession.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021, Regents of the University of California.
+ * Copyright (c) 2017-2022, Regents of the University of California.
*
* This file is part of ndncert, a certificate management system based on NDN.
*
@@ -51,6 +51,7 @@
class ChallengePossession : public ChallengeModule
{
public:
+ explicit
ChallengePossession(const std::string& configPath = "");
// For CA
@@ -68,7 +69,7 @@
static void
fulfillParameters(std::multimap<std::string, std::string>& params,
ndn::KeyChain& keyChain, const Name& issuedCertName,
- const std::array<uint8_t, 16>& nonce);
+ ndn::span<const uint8_t, 16> nonce);
// challenge parameters
static const std::string PARAMETER_KEY_CREDENTIAL_CERT;