LibreOffice Module xmlsecurity (master) 1
pdfsignaturehelper.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 */
10
11#pragma once
12
13#include "xmlsecuritydllapi.h"
14
15#include <svl/sigstruct.hxx>
16
17namespace com::sun::star
18{
19namespace frame
20{
21class XModel;
22}
23namespace io
24{
25class XInputStream;
26}
27namespace security
28{
29class XCertificate;
30}
31namespace security
32{
33struct DocumentSignatureInformation;
34}
35namespace xml::crypto
36{
37class XSecurityEnvironment;
38}
39}
40class SvStream;
41
44{
46
47 css::uno::Reference<css::security::XCertificate> m_xCertificate;
49
50public:
52 bool ReadAndVerifySignature(const css::uno::Reference<css::io::XInputStream>& xInputStream);
53 bool ReadAndVerifySignatureSvStream(SvStream& rStream);
54 css::uno::Sequence<css::security::DocumentSignatureInformation>
55 GetDocumentSignatureInformations(
56 const css::uno::Reference<css::xml::crypto::XSecurityEnvironment>& xSecEnv) const;
57 SignatureInformations const& GetSignatureInformations() const;
58
60 sal_Int32 GetNewSecurityId() const;
62 void SetX509Certificate(const css::uno::Reference<css::security::XCertificate>& xCertificate);
64 void SetDescription(const OUString& rDescription);
66 bool Sign(const css::uno::Reference<css::frame::XModel>& xModel,
67 const css::uno::Reference<css::io::XInputStream>& xInputStream, bool bAdES);
69 static bool RemoveSignature(const css::uno::Reference<css::io::XInputStream>& xInputStream,
70 sal_uInt16 nPosition);
71};
72
73/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Handles signatures of a PDF file.
css::uno::Reference< css::security::XCertificate > m_xCertificate
SignatureInformations m_aSignatureInfos
::std::vector< SignatureInformation > SignatureInformations
#define XMLSECURITY_DLLPUBLIC