Kaydet (Commit) 8dcb8c91 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:checkunusedparams in xmlsecurity

Change-Id: I9460e43264a8cbf3bb2aef83893288b767b2736f
Reviewed-on: https://gerrit.libreoffice.org/37284Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 034e9de0
...@@ -157,7 +157,7 @@ public: ...@@ -157,7 +157,7 @@ public:
void SetDateTime( sal_Int32 nSecurityId, const Date& rDate, const tools::Time& rTime ); void SetDateTime( sal_Int32 nSecurityId, const Date& rDate, const tools::Time& rTime );
void SetDescription(sal_Int32 nSecurityId, const OUString& rDescription); void SetDescription(sal_Int32 nSecurityId, const OUString& rDescription);
void AddForSigning( sal_Int32 securityId, const OUString& uri, const OUString& objectURL, bool bBinary, bool bXAdESCompliantIfODF ); void AddForSigning( sal_Int32 securityId, const OUString& uri, bool bBinary, bool bXAdESCompliantIfODF );
bool CreateAndWriteSignature( const css::uno::Reference< css::xml::sax::XDocumentHandler >& xDocumentHandler, bool bXAdESCompliantIfODF ); bool CreateAndWriteSignature( const css::uno::Reference< css::xml::sax::XDocumentHandler >& xDocumentHandler, bool bXAdESCompliantIfODF );
bool ReadAndVerifySignature( const css::uno::Reference< css::io::XInputStream >& xInputStream ); bool ReadAndVerifySignature( const css::uno::Reference< css::io::XInputStream >& xInputStream );
......
...@@ -352,7 +352,7 @@ public: ...@@ -352,7 +352,7 @@ public:
/* /*
* For signature generation * For signature generation
*/ */
void signAStream( sal_Int32 securityId, const OUString& uri, const OUString& objectURL, bool isBinary, bool bXAdESCompliantIfODF); void signAStream( sal_Int32 securityId, const OUString& uri, bool isBinary, bool bXAdESCompliantIfODF);
/** sets data that describes the certificate. /** sets data that describes the certificate.
......
...@@ -309,7 +309,7 @@ bool DocumentSignatureManager::add(const uno::Reference<security::XCertificate>& ...@@ -309,7 +309,7 @@ bool DocumentSignatureManager::add(const uno::Reference<security::XCertificate>&
for (sal_Int32 n = 0; n < nElements; n++) for (sal_Int32 n = 0; n < nElements; n++)
{ {
bool bBinaryMode = !isXML(aElements[n]); bool bBinaryMode = !isXML(aElements[n]);
maSignatureHelper.AddForSigning(nSecurityId, aElements[n], aElements[n], bBinaryMode, bAdESCompliant); maSignatureHelper.AddForSigning(nSecurityId, aElements[n], bBinaryMode, bAdESCompliant);
} }
maSignatureHelper.SetDateTime(nSecurityId, Date(Date::SYSTEM), tools::Time(tools::Time::SYSTEM)); maSignatureHelper.SetDateTime(nSecurityId, Date(Date::SYSTEM), tools::Time(tools::Time::SYSTEM));
......
...@@ -134,9 +134,9 @@ void XMLSignatureHelper::SetDescription(sal_Int32 nSecurityId, const OUString& r ...@@ -134,9 +134,9 @@ void XMLSignatureHelper::SetDescription(sal_Int32 nSecurityId, const OUString& r
mpXSecController->setDescription(nSecurityId, rDescription); mpXSecController->setDescription(nSecurityId, rDescription);
} }
void XMLSignatureHelper::AddForSigning( sal_Int32 nSecurityId, const OUString& uri, const OUString& objectURL, bool bBinary, bool bXAdESCompliantIfODF ) void XMLSignatureHelper::AddForSigning( sal_Int32 nSecurityId, const OUString& uri, bool bBinary, bool bXAdESCompliantIfODF )
{ {
mpXSecController->signAStream( nSecurityId, uri, objectURL, bBinary, bXAdESCompliantIfODF ); mpXSecController->signAStream( nSecurityId, uri, bBinary, bXAdESCompliantIfODF );
} }
......
...@@ -191,7 +191,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar ...@@ -191,7 +191,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
return xReferenceResolvedListener; return xReferenceResolvedListener;
} }
void XSecController::signAStream( sal_Int32 securityId, const OUString& uri, const OUString& /*objectURL*/, bool isBinary, bool bXAdESCompliantIfODF) void XSecController::signAStream( sal_Int32 securityId, const OUString& uri, bool isBinary, bool bXAdESCompliantIfODF)
{ {
const SignatureReferenceType type = isBinary ? SignatureReferenceType::BINARYSTREAM : SignatureReferenceType::XMLSTREAM; const SignatureReferenceType type = isBinary ? SignatureReferenceType::BINARYSTREAM : SignatureReferenceType::XMLSTREAM;
const sal_Int32 digestID = bXAdESCompliantIfODF ? cssxc::DigestID::SHA256 : cssxc::DigestID::SHA1; const sal_Int32 digestID = bXAdESCompliantIfODF ? cssxc::DigestID::SHA256 : cssxc::DigestID::SHA1;
......
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