summaryrefslogtreecommitdiff
path: root/include/svl/sigstruct.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-04-08 21:37:23 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-04-09 09:11:48 +0200
commit8a9d8238bd8f903393ff1184aa37f8973c81e2ba (patch)
treebdd5830590a7067ebbf9d7a27e589099d80bda37 /include/svl/sigstruct.hxx
parenta39f2e1943c7092dd32bd1f4e480ee6da54a80e4 (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. Change-Id: I30f892b292f84a0575a3d4ef5ccf3eddbe0090ca Reviewed-on: https://gerrit.libreoffice.org/70424 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
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;
}
};