summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/inc/biginteger.hxx5
-rw-r--r--xmlsecurity/inc/xmlsec/xmlstreamio.hxx19
-rw-r--r--xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx4
-rw-r--r--xmlsecurity/source/framework/buffernode.hxx34
-rw-r--r--xmlsecurity/source/framework/elementmark.hxx10
-rw-r--r--xmlsecurity/source/gpg/CipherContext.cxx5
-rw-r--r--xmlsecurity/source/gpg/CipherContext.hxx8
-rw-r--r--xmlsecurity/source/gpg/DigestContext.cxx8
-rw-r--r--xmlsecurity/source/gpg/DigestContext.hxx6
-rw-r--r--xmlsecurity/source/gpg/SEInitializer.cxx29
-rw-r--r--xmlsecurity/source/gpg/XMLSecurityContext.cxx30
-rw-r--r--xmlsecurity/source/xmlsec/certificateextension_certextn.hxx7
-rw-r--r--xmlsecurity/source/xmlsec/nss/secerror.hxx6
13 files changed, 89 insertions, 82 deletions
diff --git a/xmlsecurity/inc/biginteger.hxx b/xmlsecurity/inc/biginteger.hxx
index 2e21094fab00..f0d1055ed176 100644
--- a/xmlsecurity/inc/biginteger.hxx
+++ b/xmlsecurity/inc/biginteger.hxx
@@ -28,8 +28,9 @@
namespace xmlsecurity
{
-XSECXMLSEC_DLLPUBLIC OUString bigIntegerToNumericString( const css::uno::Sequence< sal_Int8 >& serial );
-XSECXMLSEC_DLLPUBLIC css::uno::Sequence< sal_Int8 > numericStringToBigInteger ( const OUString& serialNumber );
+XSECXMLSEC_DLLPUBLIC OUString bigIntegerToNumericString(const css::uno::Sequence<sal_Int8>& serial);
+XSECXMLSEC_DLLPUBLIC css::uno::Sequence<sal_Int8>
+numericStringToBigInteger(const OUString& serialNumber);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/inc/xmlsec/xmlstreamio.hxx b/xmlsecurity/inc/xmlsec/xmlstreamio.hxx
index 26f8128db263..c78b717f3964 100644
--- a/xmlsecurity/inc/xmlsec/xmlstreamio.hxx
+++ b/xmlsecurity/inc/xmlsec/xmlstreamio.hxx
@@ -22,15 +22,20 @@
#include <xsecxmlsecdllapi.h>
-namespace com::sun::star::xml::crypto { class XUriBinding; }
-namespace com::sun::star::uno { template <typename > class Reference; }
+namespace com::sun::star::xml::crypto
+{
+class XUriBinding;
+}
+namespace com::sun::star::uno
+{
+template <typename> class Reference;
+}
-int xmlEnableStreamInputCallbacks() ;
-void xmlDisableStreamInputCallbacks() ;
+int xmlEnableStreamInputCallbacks();
+void xmlDisableStreamInputCallbacks();
int xmlRegisterStreamInputCallbacks(
- css::uno::Reference< css::xml::crypto::XUriBinding > const & aUriBinding
-);
-int xmlUnregisterStreamInputCallbacks() ;
+ css::uno::Reference<css::xml::crypto::XUriBinding> const& aUriBinding);
+int xmlUnregisterStreamInputCallbacks();
#endif // INCLUDED_XMLSECURITY_SOURCE_XMLSEC_XMLSTREAMIO_HXX
diff --git a/xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx b/xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx
index f7f47c8daaf6..41d77079a76b 100644
--- a/xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx
+++ b/xmlsecurity/qa/unit/xmlsecurity-dialogs-test.cxx
@@ -36,9 +36,7 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-XmlsecurityDialogsTest::XmlsecurityDialogsTest()
-{
-}
+XmlsecurityDialogsTest::XmlsecurityDialogsTest() {}
void XmlsecurityDialogsTest::registerKnownDialogsByID(mapType& /*rKnownDialogs*/)
{
diff --git a/xmlsecurity/source/framework/buffernode.hxx b/xmlsecurity/source/framework/buffernode.hxx
index e3cabd97e955..17fd4302f7ad 100644
--- a/xmlsecurity/source/framework/buffernode.hxx
+++ b/xmlsecurity/source/framework/buffernode.hxx
@@ -25,7 +25,10 @@
#include <memory>
#include <vector>
-namespace com::sun::star::xml::wrapper { class XXMLElementWrapper; }
+namespace com::sun::star::xml::wrapper
+{
+class XXMLElementWrapper;
+}
class ElementMark;
class ElementCollector;
@@ -51,10 +54,10 @@ private:
BufferNode* m_pParent;
/* all child BufferNodes */
- std::vector< std::unique_ptr<BufferNode> > m_vChildren;
+ std::vector<std::unique_ptr<BufferNode>> m_vChildren;
/* all ElementCollector holding this BufferNode */
- std::vector< const ElementCollector* > m_vElementCollectors;
+ std::vector<const ElementCollector*> m_vElementCollectors;
/*
* the blocker holding this BufferNode, one BufferNode can have one
@@ -69,7 +72,7 @@ private:
bool m_bAllReceived;
/* the XMLElementWrapper of the buffered element */
- css::uno::Reference< css::xml::wrapper::XXMLElementWrapper > m_xXMLElement;
+ css::uno::Reference<css::xml::wrapper::XXMLElementWrapper> m_xXMLElement;
private:
bool isECInSubTreeIncluded(sal_Int32 nIgnoredSecurityId) const;
@@ -79,34 +82,37 @@ private:
public:
explicit BufferNode(
- const css::uno::Reference< css::xml::wrapper::XXMLElementWrapper >& xXMLElement);
+ const css::uno::Reference<css::xml::wrapper::XXMLElementWrapper>& xXMLElement);
bool isECOfBeforeModifyIncluded(sal_Int32 nIgnoredSecurityId) const;
- void setReceivedAll();
- bool isAllReceived() const { return m_bAllReceived;}
+ void setReceivedAll();
+ bool isAllReceived() const { return m_bAllReceived; }
void addElementCollector(const ElementCollector* pElementCollector);
void removeElementCollector(const ElementCollector* pElementCollector);
- ElementMark* getBlocker() const { return m_pBlocker;}
+ ElementMark* getBlocker() const { return m_pBlocker; }
void setBlocker(const ElementMark* pBlocker);
OUString printChildren() const;
bool hasAnything() const;
bool hasChildren() const;
- std::vector< std::unique_ptr< BufferNode> > const & getChildren() const;
- std::vector< std::unique_ptr< BufferNode> > releaseChildren();
+ std::vector<std::unique_ptr<BufferNode>> const& getChildren() const;
+ std::vector<std::unique_ptr<BufferNode>> releaseChildren();
const BufferNode* getFirstChild() const;
void addChild(std::unique_ptr<BufferNode> pChild, sal_Int32 nPosition);
void addChild(std::unique_ptr<BufferNode> pChild);
void removeChild(const BufferNode* pChild);
sal_Int32 indexOfChild(const BufferNode* pChild) const;
- const BufferNode* getParent() const { return m_pParent;}
+ const BufferNode* getParent() const { return m_pParent; }
void setParent(const BufferNode* pParent);
const BufferNode* getNextSibling() const;
const BufferNode* isAncestor(const BufferNode* pDescendant) const;
bool isPrevious(const BufferNode* pFollowing) const;
const BufferNode* getNextNodeByTreeOrder() const;
- const css::uno::Reference< css::xml::wrapper::XXMLElementWrapper >& getXMLElement() const { return m_xXMLElement;}
- void setXMLElement(const css::uno::Reference<
- css::xml::wrapper::XXMLElementWrapper >& xXMLElement);
+ const css::uno::Reference<css::xml::wrapper::XXMLElementWrapper>& getXMLElement() const
+ {
+ return m_xXMLElement;
+ }
+ void
+ setXMLElement(const css::uno::Reference<css::xml::wrapper::XXMLElementWrapper>& xXMLElement);
void notifyBranch();
void elementCollectorNotify();
};
diff --git a/xmlsecurity/source/framework/elementmark.hxx b/xmlsecurity/source/framework/elementmark.hxx
index e035cc1a58c8..a353b15c2832 100644
--- a/xmlsecurity/source/framework/elementmark.hxx
+++ b/xmlsecurity/source/framework/elementmark.hxx
@@ -55,14 +55,14 @@ protected:
public:
ElementMark(sal_Int32 nSecurityId, sal_Int32 nBufferId);
- virtual ~ElementMark() {};
+ virtual ~ElementMark(){};
- BufferNode* getBufferNode() const { return m_pBufferNode;}
+ BufferNode* getBufferNode() const { return m_pBufferNode; }
void setBufferNode(const BufferNode* pBufferNode);
- sal_Int32 getSecurityId() const { return m_nSecurityId;}
+ sal_Int32 getSecurityId() const { return m_nSecurityId; }
void setSecurityId(sal_Int32 nSecurityId);
- css::xml::crypto::sax::ElementMarkType getType() const { return m_type;}
- sal_Int32 getBufferId() const { return m_nBufferId;}
+ css::xml::crypto::sax::ElementMarkType getType() const { return m_type; }
+ sal_Int32 getBufferId() const { return m_nBufferId; }
};
#endif
diff --git a/xmlsecurity/source/gpg/CipherContext.cxx b/xmlsecurity/source/gpg/CipherContext.cxx
index 1b16c909d8ee..291db0ba66c8 100644
--- a/xmlsecurity/source/gpg/CipherContext.cxx
+++ b/xmlsecurity/source/gpg/CipherContext.cxx
@@ -13,12 +13,13 @@ using namespace css;
using namespace css::uno;
using namespace css::lang;
-Sequence< sal_Int8 > SAL_CALL CipherContext::convertWithCipherContext( const Sequence< sal_Int8 >& /*aData*/ )
+Sequence<sal_Int8>
+ SAL_CALL CipherContext::convertWithCipherContext(const Sequence<sal_Int8>& /*aData*/)
{
return Sequence<sal_Int8>();
}
-uno::Sequence< sal_Int8 > SAL_CALL CipherContext::finalizeCipherContextAndDispose()
+uno::Sequence<sal_Int8> SAL_CALL CipherContext::finalizeCipherContextAndDispose()
{
return Sequence<sal_Int8>();
}
diff --git a/xmlsecurity/source/gpg/CipherContext.hxx b/xmlsecurity/source/gpg/CipherContext.hxx
index 4e4e04cce917..b4d79011bc73 100644
--- a/xmlsecurity/source/gpg/CipherContext.hxx
+++ b/xmlsecurity/source/gpg/CipherContext.hxx
@@ -14,14 +14,14 @@
#include <cppuhelper/implbase.hxx>
-class CipherContext : public cppu::WeakImplHelper< css::xml::crypto::XCipherContext >
+class CipherContext : public cppu::WeakImplHelper<css::xml::crypto::XCipherContext>
{
private:
-
public:
// XCipherContext
- virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL convertWithCipherContext(const css::uno::Sequence< ::sal_Int8 >& aData) override;
- virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL finalizeCipherContextAndDispose() override;
+ virtual css::uno::Sequence<::sal_Int8>
+ SAL_CALL convertWithCipherContext(const css::uno::Sequence<::sal_Int8>& aData) override;
+ virtual css::uno::Sequence<::sal_Int8> SAL_CALL finalizeCipherContextAndDispose() override;
};
#endif
diff --git a/xmlsecurity/source/gpg/DigestContext.cxx b/xmlsecurity/source/gpg/DigestContext.cxx
index a1bb22ad850a..4864191bb85e 100644
--- a/xmlsecurity/source/gpg/DigestContext.cxx
+++ b/xmlsecurity/source/gpg/DigestContext.cxx
@@ -7,19 +7,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-
#include "DigestContext.hxx"
using namespace css;
using namespace css::uno;
using namespace css::lang;
+void SAL_CALL DigestContext::updateDigest(const Sequence<sal_Int8>& /*aData*/) {}
-void SAL_CALL DigestContext::updateDigest(const Sequence< sal_Int8 >& /*aData*/)
-{
-}
-
-uno::Sequence< sal_Int8 > SAL_CALL DigestContext::finalizeDigestAndDispose()
+uno::Sequence<sal_Int8> SAL_CALL DigestContext::finalizeDigestAndDispose()
{
return Sequence<sal_Int8>();
}
diff --git a/xmlsecurity/source/gpg/DigestContext.hxx b/xmlsecurity/source/gpg/DigestContext.hxx
index 99fa264ef8d2..ea2ecc043c06 100644
--- a/xmlsecurity/source/gpg/DigestContext.hxx
+++ b/xmlsecurity/source/gpg/DigestContext.hxx
@@ -14,12 +14,12 @@
#include <cppuhelper/implbase.hxx>
-class DigestContext : public cppu::WeakImplHelper< css::xml::crypto::XDigestContext >
+class DigestContext : public cppu::WeakImplHelper<css::xml::crypto::XDigestContext>
{
public:
// XDigestContext
- virtual void SAL_CALL updateDigest( const css::uno::Sequence< ::sal_Int8 >& aData ) override;
- virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL finalizeDigestAndDispose() override;
+ virtual void SAL_CALL updateDigest(const css::uno::Sequence<::sal_Int8>& aData) override;
+ virtual css::uno::Sequence<::sal_Int8> SAL_CALL finalizeDigestAndDispose() override;
};
#endif
diff --git a/xmlsecurity/source/gpg/SEInitializer.cxx b/xmlsecurity/source/gpg/SEInitializer.cxx
index cb502e8c9793..5cfe325aa88b 100644
--- a/xmlsecurity/source/gpg/SEInitializer.cxx
+++ b/xmlsecurity/source/gpg/SEInitializer.cxx
@@ -14,7 +14,10 @@
#include <global.h>
-namespace com::sun::star::uno { class XComponentContext; }
+namespace com::sun::star::uno
+{
+class XComponentContext;
+}
using namespace css;
using namespace css::lang;
@@ -27,43 +30,39 @@ SEInitializerGpg::SEInitializerGpg()
GpgME::initializeLibrary();
}
-SEInitializerGpg::~SEInitializerGpg()
-{
-}
+SEInitializerGpg::~SEInitializerGpg() {}
/* XSEInitializer */
-Reference< XXMLSecurityContext > SAL_CALL SEInitializerGpg::createSecurityContext( const OUString& )
+Reference<XXMLSecurityContext> SAL_CALL SEInitializerGpg::createSecurityContext(const OUString&)
{
try
{
/* Build XML Security Context */
- Reference< XXMLSecurityContext > xSecCtx(new XMLSecurityContextGpg());
+ Reference<XXMLSecurityContext> xSecCtx(new XMLSecurityContextGpg());
- Reference< XSecurityEnvironment > xSecEnv(new SecurityEnvironmentGpg());
+ Reference<XSecurityEnvironment> xSecEnv(new SecurityEnvironmentGpg());
sal_Int32 n = xSecCtx->addSecurityEnvironment(xSecEnv);
//originally the SecurityEnvironment with the internal slot was set as default
- xSecCtx->setDefaultSecurityEnvironmentIndex( n );
+ xSecCtx->setDefaultSecurityEnvironmentIndex(n);
return xSecCtx;
}
- catch( const uno::Exception& )
+ catch (const uno::Exception&)
{
return nullptr;
}
}
-void SAL_CALL SEInitializerGpg::freeSecurityContext( const uno::Reference< XXMLSecurityContext >& )
-{
-}
+void SAL_CALL SEInitializerGpg::freeSecurityContext(const uno::Reference<XXMLSecurityContext>&) {}
/* XServiceInfo */
-sal_Bool SAL_CALL SEInitializerGpg::supportsService( const OUString& rServiceName )
+sal_Bool SAL_CALL SEInitializerGpg::supportsService(const OUString& rServiceName)
{
return cppu::supportsService(this, rServiceName);
}
-uno::Sequence< OUString > SAL_CALL SEInitializerGpg::getSupportedServiceNames()
+uno::Sequence<OUString> SAL_CALL SEInitializerGpg::getSupportedServiceNames()
{
- return {"com.sun.star.xml.crypto.GPGSEInitializer"};
+ return { "com.sun.star.xml.crypto.GPGSEInitializer" };
}
OUString SAL_CALL SEInitializerGpg::getImplementationName()
diff --git a/xmlsecurity/source/gpg/XMLSecurityContext.cxx b/xmlsecurity/source/gpg/XMLSecurityContext.cxx
index d27e552829d1..79746d31b637 100644
--- a/xmlsecurity/source/gpg/XMLSecurityContext.cxx
+++ b/xmlsecurity/source/gpg/XMLSecurityContext.cxx
@@ -20,27 +20,25 @@ XMLSecurityContextGpg::XMLSecurityContextGpg()
{
}
-XMLSecurityContextGpg::~XMLSecurityContextGpg()
-{
-}
+XMLSecurityContextGpg::~XMLSecurityContextGpg() {}
sal_Int32 SAL_CALL XMLSecurityContextGpg::addSecurityEnvironment(
- const Reference< XSecurityEnvironment >& aSecurityEnvironment)
+ const Reference<XSecurityEnvironment>& aSecurityEnvironment)
{
- if(!aSecurityEnvironment.is())
+ if (!aSecurityEnvironment.is())
throw RuntimeException("Invalid SecurityEnvironment given!");
m_vSecurityEnvironments.push_back(aSecurityEnvironment);
- return m_vSecurityEnvironments.size() - 1 ;
+ return m_vSecurityEnvironments.size() - 1;
}
-
sal_Int32 SAL_CALL XMLSecurityContextGpg::getSecurityEnvironmentNumber()
{
return m_vSecurityEnvironments.size();
}
-Reference< XSecurityEnvironment > SAL_CALL XMLSecurityContextGpg::getSecurityEnvironmentByIndex(sal_Int32 index)
+Reference<XSecurityEnvironment>
+ SAL_CALL XMLSecurityContextGpg::getSecurityEnvironmentByIndex(sal_Int32 index)
{
if (index < 0 || index >= static_cast<sal_Int32>(m_vSecurityEnvironments.size()))
throw RuntimeException("Invalid index");
@@ -48,9 +46,10 @@ Reference< XSecurityEnvironment > SAL_CALL XMLSecurityContextGpg::getSecurityEnv
return m_vSecurityEnvironments[index];
}
-Reference< XSecurityEnvironment > SAL_CALL XMLSecurityContextGpg::getSecurityEnvironment()
+Reference<XSecurityEnvironment> SAL_CALL XMLSecurityContextGpg::getSecurityEnvironment()
{
- if (m_nDefaultEnvIndex < 0 || m_nDefaultEnvIndex >= static_cast<sal_Int32>(m_vSecurityEnvironments.size()))
+ if (m_nDefaultEnvIndex < 0
+ || m_nDefaultEnvIndex >= static_cast<sal_Int32>(m_vSecurityEnvironments.size()))
throw RuntimeException("Invalid index");
return getSecurityEnvironmentByIndex(m_nDefaultEnvIndex);
@@ -58,7 +57,7 @@ Reference< XSecurityEnvironment > SAL_CALL XMLSecurityContextGpg::getSecurityEnv
sal_Int32 SAL_CALL XMLSecurityContextGpg::getDefaultSecurityEnvironmentIndex()
{
- return m_nDefaultEnvIndex ;
+ return m_nDefaultEnvIndex;
}
void SAL_CALL XMLSecurityContextGpg::setDefaultSecurityEnvironmentIndex(sal_Int32 nDefaultEnvIndex)
@@ -67,17 +66,20 @@ void SAL_CALL XMLSecurityContextGpg::setDefaultSecurityEnvironmentIndex(sal_Int3
}
/* XServiceInfo */
-OUString SAL_CALL XMLSecurityContextGpg::getImplementationName() {
+OUString SAL_CALL XMLSecurityContextGpg::getImplementationName()
+{
return "com.sun.star.xml.security.gpg.XMLSecurityContext_GpgImpl";
}
/* XServiceInfo */
-sal_Bool SAL_CALL XMLSecurityContextGpg::supportsService( const OUString& serviceName) {
+sal_Bool SAL_CALL XMLSecurityContextGpg::supportsService(const OUString& serviceName)
+{
return cppu::supportsService(this, serviceName);
}
/* XServiceInfo */
-Sequence< OUString > SAL_CALL XMLSecurityContextGpg::getSupportedServiceNames() {
+Sequence<OUString> SAL_CALL XMLSecurityContextGpg::getSupportedServiceNames()
+{
return { OUString("com.sun.star.xml.crypto.XMLSecurityContext") };
}
diff --git a/xmlsecurity/source/xmlsec/certificateextension_certextn.hxx b/xmlsecurity/source/xmlsec/certificateextension_certextn.hxx
index bb1ca1439a5a..48e9754f281d 100644
--- a/xmlsecurity/source/xmlsec/certificateextension_certextn.hxx
+++ b/xmlsecurity/source/xmlsec/certificateextension_certextn.hxx
@@ -26,11 +26,12 @@
struct CertificateExtension_CertExtn
{
bool m_critical;
- css::uno::Sequence< sal_Int8 > m_xExtnId;
- css::uno::Sequence< sal_Int8 > m_xExtnValue;
+ css::uno::Sequence<sal_Int8> m_xExtnId;
+ css::uno::Sequence<sal_Int8> m_xExtnValue;
CertificateExtension_CertExtn();
- void setCertExtn(unsigned char const * value, unsigned int vlen, unsigned char const * id, unsigned int idlen, bool critical);
+ void setCertExtn(unsigned char const* value, unsigned int vlen, unsigned char const* id,
+ unsigned int idlen, bool critical);
};
#endif // INCLUDED_XMLSECURITY_SOURCE_XMLSEC_CERTIFICATEEXTENSION_CERTEXTN_HXX
diff --git a/xmlsecurity/source/xmlsec/nss/secerror.hxx b/xmlsecurity/source/xmlsec/nss/secerror.hxx
index 9de7f5af7cdd..c4d38f6d26fa 100644
--- a/xmlsecurity/source/xmlsec/nss/secerror.hxx
+++ b/xmlsecurity/source/xmlsec/nss/secerror.hxx
@@ -25,11 +25,9 @@
#include <certt.h>
#include <prerror.h>
-const char *
-getCertError(PRErrorCode errNum);
+const char* getCertError(PRErrorCode errNum);
-void
-printChainFailure(CERTVerifyLog *log);
+void printChainFailure(CERTVerifyLog* log);
#endif // INCLUDED_XMLSECURITY_SOURCE_XMLSEC_NSS_SECERROR_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */