docs: Updating doxygen comments and minor update to normalize API
Change-Id: I24686acc36f372ee2eddffaaa6c104f964ceeca4
Refs: #1299
diff --git a/src/security/key-chain.hpp b/src/security/key-chain.hpp
index db71884..30efa12 100644
--- a/src/security/key-chain.hpp
+++ b/src/security/key-chain.hpp
@@ -102,7 +102,7 @@
/**
* @brief prepare an unsigned identity certificate
*
- * @param keyName Key name, e.g., /<identity_name>/ksk-123456.
+ * @param keyName Key name, e.g., `/<identity_name>/ksk-123456`.
* @param signingIdentity The signing identity.
* @param notBefore Refer to IdentityCertificate.
* @param notAfter Refer to IdentityCertificate.
@@ -177,9 +177,7 @@
signByIdentity(const uint8_t* buffer, size_t bufferLength, const Name& identityName);
/**
- * @brief Set Sha256 weak signature.
- *
- * @param data.
+ * @brief Set Sha256 weak signature for @param data
*/
inline void
signWithSha256(Data& data);
@@ -187,8 +185,8 @@
/**
* @brief Generate a self-signed certificate for a public key.
*
- * @param keyName The name of the public key.
- * @return The generated certificate, NULL if selfSign fails.
+ * @param keyName The name of the public key
+ * @return The generated certificate, shared_ptr<IdentityCertificate>() if selfSign fails
*/
shared_ptr<IdentityCertificate>
selfSign(const Name& keyName);
diff --git a/src/security/public-key.cpp b/src/security/public-key.cpp
index 9449cc9..17f204b 100644
--- a/src/security/public-key.cpp
+++ b/src/security/public-key.cpp
@@ -28,11 +28,6 @@
{
}
-/**
- * Create a new PublicKey with the given values.
- * @param algorithm The algorithm of the public key.
- * @param keyDer The blob of the PublicKeyInfo in terms of DER.
- */
PublicKey::PublicKey(const uint8_t* keyDerBuf, size_t keyDerSize)
{
StringSource src(keyDerBuf, keyDerSize, true);
diff --git a/src/security/public-key.hpp b/src/security/public-key.hpp
index 1ed567c..e939978 100644
--- a/src/security/public-key.hpp
+++ b/src/security/public-key.hpp
@@ -43,11 +43,12 @@
PublicKey();
/**
- * Create a new PublicKey with the given values.
- * @param algorithm The algorithm of the public key.
- * @param keyDer The blob of the PublicKeyInfo in terms of DER.
+ * @brief Create a new PublicKey from @param keyDerBuf in DER buffer
*
- * @throws PublicKey::Error If algorithm is not supported or keyDer cannot be decoded
+ * @param keyDerBuf The pointer to the first byte of buffer containing DER of public key
+ * @param keyDerSize Size of the buffer
+ *
+ * @throws PublicKey::Error If DER in buffer cannot be decoded
*/
PublicKey(const uint8_t* keyDerBuf, size_t keyDerSize);
diff --git a/src/security/sec-public-info.hpp b/src/security/sec-public-info.hpp
index 790ad36..1949d51 100644
--- a/src/security/sec-public-info.hpp
+++ b/src/security/sec-public-info.hpp
@@ -44,7 +44,7 @@
};
/**
- * @brief The virtual Destructor.
+ * @brief The virtual Destructor
*/
virtual
~SecPublicInfo()
@@ -52,37 +52,37 @@
}
/**
- * @brief Check if the specified identity already exists.
+ * @brief Check if the specified identity already exists
*
- * @param identityName The identity name.
- * @return true if the identity exists, otherwise false.
+ * @param identityName The identity name
+ * @return true if the identity exists, otherwise false
*/
virtual bool
doesIdentityExist(const Name& identityName) = 0;
/**
- * @brief Add a new identity.
+ * @brief Add a new identity
*
- * if identity already exist, do not add it again.
+ * if identity already exist, do not add it again
*
- * @param identityName The identity name to be added.
+ * @param identityName The identity name to be added
*/
virtual void
addIdentity(const Name& identityName) = 0;
/**
- * @brief Revoke the identity.
+ * @brief Revoke the identity
*
- * @return true if the identity was revoked, otherwise false.
+ * @return true if the identity was revoked, otherwise false
*/
virtual bool
revokeIdentity() = 0;
/**
- * @brief Check if the specified key already exists.
+ * @brief Check if the specified key already exists
*
- * @param keyName The name of the key.
- * @return true if the key exists, otherwise false.
+ * @param keyName The name of the key
+ * @return true if the key exists, otherwise false
*/
virtual bool
doesPublicKeyExist(const Name& keyName) = 0;
@@ -90,28 +90,26 @@
/**
* @brief Add a public key to the identity storage.
*
- * @param keyName The name of the public key to be added.
- * @param keyType Type of the public key to be added.
- * @param publicKeyDer A blob of the public key DER to be added.
+ * @param keyName The name of the public key to be added
+ * @param keyType Type of the public key to be added
+ * @param publicKey Reference to the PublicKey object
*/
virtual void
- addPublicKey(const Name& keyName, KeyType keyType, const PublicKey& publicKeyDer) = 0;
+ addPublicKey(const Name& keyName, KeyType keyType, const PublicKey& publicKey) = 0;
/**
- * @brief Get the public key DER blob from the identity storage.
+ * @brief Get shared pointer to PublicKey object from the identity storage
*
- * @param keyName The name of the requested public key.
- * @return The DER Blob.
- * @throws SecPublicInfo::Error if public key does not exist.
+ * @param keyName The name of the requested public key
+ * @throws SecPublicInfo::Error if public key does not exist
*/
virtual shared_ptr<PublicKey>
getPublicKey(const Name& keyName) = 0;
/**
- * @brief Check if the specified certificate already exists.
+ * @brief Check if the specified certificate already exists
*
- * @param certificateName The name of the certificate.
- * @return true if the certificate exists, otherwise false.
+ * @param certificateName The name of the certificate
*/
virtual bool
doesCertificateExist(const Name& certificateName) = 0;
@@ -119,19 +117,18 @@
/**
* @brief Add a certificate to the identity storage.
*
- * It will add the corresponding public key and identity if they do not exist.
+ * It will add the corresponding public key and identity if they do not exist
*
- * @param certificate The certificate to be added.
+ * @param certificate The certificate to be added
*/
virtual void
addCertificate(const IdentityCertificate& certificate) = 0;
/**
- * @brief Get a certificate from the identity storage.
+ * @brief Get a shared pointer to identity certificate object from the identity storage
*
- * @param certificateName The name of the requested certificate.
- * @return The requested certificate.
- * @throws SecPublicInfo::Error if the certificate does not exist.
+ * @param certificateName The name of the requested certificate
+ * @throws SecPublicInfo::Error if the certificate does not exist
*/
virtual shared_ptr<IdentityCertificate>
getCertificate(const Name& certificateName) = 0;
@@ -142,77 +139,74 @@
*****************************************/
/**
- * @brief Get the default identity.
+ * @brief Get name of the default identity
*
- * @param return The name of default identity,
* @throws SecPublicInfo::Error if there is no default.
*/
virtual Name
getDefaultIdentity() = 0;
/**
- * @brief Get the default key name for the specified identity.
+ * @brief Get name of the default key name for the specified identity
*
- * @param identityName The identity name.
- * @return The default key name.
- * @throws SecPublicInfo::Error if there is no default.
+ * @param identityName The identity name
+ * @throws SecPublicInfo::Error if there is no default
*/
virtual Name
getDefaultKeyNameForIdentity(const Name& identityName) = 0;
/**
- * @brief Get the default certificate name for the specified key.
+ * @brief Get name of the default certificate name for the specified key
*
* @param keyName The key name.
- * @return The default certificate name.
* @throws SecPublicInfo::Error if there is no default.
*/
virtual Name
getDefaultCertificateNameForKey(const Name& keyName) = 0;
/**
- * @brief Get all the identities in public info.
+ * @brief Get all the identities from public info
*
- * @param nameList On return, the identity list.
- * @param isDefault If specified, only the default identity is returned.
+ * @param [out] nameList On return, the identity list
+ * @param isDefault If specified, only the default identity is returned
*/
virtual void
getAllIdentities(std::vector<Name>& nameList, bool isDefault) = 0;
/**
- * @brief Get all the key name in public info.
+ * @brief Get all the key names from public info
*
- * @param nameList On return, the key name list.
- * @param isDefault If specified, only the default keys are returned.
+ * @param [out] nameList On return, the key name list.
+ * @param isDefault If specified, only the default keys are returned
*/
virtual void
getAllKeyNames(std::vector<Name>& nameList, bool isDefault) = 0;
/**
- * @brief Get all the key name of a particular identity.
+ * @brief Get all the key names of a particular identity
*
- * @param identity The specified identity name.
- * @param nameList On return, the key name list.
- * @param isDefault If specified, only the default key is returned.
+ * @param identity The specified identity name
+ * @param [out] nameList On return, the key name list
+ * @param isDefault If specified, only the default key is returned
*/
virtual void
getAllKeyNamesOfIdentity(const Name& identity, std::vector<Name>& nameList, bool isDefault) = 0;
/**
- * @brief Get all the certificate name in public info.
+ * @brief Get all the certificate name in public info
*
- * @param nameList On return, the certificate name list.
- * @param isDefault If specified, only the default certificates are returned.
+ * @param [out] nameList On return, the certificate name list
+ * @param isDefault If specified, only the default certificates are returned
*/
virtual void
getAllCertificateNames(std::vector<Name>& nameList, bool isDefault) = 0;
/**
- * @brief Get all the certificate name of a particular key.
+ * @brief Get all the certificate name of a particular key name
*
- * @param identity The specified key name.
- * @param nameList On return, the certificate name list.
- * @param isDefault If specified, only the default certificate is returned.
+ * @param keyName The specified key name
+ * @param [out] nameList On return, the certificate name list
+ * @param isDefault If specified, only the default certificate is returned
*/
virtual void
getAllCertificateNamesOfKey(const Name& keyName, std::vector<Name>& nameList, bool isDefault) = 0;
@@ -222,25 +216,25 @@
*****************************************/
/**
- * @brief Delete a certificate.
+ * @brief Delete a certificate
*
- * @param certificateName The certificate name.
+ * @param certificateName The certificate name
*/
virtual void
deleteCertificateInfo(const Name& certificateName) = 0;
/**
- * @brief Delete a public key and related certificates.
+ * @brief Delete a public key and related certificates
*
- * @param keyName The key name.
+ * @param keyName The key name
*/
virtual void
deletePublicKeyInfo(const Name& keyName) = 0;
/**
- * @brief Delete an identity and related public keys and certificates.
+ * @brief Delete an identity and related public keys and certificates
*
- * @param identity The identity name.
+ * @param identity The identity name
*/
virtual void
deleteIdentityInfo(const Name& identity) = 0;
@@ -252,27 +246,27 @@
*****************************************/
/**
- * @brief Set the default identity.
+ * @brief Set the default identity
*
- * @param identityName The default identity name.
+ * @param identityName The default identity name
*/
virtual void
setDefaultIdentityInternal(const Name& identityName) = 0;
/**
- * @brief Set the default key name for the corresponding identity.
+ * @brief Set the default key name for the corresponding identity
*
- * @param keyName The key name.
- * @throws SecPublicInfo::Error if the key does not exist.
+ * @param keyName The key name
+ * @throws SecPublicInfo::Error if the key does not exist
*/
virtual void
setDefaultKeyNameForIdentityInternal(const Name& keyName) = 0;
/**
- * @brief Set the default certificate name for the corresponding key.
+ * @brief Set the default certificate name for the corresponding key
*
- * @param certificateName The certificate name.
- * @throws SecPublicInfo::Error if the certificatedoes not exist.
+ * @param certificateName The certificate name
+ * @throws SecPublicInfo::Error if the certificate does not exist
*/
virtual void
setDefaultCertificateNameForKeyInternal(const Name& certificateName) = 0;
@@ -284,48 +278,48 @@
*****************************************/
/**
- * @brief Set the default identity.
+ * @brief Set the default identity
*
- * @param identityName The default identity name.
- * @throws SecPublicInfo::Error if the identity does not exist.
+ * @param identityName The default identity name
+ * @throws SecPublicInfo::Error if the identity does not exist
*/
inline void
setDefaultIdentity(const Name& identityName);
/**
- * @brief Set the default key name for the corresponding identity.
+ * @brief Set the default key name for the corresponding identity
*
- * @param keyName The key name.
- * @throws SecPublicInfo::Error if either the identity or key does not exist.
+ * @param keyName The key name
+ * @throws SecPublicInfo::Error if either the identity or key does not exist
*/
inline void
setDefaultKeyNameForIdentity(const Name& keyName);
/**
- * @brief Set the default certificate name for the corresponding key.
+ * @brief Set the default certificate name for the corresponding key
*
- * @param certificateName The certificate name.
- * @throws SecPublicInfo::Error if either the certificate or key does not exist.
+ * @param certificateName The certificate name
+ * @throws SecPublicInfo::Error if either the certificate or key does not exist
*/
inline void
setDefaultCertificateNameForKey(const Name& certificateName);
/**
- * @brief Generate a key name for the identity.
+ * @brief Generate a key name for the identity
*
- * @param identityName The identity name.
- * @param useKsk If true, generate a KSK name, otherwise a DSK name.
- * @return The generated key name.
+ * @param identityName The identity name
+ * @param useKsk If true, generate a KSK name, otherwise a DSK name
+ * @return The generated key name
*/
inline Name
getNewKeyName(const Name& identityName, bool useKsk);
/**
- * @brief Get the default certificate name for the specified identity.
+ * @brief Get the default certificate name for the specified identity
*
- * @param identityName The identity name.
- * @return The default certificate name.
- * @throws SecPublicInfo::Error if no certificate is found.
+ * @param identityName The identity name
+ * @return The default certificate name
+ * @throws SecPublicInfo::Error if no certificate is found
*/
inline Name
getDefaultCertificateNameForIdentity(const Name& identityName);
@@ -333,16 +327,16 @@
/**
* @brief Get the default certificate name of the default identity
*
- * @return The requested certificate name.
- * @throws SecPublicInfo::Error if no certificate is found.
+ * @return The requested certificate name
+ * @throws SecPublicInfo::Error if no certificate is found
*/
inline Name
getDefaultCertificateName();
/**
- * @brief Add a certificate and set the certificate as the default one of its corresponding key.
+ * @brief Add a certificate and set the certificate as the default one of its corresponding key
*
- * @param certificate The certificate to be added.
+ * @param certificate The certificate to be added
* @throws SecPublicInfo::Error if the certificate cannot be added (though it is really rare)
*/
inline void
@@ -350,9 +344,9 @@
/**
* @brief Add a certificate into the public key identity storage and set the certificate as the
- * default one of its corresponding identity.
+ * default one of its corresponding identity
*
- * @param certificate The certificate to be added.
+ * @param certificate The certificate to be added
* @throws SecPublicInfo::Error if the certificate cannot be added (though it is really rare)
*/
inline void
@@ -360,24 +354,24 @@
/**
* @brief Add a certificate into the public key identity storage and set the certificate as the
- * default one of the default identity.
+ * default one of the default identity
*
- * @param certificate The certificate to be added.
+ * @param certificate The certificate to be added
* @throws SecPublicInfo::Error if the certificate cannot be added (though it is really rare)
*/
inline void
addCertificateAsSystemDefault(const IdentityCertificate& certificate);
/**
- * @brief get cached default certificate of the default identity.
+ * @brief Get cached default certificate of the default identity
*
- * @return The certificate which might be a NULL pointer.
+ * @return The certificate which might be empty shared_ptr<IdentityCertificate>()
*/
inline shared_ptr<IdentityCertificate>
defaultCertificate();
/**
- * @brief try to get the default certificate of the default identity from the public info.
+ * @brief try to get the default certificate of the default identity from the public info
*/
inline void
refreshDefaultCertificate();
diff --git a/src/security/sec-tpm-file.hpp b/src/security/sec-tpm-file.hpp
index 0f1d8be..d9f95c4 100644
--- a/src/security/sec-tpm-file.hpp
+++ b/src/security/sec-tpm-file.hpp
@@ -60,7 +60,7 @@
}
virtual bool
- getInTerminal()
+ getInTerminal() const
{
return m_inTerminal;
}
diff --git a/src/security/sec-tpm-memory.hpp b/src/security/sec-tpm-memory.hpp
index df0c7e3..e0dd34c 100644
--- a/src/security/sec-tpm-memory.hpp
+++ b/src/security/sec-tpm-memory.hpp
@@ -64,7 +64,7 @@
}
virtual bool
- getInTerminal()
+ getInTerminal() const
{
return m_inTerminal;
}
diff --git a/src/security/sec-tpm-osx.cpp b/src/security/sec-tpm-osx.cpp
index a7e1cd9..69c3deb 100644
--- a/src/security/sec-tpm-osx.cpp
+++ b/src/security/sec-tpm-osx.cpp
@@ -269,7 +269,7 @@
}
bool
-SecTpmOsx::getInTerminal()
+SecTpmOsx::getInTerminal() const
{
return m_impl->m_inTerminal;
}
diff --git a/src/security/sec-tpm-osx.hpp b/src/security/sec-tpm-osx.hpp
index f7d9959..6effb67 100644
--- a/src/security/sec-tpm-osx.hpp
+++ b/src/security/sec-tpm-osx.hpp
@@ -58,7 +58,7 @@
setInTerminal(bool inTerminal);
virtual bool
- getInTerminal();
+ getInTerminal() const;
virtual bool
isLocked();
diff --git a/src/security/sec-tpm.hpp b/src/security/sec-tpm.hpp
index 5a163c6..69b5f22 100644
--- a/src/security/sec-tpm.hpp
+++ b/src/security/sec-tpm.hpp
@@ -53,8 +53,8 @@
* You should be cautious when using this method, because remembering password is kind of
* dangerous.
*
- * @param password The password.
- * @param passwordLength The length of password.
+ * @param password The password
+ * @param passwordLength The length of password
*/
virtual void
setTpmPassword(const uint8_t* password, size_t passwordLength) = 0;
@@ -66,34 +66,28 @@
resetTpmPassword() = 0;
/**
- * @brief set inTerminal flag
+ * @brief Set inTerminal flag to @param inTerminal
*
* If the inTerminal flag is set, and password is not set, TPM may ask for password via terminal.
* inTerminal flag is set by default.
- *
- * @param inTerminal.
*/
virtual void
setInTerminal(bool inTerminal) = 0;
/**
- * @brief get inTerminal flag
- *
- * @return inTerminal flag.
+ * @brief Get value of inTerminal flag
*/
virtual bool
- getInTerminal() = 0;
+ getInTerminal() const = 0;
/**
- * @brief check if TPM is locked.
- *
- * @return true if locked, false otherwise
+ * @brief Check if TPM is locked
*/
virtual bool
isLocked() = 0;
/**
- * @brief Unlock the TPM.
+ * @brief Unlock the TPM
*
* @param password The password.
* @param passwordLength The password size. 0 indicates no password.
@@ -195,17 +189,17 @@
doesKeyExistInTpm(const Name& keyName, KeyClass keyClass) = 0;
/**
- * @brief Generate a random block.
+ * @brief Generate a random block
*
- * @param res The pointer to the generated block.
- * @param size The random block size.
- * @return true for success, otherwise false.
+ * @param res The pointer to the generated block
+ * @param size The random block size
+ * @return true for success, otherwise false
*/
virtual bool
generateRandomBlock(uint8_t* res, size_t size) = 0;
/**
- * @brief Add the application into the ACL of a particular key.
+ * @brief Add the application into the ACL of a particular key
*
* @param keyName the name of key
* @param keyClass the class of key, e.g. Private Key
@@ -216,29 +210,31 @@
addAppToAcl(const Name& keyName, KeyClass keyClass, const std::string& appPath, AclType acl) = 0;
/**
- * @brief Export a private key in PKCS#5 format.
+ * @brief Export a private key in PKCS#5 format
*
- * @param keyName The private key name.
- * @param password The password to encrypt the private key.
- * @return The private key info (in PKCS8 format) if exist.
- * @throws SecTpm::Error if private key cannot be exported.
+ * @param keyName The private key name
+ * @param password The password to encrypt the private key
+ * @return The private key info (in PKCS8 format) if exist
+ * @throws SecTpm::Error if private key cannot be exported
*/
ConstBufferPtr
exportPrivateKeyPkcs5FromTpm(const Name& keyName, const std::string& password);
/**
- * @brief Import a private key in PKCS#5 format.
+ * @brief Import a private key in PKCS#5 formatted @param buffer of size @param bufferSize
*
* Also recover the public key and installed it in TPM.
*
- * @param keyName The private key name.
- * @param key The encoded private key info.
- * @param password The password to encrypt the private key.
- * @return False if import fails.
+ * @param keyName The private key name
+ * @param buffer Pointer to the first byte of the buffer containing PKCS#5-encoded
+ * private key info
+ * @param bufferSize Size of the buffer
+ * @param password The password to encrypt the private key
+ * @return false if import fails
*/
bool
importPrivateKeyPkcs5IntoTpm(const Name& keyName,
- const uint8_t* buf, size_t size,
+ const uint8_t* buffer, size_t bufferSize,
const std::string& password);
protected:
@@ -252,25 +248,28 @@
exportPrivateKeyPkcs8FromTpm(const Name& keyName) = 0;
/**
- * @brief Import a private key in PKCS#8 format.
+ * @brief Import a private key from PKCS#8 formatted @param buffer of size @param bufferSize
*
- * @param keyName The private key name.
- * @param key The encoded private key info.
- * @return False if import fails.
+ * @param keyName The private key name.
+ * @param buffer Pointer to the first byte of the buffer containing PKCS#8-encoded
+ * private key info
+ * @param bufferSize Size of the buffer
+ * @return false if import fails
*/
virtual bool
- importPrivateKeyPkcs8IntoTpm(const Name& keyName, const uint8_t* buf, size_t size) = 0;
+ importPrivateKeyPkcs8IntoTpm(const Name& keyName, const uint8_t* buffer, size_t bufferSize) = 0;
/**
- * @brief Import a public key in PKCS#1 format.
+ * @brief Import a public key in PKCS#1 formatted @param buffer of size @param bufferSize
*
- * @param keyName The public key name.
- * @param key The encoded public key info.
- * @return False if import fails.
+ * @param keyName The public key name
+ * @param buffer Pointer to the first byte of the buffer containing PKCS#1-encoded
+ * private key info
+ * @param bufferSize Size of the buffer
+ * @return false if import fails
*/
virtual bool
- importPublicKeyPkcs1IntoTpm(const Name& keyName, const uint8_t* buf, size_t size) = 0;
-
+ importPublicKeyPkcs1IntoTpm(const Name& keyName, const uint8_t* buffer, size_t bufferSize) = 0;
/**
* @brief Get import/export password.
diff --git a/src/security/validator-regex.hpp b/src/security/validator-regex.hpp
index fd006c4..e0977a8 100644
--- a/src/security/validator-regex.hpp
+++ b/src/security/validator-regex.hpp
@@ -50,7 +50,7 @@
/**
* @brief Add a rule for data verification.
*
- * @param policy The verification rule
+ * @param rule The verification rule
*/
inline void
addDataVerificationRule(shared_ptr<SecRuleRelative> rule);
diff --git a/src/security/validator.hpp b/src/security/validator.hpp
index c6fac7a..88f1d63 100644
--- a/src/security/validator.hpp
+++ b/src/security/validator.hpp
@@ -184,7 +184,6 @@
static bool
verifySignature(const uint8_t* buf, const size_t size, const SignatureSha256& sig);
-
protected:
/**
* @brief Check the Data against policy and return the next validation step if necessary.
@@ -192,11 +191,11 @@
* If there is no next validation step, that validation MUST have been done.
* i.e., either onValidated or onValidationFailed callback is invoked.
*
- * @param data The Data to check.
- * @param nSteps The number of validation steps that have been done.
- * @param onDataValidated If the Data is validated, this calls onValidated(data).
- * @param onDataValidationFailed If validation fails, this calls onValidationFailed(data).
- * @param nextSteps On return, contains the next validation step.
+ * @param data The Data to check.
+ * @param nSteps The number of validation steps that have been done.
+ * @param onValidated If the Data is validated, this calls onValidated(data)
+ * @param onValidationFailed If validation fails, this calls onValidationFailed(data)
+ * @param nextSteps On return, contains the next validation step
*/
virtual void
checkPolicy(const Data& data,
@@ -212,11 +211,11 @@
* If there is no next validation step, that validation MUST have been done.
* i.e., either onValidated or onValidationFailed callback is invoked.
*
- * @param data The Interest to check.
- * @param nSteps The number of validation steps that have been done.
- * @param OnInterestValidated If the Interest is validated, this calls onValidated(data).
- * @param OnInterestValidationFailed If validation fails, this calls onValidationFailed(data).
- * @return the indication of next validation step, null if there is no further step.
+ * @param interest The Interest to check.
+ * @param nSteps The number of validation steps that have been done.
+ * @param onValidated If the Interest is validated, this calls onValidated(data)
+ * @param onValidationFailed If validation fails, this calls onValidationFailed(data)
+ * @param nextSteps On return, contains the next validation step
*/
virtual void
checkPolicy(const Interest& interest,