summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-04-08 21:37:23 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-03-29 16:46:58 +0200
commitfdd9cbbff99210b8892016ec8171e3520f4fa73a (patch)
tree2b2f0106ec9b47a9394b1bcd26cf2e702665a876 /include
parent858abc7fed2cb94e54ac0b8185372a9ec3728d68 (diff)
tdf#123747 xmlsecurity, ODF sign roundtrip: preserve invalid reference type
Only add the correct type to new signatures to avoid breaking the hash of old ones. (cherry picked from commit 8a9d8238bd8f903393ff1184aa37f8973c81e2ba) Conflicts: xmlsecurity/qa/unit/signing/signing.cxx Change-Id: I30f892b292f84a0575a3d4ef5ccf3eddbe0090ca Reviewed-on: https://gerrit.libreoffice.org/70451 Tested-by: Jenkins Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit f82e3b03162bff8ecd0409be21744f2c2b2c9144)
Diffstat (limited to 'include')
-rw-r--r--include/svl/sigstruct.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/svl/sigstruct.hxx b/include/svl/sigstruct.hxx
index 414e0cd88a41..a35043f54ec0 100644
--- a/include/svl/sigstruct.hxx
+++ b/include/svl/sigstruct.hxx
@@ -47,6 +47,8 @@ struct SignatureReferenceInformation
// For ODF: XAdES digests (SHA256) or the old SHA1, from css::xml::crypto::DigestID
sal_Int32 nDigestID;
OUString ouDigestValue;
+ /// Type of the reference: an URI (newer idSignedProperties references) or empty.
+ OUString ouType;
SignatureReferenceInformation() :
nType(SignatureReferenceType::SAMEDOCUMENT),
@@ -56,12 +58,13 @@ struct SignatureReferenceInformation
{
}
- SignatureReferenceInformation( SignatureReferenceType type, sal_Int32 digestID, const OUString& uri ) :
+ SignatureReferenceInformation( SignatureReferenceType type, sal_Int32 digestID, const OUString& uri, const OUString& rType ) :
SignatureReferenceInformation()
{
nType = type;
nDigestID = digestID;
ouURI = uri;
+ ouType = rType;
}
};