src: drop 'virtual' from functions marked 'final' or 'override'
Change-Id: Ieb6df864ab82f77b2bee9e83aa0bfa2005715950
Refs: #3857
diff --git a/src/security/command-interest-validator.hpp b/src/security/command-interest-validator.hpp
index e789f09..c377142 100644
--- a/src/security/command-interest-validator.hpp
+++ b/src/security/command-interest-validator.hpp
@@ -88,7 +88,6 @@
* and causes every command Interest to be processed as initial.
*/
time::nanoseconds timestampTtl = time::hours(1);
-
};
/** \brief error codes
@@ -129,7 +128,7 @@
*
* The validation request is rejected if any step in this procedure fails.
*/
- virtual void
+ void
checkPolicy(const Interest& interest, int nSteps,
const OnInterestValidated& accept,
const OnInterestValidationFailed& reject,
@@ -139,7 +138,7 @@
*
* The validation request is redirected to the inner validator.
*/
- virtual void
+ void
checkPolicy(const Data& data, int nSteps,
const OnDataValidated& accept,
const OnDataValidationFailed& reject,
diff --git a/src/security/conf/checker.hpp b/src/security/conf/checker.hpp
index c4ec3ca..0bed1a9 100644
--- a/src/security/conf/checker.hpp
+++ b/src/security/conf/checker.hpp
@@ -104,13 +104,13 @@
}
}
- virtual int8_t
+ int8_t
check(const Data& data) override
{
return check(data, data.getSignature());
}
- virtual int8_t
+ int8_t
check(const Interest& interest) override
{
try {
@@ -211,13 +211,13 @@
}
}
- virtual int8_t
+ int8_t
check(const Data& data) override
{
return check(data, data.getSignature());
}
- virtual int8_t
+ int8_t
check(const Interest& interest) override
{
try {
diff --git a/src/security/pib-memory.hpp b/src/security/pib-memory.hpp
index 1a859ce..50da3dd 100644
--- a/src/security/pib-memory.hpp
+++ b/src/security/pib-memory.hpp
@@ -51,76 +51,76 @@
public: // TpmLocator management
- virtual void
+ void
setTpmLocator(const std::string& tpmLocator) override;
- virtual std::string
+ std::string
getTpmLocator() const override;
public: // Identity management
- virtual bool
+ bool
hasIdentity(const Name& identity) const override;
- virtual void
+ void
addIdentity(const Name& identity) override;
- virtual void
+ void
removeIdentity(const Name& identity) override;
- virtual std::set<Name>
+ std::set<Name>
getIdentities() const override;
- virtual void
+ void
setDefaultIdentity(const Name& identityName) override;
- virtual Name
+ Name
getDefaultIdentity() const override;
public: // Key management
- virtual bool
+ bool
hasKey(const Name& identity, const name::Component& keyId) const override;
- virtual void
+ void
addKey(const Name& identity, const name::Component& keyId, const v1::PublicKey& publicKey) override;
- virtual void
+ void
removeKey(const Name& identity, const name::Component& keyId) override;
- virtual v1::PublicKey
+ v1::PublicKey
getKeyBits(const Name& identity, const name::Component& keyId) const override;
- virtual std::set<name::Component>
+ std::set<name::Component>
getKeysOfIdentity(const Name& identity) const override;
- virtual void
+ void
setDefaultKeyOfIdentity(const Name& identity, const name::Component& keyId) override;
- virtual name::Component
+ name::Component
getDefaultKeyOfIdentity(const Name& identity) const override;
public: // Certificate management
- virtual bool
+ bool
hasCertificate(const Name& certName) const override;
- virtual void
+ void
addCertificate(const v1::IdentityCertificate& certificate) override;
- virtual void
+ void
removeCertificate(const Name& certName) override;
- virtual v1::IdentityCertificate
+ v1::IdentityCertificate
getCertificate(const Name& certName) const override;
- virtual std::set<Name>
+ std::set<Name>
getCertificatesOfKey(const Name& identity, const name::Component& keyId) const override;
- virtual void
+ void
setDefaultCertificateOfKey(const Name& identity, const name::Component& keyId, const Name& certName) override;
- virtual v1::IdentityCertificate
+ v1::IdentityCertificate
getDefaultCertificateOfKey(const Name& identity, const name::Component& keyId) const override;
private: // Key management
diff --git a/src/security/pib-sqlite3.hpp b/src/security/pib-sqlite3.hpp
index f8665c5..9093957 100644
--- a/src/security/pib-sqlite3.hpp
+++ b/src/security/pib-sqlite3.hpp
@@ -60,77 +60,77 @@
public: // TpmLocator management
- virtual void
+ void
setTpmLocator(const std::string& tpmLocator) final;
- virtual std::string
+ std::string
getTpmLocator() const final;
public: // Identity management
- virtual bool
+ bool
hasIdentity(const Name& identity) const final;
- virtual void
+ void
addIdentity(const Name& identity) final;
- virtual void
+ void
removeIdentity(const Name& identity) final;
- virtual std::set<Name>
+ std::set<Name>
getIdentities() const final;
- virtual void
+ void
setDefaultIdentity(const Name& identityName) final;
- virtual Name
+ Name
getDefaultIdentity() const final;
public: // Key management
- virtual bool
+ bool
hasKey(const Name& identity, const name::Component& keyId) const final;
- virtual void
+ void
addKey(const Name& identity, const name::Component& keyId, const v1::PublicKey& publicKey) final;
- virtual void
+ void
removeKey(const Name& identity, const name::Component& keyId) final;
- virtual v1::PublicKey
+ v1::PublicKey
getKeyBits(const Name& identity, const name::Component& keyId) const final;
- virtual std::set<name::Component>
+ std::set<name::Component>
getKeysOfIdentity(const Name& identity) const final;
- virtual void
+ void
setDefaultKeyOfIdentity(const Name& identity, const name::Component& keyId) final;
- virtual name::Component
+ name::Component
getDefaultKeyOfIdentity(const Name& identity) const final;
public: // Certificate Management
- virtual bool
+ bool
hasCertificate(const Name& certName) const final;
- virtual void
+ void
addCertificate(const v1::IdentityCertificate& certificate) final;
- virtual void
+ void
removeCertificate(const Name& certName) final;
- virtual v1::IdentityCertificate
+ v1::IdentityCertificate
getCertificate(const Name& certName) const final;
- virtual std::set<Name>
+ std::set<Name>
getCertificatesOfKey(const Name& identity, const name::Component& keyId) const final;
- virtual void
+ void
setDefaultCertificateOfKey(const Name& identity, const name::Component& keyId,
const Name& certName) final;
- virtual v1::IdentityCertificate
+ v1::IdentityCertificate
getDefaultCertificateOfKey(const Name& identity, const name::Component& keyId) const final;
private:
diff --git a/src/security/transform/base64-decode.hpp b/src/security/transform/base64-decode.hpp
index cfd5876..0ef0a46 100644
--- a/src/security/transform/base64-decode.hpp
+++ b/src/security/transform/base64-decode.hpp
@@ -49,7 +49,7 @@
/**
* @brief Read partial transformation results into output buffer and write them into next module.
*/
- virtual void
+ void
preTransform() final;
/**
@@ -57,7 +57,7 @@
*
* @return number of bytes that have been accepted by the converter
*/
- virtual size_t
+ size_t
convert(const uint8_t* buf, size_t size) final;
/**
@@ -65,7 +65,7 @@
*
* This method with read all decoding results from the converter and write them into next module.
*/
- virtual void
+ void
finalize() final;
/**
diff --git a/src/security/transform/base64-encode.hpp b/src/security/transform/base64-encode.hpp
index ac9c664..7e9d99d 100644
--- a/src/security/transform/base64-encode.hpp
+++ b/src/security/transform/base64-encode.hpp
@@ -46,14 +46,14 @@
/**
* @brief Read partial transformation result (if exists) from BIO
*/
- virtual void
+ void
preTransform() final;
/**
- * @brief Encode @data into base64 format.
+ * @brief Encode @p data into base64 format.
* @return The number of input bytes that have been accepted by the converter.
*/
- virtual size_t
+ size_t
convert(const uint8_t* data, size_t dataLen) final;
/**
@@ -61,7 +61,7 @@
*
* This method with read all encoding results from the converter and write them into next module.
*/
- virtual void
+ void
finalize() final;
/**
diff --git a/src/security/transform/block-cipher.hpp b/src/security/transform/block-cipher.hpp
index dd67858..885bd43 100644
--- a/src/security/transform/block-cipher.hpp
+++ b/src/security/transform/block-cipher.hpp
@@ -56,7 +56,7 @@
/**
* @brief Read partial transformation result (if exists) from BIO
*/
- virtual void
+ void
preTransform() final;
/**
@@ -64,13 +64,13 @@
*
* @return number of bytes that are actually accepted
*/
- virtual size_t
+ size_t
convert(const uint8_t* data, size_t dataLen) final;
/**
* @brief Finalize the encryption
*/
- virtual void
+ void
finalize() final;
/**
diff --git a/src/security/transform/bool-sink.hpp b/src/security/transform/bool-sink.hpp
index 12e62c9..d7d02e3 100644
--- a/src/security/transform/bool-sink.hpp
+++ b/src/security/transform/bool-sink.hpp
@@ -49,13 +49,13 @@
*
* @return the same value as @p size.
*/
- virtual size_t
+ size_t
doWrite(const uint8_t* buf, size_t size) final;
/**
* @brief Finalize sink processing
*/
- virtual void
+ void
doEnd() final;
private:
diff --git a/src/security/transform/buffer-source.hpp b/src/security/transform/buffer-source.hpp
index 0833a0f..c091d98 100644
--- a/src/security/transform/buffer-source.hpp
+++ b/src/security/transform/buffer-source.hpp
@@ -62,7 +62,7 @@
/**
* @brief Write the whole buffer into the next module.
*/
- virtual void
+ void
doPump() final;
private:
diff --git a/src/security/transform/digest-filter.hpp b/src/security/transform/digest-filter.hpp
index 935899f..952c4a7 100644
--- a/src/security/transform/digest-filter.hpp
+++ b/src/security/transform/digest-filter.hpp
@@ -47,13 +47,13 @@
*
* @return The number of bytes that have been accepted
*/
- virtual size_t
+ size_t
convert(const uint8_t* buf, size_t size) final;
/**
* @brief Finalize digest calculation and write the digest into next module.
*/
- virtual void
+ void
finalize() final;
private:
diff --git a/src/security/transform/hex-decode.hpp b/src/security/transform/hex-decode.hpp
index 77d477d..5601ca4 100644
--- a/src/security/transform/hex-decode.hpp
+++ b/src/security/transform/hex-decode.hpp
@@ -50,13 +50,13 @@
*
* @return number of input bytes that are accepted
*/
- virtual size_t
+ size_t
convert(const uint8_t* buf, size_t size) final;
/**
* @throws Error if pending byte exists.
*/
- virtual void
+ void
finalize() final;
/**
diff --git a/src/security/transform/hex-encode.hpp b/src/security/transform/hex-encode.hpp
index 95fc6e8..14a9b41 100644
--- a/src/security/transform/hex-encode.hpp
+++ b/src/security/transform/hex-encode.hpp
@@ -51,7 +51,7 @@
*
* @return The number of input bytes that have been accepted by the converter.
*/
- virtual size_t
+ size_t
convert(const uint8_t* data, size_t dataLen) final;
/**
diff --git a/src/security/transform/hmac-filter.hpp b/src/security/transform/hmac-filter.hpp
index 5409952..0cec1fd 100644
--- a/src/security/transform/hmac-filter.hpp
+++ b/src/security/transform/hmac-filter.hpp
@@ -48,13 +48,13 @@
*
* @return The number of bytes that are actually accepted
*/
- virtual size_t
+ size_t
convert(const uint8_t* buf, size_t size) final;
/**
* @brief Finalize HMAC calculation and write the HMAC into next module.
*/
- virtual void
+ void
finalize() final;
private:
diff --git a/src/security/transform/signer-filter.hpp b/src/security/transform/signer-filter.hpp
index 8db11f3..dc4ffff 100644
--- a/src/security/transform/signer-filter.hpp
+++ b/src/security/transform/signer-filter.hpp
@@ -47,13 +47,13 @@
*
* @return The number of bytes that are actually accepted
*/
- virtual size_t
+ size_t
convert(const uint8_t* buf, size_t size) final;
/**
* @brief Finalize signing and write the signature into next module.
*/
- virtual void
+ void
finalize() final;
private:
diff --git a/src/security/transform/step-source.hpp b/src/security/transform/step-source.hpp
index 76388f7..a017fc6 100644
--- a/src/security/transform/step-source.hpp
+++ b/src/security/transform/step-source.hpp
@@ -68,9 +68,8 @@
*
* use write() and end() method explicitly to input data.
*/
- virtual void
+ void
doPump() final;
-
};
typedef StepSource stepSource;
diff --git a/src/security/transform/stream-sink.hpp b/src/security/transform/stream-sink.hpp
index ed41cbd..f384dc4 100644
--- a/src/security/transform/stream-sink.hpp
+++ b/src/security/transform/stream-sink.hpp
@@ -47,13 +47,13 @@
*
* @return number of bytes that have been written into the stream
*/
- virtual size_t
+ size_t
doWrite(const uint8_t* buf, size_t size) final;
/**
* @brief Finalize sink processing
*/
- virtual void
+ void
doEnd() final;
private:
diff --git a/src/security/transform/stream-source.hpp b/src/security/transform/stream-source.hpp
index b818fe7..5dcefdd 100644
--- a/src/security/transform/stream-source.hpp
+++ b/src/security/transform/stream-source.hpp
@@ -49,7 +49,7 @@
/**
* @brief Read bytes from the input stream until EOF is reached and write them into the next module.
*/
- virtual void
+ void
doPump() final;
public:
diff --git a/src/security/transform/strip-space.hpp b/src/security/transform/strip-space.hpp
index 7cc4dc8..d0e50aa 100644
--- a/src/security/transform/strip-space.hpp
+++ b/src/security/transform/strip-space.hpp
@@ -44,7 +44,7 @@
StripSpace(const char* whitespaces = DEFAULT_WHITESPACES);
private:
- virtual size_t
+ size_t
convert(const uint8_t* buf, size_t buflen) final;
private:
diff --git a/src/security/transform/transform-base.hpp b/src/security/transform/transform-base.hpp
index 94fd43c..a06f0b1 100644
--- a/src/security/transform/transform-base.hpp
+++ b/src/security/transform/transform-base.hpp
@@ -222,7 +222,7 @@
/**
* @brief Abstraction of data processing in an intermediate module
*/
- virtual size_t
+ size_t
doWrite(const uint8_t* data, size_t dataLen) final;
/**
@@ -230,7 +230,7 @@
*
* This method will not return until all transformation result is written into next module
*/
- virtual void
+ void
doEnd() final;
/**
diff --git a/src/security/transform/verifier-filter.hpp b/src/security/transform/verifier-filter.hpp
index ee69f03..7fed9fc 100644
--- a/src/security/transform/verifier-filter.hpp
+++ b/src/security/transform/verifier-filter.hpp
@@ -49,13 +49,13 @@
*
* @return The number of bytes that are actually written
*/
- virtual size_t
+ size_t
convert(const uint8_t* buf, size_t size) final;
/**
* @brief Finalize verification and write the result (single byte) into next module.
*/
- virtual void
+ void
finalize() final;
private:
diff --git a/src/security/validator-config.hpp b/src/security/validator-config.hpp
index a477325..2a5fac9 100644
--- a/src/security/validator-config.hpp
+++ b/src/security/validator-config.hpp
@@ -90,14 +90,14 @@
isEmpty();
protected:
- virtual void
+ void
checkPolicy(const Data& data,
int nSteps,
const OnDataValidated& onValidated,
const OnDataValidationFailed& onValidationFailed,
std::vector<shared_ptr<ValidationRequest>>& nextSteps) override;
- virtual void
+ void
checkPolicy(const Interest& interest,
int nSteps,
const OnInterestValidated& onValidated,