summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/vcl/pdfwriter.hxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 6b0da676108c..6b9c52920a53 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -23,6 +23,7 @@
#include <tools/gen.hxx>
#include <tools/color.hxx>
+#include <rtl/strbuf.hxx>
#include <vcl/dllapi.h>
#include <vcl/vclenum.hxx>
@@ -546,6 +547,29 @@ The following structure describes the permissions used in PDF security
DrawColor, DrawGreyscale
};
+ /// Holds all information to be able to fill a PDF signature template.
+ struct VCL_DLLPUBLIC PDFSignContext
+ {
+ /// DER-encoded certificate buffer.
+ sal_Int8* m_pDerEncoded;
+ /// Length of m_pDerEncoded.
+ sal_Int32 m_nDerEncoded;
+ /// Bytes before the signature itself.
+ void* m_pByteRange1;
+ /// Length of m_pByteRange1.
+ sal_Int32 m_nByteRange1;
+ /// Bytes after the signature itself.
+ void* m_pByteRange2;
+ /// Length of m_pByteRange2.
+ sal_Int32 m_nByteRange2;
+ OUString m_aSignTSA;
+ OUString m_aSignPassword;
+ /// The signature (in PKCS#7 format) is written into this buffer.
+ OStringBuffer& m_rCMSHexBuffer;
+
+ PDFSignContext(OStringBuffer& rCMSHexBuffer);
+ };
+
struct PDFWriterContext
{
/* must be a valid file: URL usable by osl */
@@ -1241,6 +1265,8 @@ The following structure describes the permissions used in PDF security
*/
void AddStream( const OUString& rMimeType, PDFOutputStream* pStream );
+ /// Fill a PDF signature template.
+ static bool Sign(PDFSignContext& rContext);
};
}