23#include <rtl/ustring.hxx>
30#include <com/sun/star/security/XCertificate.hpp>
31#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
41 namespace embed {
class XStorage; }
66 css::uno::Reference< css::uno::XComponentContext >
mxCtx;
81 void StartVerifySignatureElement();
86 void SetStorage(
const css::uno::Reference < css::embed::XStorage >& rxStorage, std::u16string_view sODFVersion );
101 std::vector<css::uno::Reference<css::security::XCertificate>>
102 CheckAndUpdateSignatureInformation(
103 css::uno::Reference<css::xml::crypto::XSecurityEnvironment>
const& xSecEnv,
107 void StartMission(
const css::uno::Reference<css::xml::crypto::XXMLSecurityContext>& xSecurityContext);
109 sal_Int32 GetNewSecurityId();
128 void SetX509Certificate(sal_Int32 nSecurityId,
const OUString& ouX509IssuerName,
129 const OUString& ouX509SerialNumber,
const OUString& ouX509Cert,
const OUString& ouX509CertDigest,
132 void AddEncapsulatedX509Certificate(
const OUString& ouEncapsulatedX509Certificate);
134 void SetGpgCertificate(sal_Int32 nSecurityId,
const OUString& ouGpgCertDigest,
135 const OUString& ouGpgCert,
const OUString& ouGpgOwner);
137 void SetDateTime( sal_Int32 nSecurityId,
const DateTime& rDateTime );
138 void SetDescription(sal_Int32 nSecurityId,
const OUString& rDescription);
139 void SetSignatureLineId(sal_Int32 nSecurityId,
const OUString& rSignatureLineId);
141 SetSignatureLineValidGraphic(sal_Int32 nSecurityId,
142 const css::uno::Reference<css::graphic::XGraphic>& xValidGraphic);
143 void SetSignatureLineInvalidGraphic(
144 sal_Int32 nSecurityId,
const css::uno::Reference<css::graphic::XGraphic>& xInvalidGraphic);
146 void AddForSigning( sal_Int32 securityId,
const OUString& uri,
bool bBinary,
bool bXAdESCompliantIfODF );
147 void CreateAndWriteSignature(
const css::uno::Reference< css::xml::sax::XDocumentHandler >& xDocumentHandler,
bool bXAdESCompliantIfODF );
148 bool ReadAndVerifySignature(
const css::uno::Reference< css::io::XInputStream >& xInputStream );
153 css::uno::Reference< css::xml::sax::XWriter> CreateDocumentHandlerWithHeader(
const css::uno::Reference< css::io::XOutputStream >& xOutputStream );
154 static void CloseDocumentHandler(
const css::uno::Reference< css::xml::sax::XDocumentHandler>& xDocumentHandler );
155 static void ExportSignature(
156 const css::uno::Reference< css::xml::sax::XDocumentHandler >& xDocumentHandler,
158 bool bXAdESCompliantIfODF );
161 bool ReadAndVerifySignatureStorage(
const css::uno::Reference<css::embed::XStorage>& xStorage,
bool bCacheLastSignature =
true);
163 bool ReadAndVerifySignatureStorageStream(
const css::uno::Reference<css::io::XInputStream>& xInputStream);
165 void EnsureSignaturesRelation(
const css::uno::Reference<css::embed::XStorage>& xStorage,
bool bAdd);
167 void ExportSignatureRelations(
const css::uno::Reference<css::embed::XStorage>& xStorage,
int nSignatureCount);
169 void CreateAndWriteOOXMLSignature(
const css::uno::Reference<css::embed::XStorage>& xRootStorage,
const css::uno::Reference<css::embed::XStorage>& xSignatureStorage,
int nSignatureIndex);
171 void ExportOOXMLSignature(
const css::uno::Reference<css::embed::XStorage>& xRootStorage,
const css::uno::Reference<css::embed::XStorage>& xSignatureStorage,
const SignatureInformation& rInformation,
int nSignatureIndex);
173 void ExportSignatureContentTypes(
const css::uno::Reference<css::embed::XStorage>& xStorage,
int nSignatureCount);
rtl::Reference< XSecController > mpXSecController
css::uno::Reference< css::uno::XComponentContext > mxCtx
XMLSignatureHelper(const css::uno::Reference< css::uno::XComponentContext > &mrCtx)
XMLSignatureHelper(const XMLSignatureHelper &)=delete
rtl::Reference< UriBindingHelper > mxUriBinding
Link< LinkParamNone *, bool > maStartVerifySignatureHdl
::std::vector< SignatureInformation > SignatureInformations
#define XMLSECURITY_DLLPUBLIC