summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/vcl/pdfwriter.hxx6
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
2 files changed, 7 insertions, 1 deletions
diff --git a/vcl/inc/vcl/pdfwriter.hxx b/vcl/inc/vcl/pdfwriter.hxx
index 535c2b39034c..0e93cdd9c6a1 100644
--- a/vcl/inc/vcl/pdfwriter.hxx
+++ b/vcl/inc/vcl/pdfwriter.hxx
@@ -41,6 +41,7 @@
#include "com/sun/star/io/XOutputStream.hpp"
#include "com/sun/star/beans/XMaterialHolder.hpp"
+#include "com/sun/star/security/XCertificate.hpp"
#include "com/sun/star/lang/Locale.hpp"
#include <boost/scoped_ptr.hpp>
@@ -631,8 +632,10 @@ The following structure describes the permissions used in PDF security
bool SignPDF;
rtl::OUString SignLocation;
+ rtl::OUString SignPassword;
rtl::OUString SignReason;
rtl::OUString SignContact;
+ com::sun::star::uno::Reference< com::sun::star::security::XCertificate> SignCertificate;
com::sun::star::lang::Locale DocumentLocale; // defines the document default language
sal_uInt32 DPIx, DPIy; // how to handle MapMode( MAP_PIXEL )
@@ -668,7 +671,8 @@ The following structure describes the permissions used in PDF security
SignPDF( false ),
DPIx( 0 ),
DPIy( 0 ),
- ColorMode( PDFWriter::DrawColor )
+ ColorMode( PDFWriter::DrawColor ),
+ SignCertificate( 0 )
{}
};
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 64382716ab0a..16f2a0de08dd 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6175,6 +6175,8 @@ bool PDFWriterImpl::finalizeSignature()
}
// 3- create the PKCS#7 object using NSS
+ // use m_aContext.SignCertificate and m_aContext.SignPassword as certificate and private key password
+ // SignCertificate->getEncoded is DER encoded certificate
// 4- overwrite the PKCS7 content to the m_nSignatureContentOffset
CHECK_RETURN( (osl_File_E_None == osl_setFilePos( m_aFile, osl_Pos_Absolut, m_nSignatureContentOffset ) ) );