[poppler] poppler/SignatureHandler.cc poppler/SignatureHandler.h
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Mar 18 10:47:11 UTC 2023
poppler/SignatureHandler.cc | 8 ++++----
poppler/SignatureHandler.h | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit b39c8cd2bc7757b3c1c4756de345702f852a4706
Author: Sune Vuorela <sune at vuorela.dk>
Date: Fri Mar 17 14:24:51 2023 +0100
Add const to a few signature methods
diff --git a/poppler/SignatureHandler.cc b/poppler/SignatureHandler.cc
index 94240ef3..e28853e5 100644
--- a/poppler/SignatureHandler.cc
+++ b/poppler/SignatureHandler.cc
@@ -520,7 +520,7 @@ unsigned int SignatureHandler::digestLength(HashAlgorithm digestAlgId)
}
}
-std::string SignatureHandler::getSignerName()
+std::string SignatureHandler::getSignerName() const
{
if (!NSS_IsInitialized()) {
return {};
@@ -553,7 +553,7 @@ std::string SignatureHandler::getSignerName()
return name;
}
-std::string SignatureHandler::getSignerSubjectDN()
+std::string SignatureHandler::getSignerSubjectDN() const
{
if (!signing_cert && !CMSSignerInfo) {
return {};
@@ -575,7 +575,7 @@ std::string SignatureHandler::getSignerSubjectDN()
return activeCert->subjectName;
}
-HashAlgorithm SignatureHandler::getHashAlgorithm()
+HashAlgorithm SignatureHandler::getHashAlgorithm() const
{
if (hash_context && hash_context->hashobj) {
return ConvertHashTypeFromNss(hash_context->hashobj->type);
@@ -583,7 +583,7 @@ HashAlgorithm SignatureHandler::getHashAlgorithm()
return HashAlgorithm::Unknown;
}
-time_t SignatureHandler::getSigningTime()
+time_t SignatureHandler::getSigningTime() const
{
PRTime sTime; // time in microseconds since the epoch
diff --git a/poppler/SignatureHandler.h b/poppler/SignatureHandler.h
index 218000c4..9cf701f2 100644
--- a/poppler/SignatureHandler.h
+++ b/poppler/SignatureHandler.h
@@ -49,10 +49,10 @@ public:
SignatureHandler(unsigned char *p7, int p7_length);
SignatureHandler(const char *certNickname, HashAlgorithm digestAlgTag);
~SignatureHandler();
- time_t getSigningTime();
- std::string getSignerName();
- std::string getSignerSubjectDN();
- HashAlgorithm getHashAlgorithm();
+ time_t getSigningTime() const;
+ std::string getSignerName() const;
+ std::string getSignerSubjectDN() const;
+ HashAlgorithm getHashAlgorithm() const;
void updateHash(unsigned char *data_block, int data_len);
void restartHash();
SignatureValidationStatus validateSignature();
More information about the poppler
mailing list