[API CHANGE] XDocumentDigitalSignatures: remove deprecated / unused functions
Some functions were already a stub and only aborted on calling them.
The *Package* functions were added in commit
c9ed2f359a
(INTEGRATION: CWS xmlsec08
(1.4.24); FILE MERGED 2005/02/22 13:07:19 mt 1.4.24.1: #i36682# Accept
separate Stream for signatures..., 2005-03-10), but it seems nobody
called them.
This also means that DocumentSignatureMode is now never set to
DocumentSignatureMode::Package, so remove that as well.
It seems to be unlikely that this non-published service was used by
3rd-party code, since it was specific to the needs of sfx2/ code, not
generic functionality that could be useful in other contexts.
Change-Id: Icfed9a0e6568f6eb21f9236901af01f1915bf2f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173313
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
parent
e6e7b8498a
commit
81d3aefd85
7 changed files with 1 additions and 153 deletions
|
@ -29,15 +29,6 @@ module com { module sun { module star { module security {
|
|||
|
||||
interface XDocumentDigitalSignatures : com::sun::star::uno::XInterface
|
||||
{
|
||||
/** signs the content of the document including text and pictures.
|
||||
|
||||
<p>Macros will not be signed.</p>
|
||||
|
||||
Deprecated, this synchronous version would block the UI till signing is in progress.
|
||||
*/
|
||||
boolean signDocumentContent( [in] ::com::sun::star::embed::XStorage xStorage,
|
||||
[in] ::com::sun::star::io::XStream xSignStream);
|
||||
|
||||
/** Signs the content of the document including text and pictures
|
||||
using the given XCertificate.
|
||||
|
||||
|
@ -75,15 +66,6 @@ interface XDocumentDigitalSignatures : com::sun::star::uno::XInterface
|
|||
*/
|
||||
string getDocumentContentSignatureDefaultStreamName();
|
||||
|
||||
/** signs the content of the Scripting including macros and basic dialogs
|
||||
|
||||
<p>The rest of document content will not be signed.</p>
|
||||
|
||||
Deprecated, this synchronous version would block the UI till signing is in progress.
|
||||
*/
|
||||
boolean signScriptingContent( [in] ::com::sun::star::embed::XStorage xStorage,
|
||||
[in] ::com::sun::star::io::XStream xSignStream);
|
||||
|
||||
/** checks for digital signatures and their status.
|
||||
|
||||
<p>Only Scripting content will be checked.</p>
|
||||
|
@ -103,33 +85,6 @@ interface XDocumentDigitalSignatures : com::sun::star::uno::XInterface
|
|||
*/
|
||||
string getScriptingContentSignatureDefaultStreamName();
|
||||
|
||||
/** signs the full Package, which means everything in the storage except the content of META-INF
|
||||
|
||||
Deprecated, this synchronous version would block the UI till signing is in progress.
|
||||
*/
|
||||
boolean signPackage( [in] ::com::sun::star::embed::XStorage Storage,
|
||||
[in] ::com::sun::star::io::XStream xSignStream);
|
||||
|
||||
/** checks for digital signatures and their status.
|
||||
|
||||
<p>Only Package content will be checked.</p>
|
||||
*/
|
||||
sequence< com::sun::star::security::DocumentSignatureInformation > verifyPackageSignatures(
|
||||
[in] ::com::sun::star::embed::XStorage Storage,
|
||||
[in] ::com::sun::star::io::XInputStream xSignInStream );
|
||||
|
||||
/** shows the digital signatures of the package
|
||||
*/
|
||||
void showPackageSignatures(
|
||||
[in] ::com::sun::star::embed::XStorage xStorage,
|
||||
[in] ::com::sun::star::io::XInputStream xSignInStream );
|
||||
|
||||
/** allows to get the default stream name for storing of the signature of
|
||||
the package.
|
||||
*/
|
||||
string getPackageSignatureDefaultStreamName();
|
||||
|
||||
|
||||
void showCertificate( [in] com::sun::star::security::XCertificate Certificate );
|
||||
|
||||
|
||||
|
@ -220,14 +175,6 @@ interface XDocumentDigitalSignatures : com::sun::star::uno::XInterface
|
|||
[in] ::com::sun::star::embed::XStorage xStorage,
|
||||
[in] ::com::sun::star::io::XStream xStream);
|
||||
|
||||
/** signs the full Package, which means everything in the storage except the content of META-INF with the provided certificate.
|
||||
|
||||
@since LibreOffice 7.0
|
||||
*/
|
||||
boolean signPackageWithCertificate([in] ::com::sun::star::security::XCertificate xCertificate,
|
||||
[in] ::com::sun::star::embed::XStorage xStorage,
|
||||
[in] ::com::sun::star::io::XStream xStream);
|
||||
|
||||
/** queries the user if they want to trust an untrusted certificate.
|
||||
|
||||
@since LibreOffice 24.8
|
||||
|
|
|
@ -53,7 +53,6 @@ private:
|
|||
|
||||
std::unique_ptr<weld::Label> m_xHintDocFT;
|
||||
std::unique_ptr<weld::Label> m_xHintBasicFT;
|
||||
std::unique_ptr<weld::Label> m_xHintPackageFT;
|
||||
std::unique_ptr<weld::TreeView> m_xSignaturesLB;
|
||||
std::unique_ptr<weld::Image> m_xSigsValidImg;
|
||||
std::unique_ptr<weld::Label> m_xSigsValidFI;
|
||||
|
|
|
@ -36,7 +36,6 @@ enum class DocumentSignatureMode
|
|||
{
|
||||
Content,
|
||||
Macros,
|
||||
Package
|
||||
};
|
||||
|
||||
enum class DocumentSignatureAlgorithm
|
||||
|
|
|
@ -121,9 +121,6 @@ public:
|
|||
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
|
||||
|
||||
// XDocumentDigitalSignatures
|
||||
sal_Bool SAL_CALL
|
||||
signDocumentContent(const css::uno::Reference<css::embed::XStorage>& xStorage,
|
||||
const css::uno::Reference<css::io::XStream>& xSignStream) override;
|
||||
sal_Bool SAL_CALL signSignatureLine(
|
||||
const css::uno::Reference<css::embed::XStorage>& Storage,
|
||||
const css::uno::Reference<css::io::XStream>& xSignStream, const OUString& aSignatureLineId,
|
||||
|
@ -139,9 +136,6 @@ public:
|
|||
const css::uno::Reference<css::embed::XStorage>& xStorage,
|
||||
const css::uno::Reference<css::io::XInputStream>& xSignInStream) override;
|
||||
OUString SAL_CALL getDocumentContentSignatureDefaultStreamName() override;
|
||||
sal_Bool SAL_CALL
|
||||
signScriptingContent(const css::uno::Reference<css::embed::XStorage>& xStorage,
|
||||
const css::uno::Reference<css::io::XStream>& xSignStream) override;
|
||||
css::uno::Sequence<css::security::DocumentSignatureInformation>
|
||||
SAL_CALL verifyScriptingContentSignatures(
|
||||
const css::uno::Reference<css::embed::XStorage>& xStorage,
|
||||
|
@ -150,17 +144,6 @@ public:
|
|||
const css::uno::Reference<css::embed::XStorage>& xStorage,
|
||||
const css::uno::Reference<css::io::XInputStream>& xSignInStream) override;
|
||||
OUString SAL_CALL getScriptingContentSignatureDefaultStreamName() override;
|
||||
sal_Bool SAL_CALL
|
||||
signPackage(const css::uno::Reference<css::embed::XStorage>& Storage,
|
||||
const css::uno::Reference<css::io::XStream>& xSignStream) override;
|
||||
css::uno::Sequence<css::security::DocumentSignatureInformation>
|
||||
SAL_CALL verifyPackageSignatures(
|
||||
const css::uno::Reference<css::embed::XStorage>& Storage,
|
||||
const css::uno::Reference<css::io::XInputStream>& xSignInStream) override;
|
||||
void SAL_CALL
|
||||
showPackageSignatures(const css::uno::Reference<css::embed::XStorage>& xStorage,
|
||||
const css::uno::Reference<css::io::XInputStream>& xSignInStream) override;
|
||||
OUString SAL_CALL getPackageSignatureDefaultStreamName() override;
|
||||
void SAL_CALL
|
||||
showCertificate(const css::uno::Reference<css::security::XCertificate>& Certificate) override;
|
||||
void SAL_CALL manageTrustedSources() override;
|
||||
|
@ -190,11 +173,6 @@ public:
|
|||
css::uno::Reference<css::embed::XStorage> const & xStoragexStorage,
|
||||
css::uno::Reference<css::io::XStream> const & xStream) override;
|
||||
|
||||
sal_Bool SAL_CALL signPackageWithCertificate(
|
||||
css::uno::Reference<css::security::XCertificate> const& xCertificate,
|
||||
css::uno::Reference<css::embed::XStorage> const& xStoragexStorage,
|
||||
css::uno::Reference<css::io::XStream> const& xStream) override;
|
||||
|
||||
sal_Bool SAL_CALL trustUntrustedCertificate(
|
||||
css::uno::Reference<css::security::XCertificate> const& xCertificate) override;
|
||||
|
||||
|
@ -286,13 +264,6 @@ DocumentDigitalSignatures::getSupportedServiceNames()
|
|||
return aRet;
|
||||
}
|
||||
|
||||
sal_Bool DocumentDigitalSignatures::signDocumentContent(
|
||||
const Reference< css::embed::XStorage >& /*rxStorage*/,
|
||||
const Reference< css::io::XStream >& /*xSignStream*/)
|
||||
{
|
||||
for (;;) { std::abort(); } // avoid "must return a value" warnings
|
||||
}
|
||||
|
||||
sal_Bool DocumentDigitalSignatures::signSignatureLine(
|
||||
const Reference<css::embed::XStorage>& rxStorage,
|
||||
const Reference<css::io::XStream>& xSignStream,
|
||||
|
@ -363,13 +334,6 @@ OUString DocumentDigitalSignatures::getDocumentContentSignatureDefaultStreamName
|
|||
return DocumentSignatureHelper::GetDocumentContentSignatureDefaultStreamName();
|
||||
}
|
||||
|
||||
sal_Bool DocumentDigitalSignatures::signScriptingContent(
|
||||
const Reference< css::embed::XStorage >& /*rxStorage*/,
|
||||
const Reference< css::io::XStream >& /*xSignStream*/ )
|
||||
{
|
||||
for (;;) { std::abort(); } // avoid "must return a value" warnings
|
||||
}
|
||||
|
||||
Sequence< css::security::DocumentSignatureInformation >
|
||||
DocumentDigitalSignatures::verifyScriptingContentSignatures(
|
||||
const Reference< css::embed::XStorage >& rxStorage,
|
||||
|
@ -392,37 +356,6 @@ OUString DocumentDigitalSignatures::getScriptingContentSignatureDefaultStreamNam
|
|||
return DocumentSignatureHelper::GetScriptingContentSignatureDefaultStreamName();
|
||||
}
|
||||
|
||||
|
||||
sal_Bool DocumentDigitalSignatures::signPackage(
|
||||
const Reference< css::embed::XStorage >& /*rxStorage*/,
|
||||
const Reference< css::io::XStream >& /*xSignStream*/ )
|
||||
{
|
||||
for (;;) { std::abort(); } // avoid "must return a value" warnings
|
||||
}
|
||||
|
||||
Sequence< css::security::DocumentSignatureInformation >
|
||||
DocumentDigitalSignatures::verifyPackageSignatures(
|
||||
const Reference< css::embed::XStorage >& rxStorage,
|
||||
const Reference< css::io::XInputStream >& xSignInStream )
|
||||
{
|
||||
OSL_ENSURE(!m_sODFVersion.isEmpty(),"DocumentDigitalSignatures: ODF Version not set, assuming minimum 1.2");
|
||||
return ImplVerifySignatures( rxStorage, xSignInStream, DocumentSignatureMode::Package );
|
||||
}
|
||||
|
||||
void DocumentDigitalSignatures::showPackageSignatures(
|
||||
const Reference< css::embed::XStorage >& rxStorage,
|
||||
const Reference< css::io::XInputStream >& xSignInStream )
|
||||
{
|
||||
OSL_ENSURE(!m_sODFVersion.isEmpty(),"DocumentDigitalSignatures: ODF Version not set, assuming minimum 1.2");
|
||||
ImplViewSignatures( rxStorage, xSignInStream, DocumentSignatureMode::Package, true );
|
||||
}
|
||||
|
||||
OUString DocumentDigitalSignatures::getPackageSignatureDefaultStreamName( )
|
||||
{
|
||||
return DocumentSignatureHelper::GetPackageSignatureDefaultStreamName();
|
||||
}
|
||||
|
||||
|
||||
void DocumentDigitalSignatures::ImplViewSignatures(
|
||||
const Reference< css::embed::XStorage >& rxStorage,
|
||||
const Reference< css::io::XInputStream >& xSignStream,
|
||||
|
@ -861,16 +794,6 @@ void DocumentDigitalSignatures::SetSignScriptingContent(
|
|||
mxScriptingSignStream = xScriptingSignStream;
|
||||
}
|
||||
|
||||
sal_Bool DocumentDigitalSignatures::signPackageWithCertificate(
|
||||
css::uno::Reference<css::security::XCertificate> const& xCertificate,
|
||||
css::uno::Reference<css::embed::XStorage> const& xStorage,
|
||||
css::uno::Reference<css::io::XStream> const& xStream)
|
||||
{
|
||||
uno::Reference<frame::XModel> xModel;
|
||||
return signWithCertificateImpl(xModel, xCertificate, xStorage, xStream,
|
||||
DocumentSignatureMode::Package);
|
||||
}
|
||||
|
||||
sal_Bool DocumentDigitalSignatures::trustUntrustedCertificate(
|
||||
css::uno::Reference<css::security::XCertificate> const& xCertificate)
|
||||
{
|
||||
|
|
|
@ -200,7 +200,6 @@ DigitalSignaturesDialog::DigitalSignaturesDialog(
|
|||
, m_bWarningShowSignMacro(false)
|
||||
, m_xHintDocFT(m_xBuilder->weld_label(u"dochint"_ustr))
|
||||
, m_xHintBasicFT(m_xBuilder->weld_label(u"macrohint"_ustr))
|
||||
, m_xHintPackageFT(m_xBuilder->weld_label(u"packagehint"_ustr))
|
||||
, m_xSignaturesLB(m_xBuilder->weld_tree_view(u"signatures"_ustr))
|
||||
, m_xSigsValidImg(m_xBuilder->weld_image(u"validimg"_ustr))
|
||||
, m_xSigsValidFI(m_xBuilder->weld_label(u"validft"_ustr))
|
||||
|
@ -256,9 +255,6 @@ DigitalSignaturesDialog::DigitalSignaturesDialog(
|
|||
case DocumentSignatureMode::Macros:
|
||||
m_xHintBasicFT->show();
|
||||
break;
|
||||
case DocumentSignatureMode::Package:
|
||||
m_xHintPackageFT->show();
|
||||
break;
|
||||
}
|
||||
|
||||
if (comphelper::LibreOfficeKit::isActive())
|
||||
|
|
|
@ -281,12 +281,6 @@ DocumentSignatureHelper::CreateElementList(
|
|||
}
|
||||
}
|
||||
break;
|
||||
case DocumentSignatureMode::Package:
|
||||
{
|
||||
// Everything except META-INF
|
||||
ImplFillElementList(aElements, rxStore, std::u16string_view(), true, mode);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return aElements;
|
||||
|
|
|
@ -369,17 +369,7 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="packagehint">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="no-show-all">True</property>
|
||||
<property name="label" translatable="yes" context="digitalsignaturesdialog|packagehint">The following have signed this package:</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<!-- n-columns=2 n-rows=4 -->
|
||||
|
|
Loading…
Reference in a new issue