summaryrefslogtreecommitdiffstats
path: root/include/svl/sigstruct.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-04-08 21:37:23 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2019-04-09 14:37:47 +0200
commitf82e3b03162bff8ecd0409be21744f2c2b2c9144 (patch)
treec3cc5678c72b8d37cab607201965d6ebe47fb29b /include/svl/sigstruct.hxx
parentResolves: tdf#123550 allow returning to TRISTATE_INDET (diff)
downloadcore-f82e3b03162bff8ecd0409be21744f2c2b2c9144.tar.gz
core-f82e3b03162bff8ecd0409be21744f2c2b2c9144.zip
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>
Diffstat (limited to 'include/svl/sigstruct.hxx')
-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 3498aff008fa..ceed929752ab 100644
--- a/include/svl/sigstruct.hxx
+++ b/include/svl/sigstruct.hxx
@@ -48,6 +48,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),
@@ -57,12 +59,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;
}
};