Kaydet (Commit) 7ccf36d8 authored tarafından Caolán McNamara's avatar Caolán McNamara

split out inability to have nss as HAVE_FEATURE_NSS

Change-Id: Ie9fa0291117ba81529cc396f96f3f02c4a7e4d79
Reviewed-on: https://gerrit.libreoffice.org/32093Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 1d9c6042
......@@ -179,4 +179,9 @@
*/
#define HAVE_FEATURE_PDFIMPORT 0
/*
* Whether NSS is available
*/
#define HAVE_FEATURE_NSS 0
#endif
......@@ -9018,8 +9018,9 @@ AC_SUBST(TLS)
dnl ===================================================================
dnl Check for system NSS
dnl ===================================================================
if test $_os != iOS; then
if test $_os != iOS -a "$enable_fuzzers" != "yes"; then
libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 4.8])
AC_DEFINE(HAVE_FEATURE_NSS)
fi
if test "$with_system_nss" = "yes"; then
libo_MINGW_CHECK_DLL([libnspr4])
......
......@@ -48,10 +48,10 @@ core_factory_list = [
("libunordflo.a", "unordf_component_getFactory"),
("libunoxmllo.a", "unoxml_component_getFactory"),
("libutllo.a", "utl_component_getFactory"),
("libxmlsecurity.a", "xmlsecurity_component_getFactory", "#if !defined ANDROID && !defined IOS"),
("libxmlsecurity.a", "xmlsecurity_component_getFactory", "#if !defined ANDROID && HAVE_FEATURE_NSS"),
("libxoflo.a", "xof_component_getFactory"),
("libxolo.a", "xo_component_getFactory"),
("libxsec_xmlsec.a", "xsec_xmlsec_component_getFactory", "#if !defined ANDROID && !defined IOS"),
("libxsec_xmlsec.a", "xsec_xmlsec_component_getFactory", "#if !defined ANDROID && HAVE_FEATURE_NSS"),
("libxstor.a", "xstor_component_getFactory"),
("libvclcanvaslo.a", "vclcanvas_component_getFactory"),
("libmtfrendererlo.a", "mtfrenderer_component_getFactory"),
......
......@@ -72,7 +72,7 @@
#include "pdfwriter_impl.hxx"
#if !defined(ANDROID) && !defined(IOS) && !defined(_WIN32)
#if !defined(ANDROID) && HAVE_FEATURE_NSS && !defined(_WIN32)
// NSS headers for PDF signing
#include "nss.h"
#include "cert.h"
......@@ -99,6 +99,7 @@
#endif
#include <config_eot.h>
#include <config_features.h>
#if ENABLE_EOT
#include <libeot/libeot.h>
......@@ -108,7 +109,7 @@ using namespace vcl;
static bool g_bDebugDisableCompression = getenv("VCL_DEBUG_DISABLE_PDFCOMPRESSION");
#if !defined(ANDROID) && !defined(IOS)
#if !defined(ANDROID) && HAVE_FEATURE_NSS
// Is this length truly the maximum possible, or just a number that
// seemed large enough when the author tested this (with some type of
// certificates)? I suspect the latter.
......@@ -5184,7 +5185,7 @@ bool PDFWriterImpl::emitCatalog()
}
aLine.append( "\n]" );
#if !defined(ANDROID) && !defined(IOS)
#if !defined(ANDROID) && HAVE_FEATURE_NSS
if (m_nSignatureObject != -1)
aLine.append( "/SigFlags 3");
#endif
......@@ -5194,7 +5195,7 @@ bool PDFWriterImpl::emitCatalog()
aLine.append( " 0 R" );
// NeedAppearances must not be used if PDF is signed
if( m_bIsPDF_A1
#if !defined(ANDROID) && !defined(IOS)
#if !defined(ANDROID) && HAVE_FEATURE_NSS
|| ( m_nSignatureObject != -1 )
#endif
)
......@@ -5226,7 +5227,7 @@ bool PDFWriterImpl::emitCatalog()
return true;
}
#if !defined(ANDROID) && !defined(IOS)
#if !defined(ANDROID) && HAVE_FEATURE_NSS
bool PDFWriterImpl::emitSignature()
{
......@@ -5301,7 +5302,7 @@ bool PDFWriterImpl::emitSignature()
return true;
}
#if !defined(ANDROID) && !defined(IOS) && !defined(_WIN32)
#if !defined(ANDROID) && HAVE_FEATURE_NSS && !defined(_WIN32)
namespace {
#if 0
......@@ -6137,7 +6138,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime* time,
#endif
} // anonymous namespace
#endif // !defined(ANDROID) && !defined(IOS) && !defined(_WIN32)
#endif // !defined(ANDROID) && HAVE_FEATURE_NSS && !defined(_WIN32)
#ifdef _WIN32
......@@ -7269,7 +7270,7 @@ bool PDFWriterImpl::finalizeSignature()
#endif
}
#else // defined(ANDROID) || defined(IOS)
#else // defined(ANDROID) || !HAVE_FEATURE_NSS
bool PDFWriter::Sign(PDFSignContext& /*rContext*/)
{
// Not implemented.
......@@ -8054,7 +8055,7 @@ bool PDFWriterImpl::emit()
// needed for widget tab order
sortWidgets();
#if !defined(ANDROID) && !defined(IOS)
#if !defined(ANDROID) && HAVE_FEATURE_NSS
if( m_aContext.SignPDF )
{
// sign the document
......@@ -8070,7 +8071,7 @@ bool PDFWriterImpl::emit()
// emit catalog
CHECK_RETURN( emitCatalog() );
#if !defined(ANDROID) && !defined(IOS)
#if !defined(ANDROID) && HAVE_FEATURE_NSS
if (m_nSignatureObject != -1) // if document is signed, emit sigdict
{
if( !emitSignature() )
......@@ -8084,7 +8085,7 @@ bool PDFWriterImpl::emit()
// emit trailer
CHECK_RETURN( emitTrailer() );
#if !defined(ANDROID) && !defined(IOS)
#if !defined(ANDROID) && HAVE_FEATURE_NSS
if (m_nSignatureObject != -1) // finalize the signature
{
if( !finalizeSignature() )
......@@ -12994,7 +12995,7 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
createDefaultEditAppearance( rNewWidget, rEdit );
}
#if !defined(ANDROID) && !defined(IOS)
#if !defined(ANDROID) && HAVE_FEATURE_NSS
else if( rControl.getType() == PDFWriter::Signature)
{
sigHidden = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment