summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-06-26 00:37:36 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-26 09:29:25 +0200
commit20c4a9ce69e73a182d60718e9b52510d66c8f20e (patch)
treedde947221cfa9d662156416f01c0e4cbf4614c04 /xmlsecurity
parentaecd51754ec00faef7ad8f742d5e3cdbab470436 (diff)
tdf#96099 Remove some trivial container iterator typedefs
Change-Id: Ifec98748d55ff6aca64c425c50c2cf2650f61591 Reviewed-on: https://gerrit.libreoffice.org/56422 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/dialogs/resourcemanager.cxx8
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx10
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx1
3 files changed, 8 insertions, 11 deletions
diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx
index 102466a8159f..a47cedc3d260 100644
--- a/xmlsecurity/source/dialogs/resourcemanager.cxx
+++ b/xmlsecurity/source/dialogs/resourcemanager.cxx
@@ -83,10 +83,9 @@ namespace XmlSec
{
vector< pair< OUString, OUString > > vecAttrValueOfDN = parseDN(rRawString);
OUStringBuffer s1, s2;
- typedef vector< pair < OUString, OUString > >::const_iterator CIT;
- for (CIT i = vecAttrValueOfDN.begin(); i < vecAttrValueOfDN.end(); ++i)
+ for (auto i = vecAttrValueOfDN.cbegin(); i < vecAttrValueOfDN.cend(); ++i)
{
- if (i != vecAttrValueOfDN.begin())
+ if (i != vecAttrValueOfDN.cbegin())
{
s1.append(',');
s2.append('\n');
@@ -312,8 +311,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
while ( aIDs[i] )
{
OUString sPartId = OUString::createFromAscii( aIDs[i++] );
- typedef vector< pair < OUString, OUString > >::const_iterator CIT;
- for (CIT idn = vecAttrValueOfDN.begin(); idn != vecAttrValueOfDN.end(); ++idn)
+ for (auto idn = vecAttrValueOfDN.cbegin(); idn != vecAttrValueOfDN.cend(); ++idn)
{
if (idn->first == sPartId)
{
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index 0be004a60a3d..7fb84e177dfa 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -113,7 +113,7 @@ SecurityEnvironment_NssImpl::~SecurityEnvironment_NssImpl() {
PK11_SetPasswordFunc( nullptr ) ;
- for (CIT_SLOTS i = m_Slots.begin(); i != m_Slots.end(); i++)
+ for (auto i = m_Slots.cbegin(); i != m_Slots.cend(); i++)
{
PK11_FreeSlot(*i);
}
@@ -185,7 +185,7 @@ const Sequence< sal_Int8>& SecurityEnvironment_NssImpl::getUnoTunnelId() {
OUString SecurityEnvironment_NssImpl::getSecurityEnvironmentInformation()
{
OUStringBuffer buff;
- for (CIT_SLOTS is = m_Slots.begin(); is != m_Slots.end(); ++is)
+ for (auto is = m_Slots.cbegin(); is != m_Slots.cend(); ++is)
{
buff.append(OUString::createFromAscii(PK11_GetTokenName(*is)));
buff.append("\n");
@@ -291,7 +291,7 @@ SecurityEnvironment_NssImpl::getPersonalCertificates()
updateSlots();
//firstly, we try to find private keys in slot
- for (CIT_SLOTS is = m_Slots.begin(); is != m_Slots.end(); ++is)
+ for (auto is = m_Slots.cbegin(); is != m_Slots.cend(); ++is)
{
PK11SlotInfo *slot = *is;
SECKEYPrivateKeyList* priKeyList ;
@@ -765,7 +765,7 @@ sal_Int32 SecurityEnvironment_NssImpl::getCertificateCharacters(
}
if(priKey == nullptr)
{
- for (CIT_SLOTS is = m_Slots.begin(); is != m_Slots.end(); ++is)
+ for (auto is = m_Slots.cbegin(); is != m_Slots.cend(); ++is)
{
priKey = PK11_FindPrivateKeyFromCert(*is, const_cast<CERTCertificate*>(cert), nullptr);
if (priKey)
@@ -832,7 +832,7 @@ xmlSecKeysMngrPtr SecurityEnvironment_NssImpl::createKeysManager() {
std::unique_ptr<PK11SlotInfo*[]> sarSlots(new PK11SlotInfo*[cSlots]);
PK11SlotInfo** slots = sarSlots.get();
int count = 0;
- for (CIT_SLOTS islots = m_Slots.begin();islots != m_Slots.end(); ++islots, ++count)
+ for (auto islots = m_Slots.cbegin();islots != m_Slots.cend(); ++islots, ++count)
slots[count] = *islots;
xmlSecKeysMngrPtr pKeysMngr = xmlSecKeysMngrCreate();
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
index 4f5c924a3a03..c61ade4ab876 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
@@ -53,7 +53,6 @@ class SecurityEnvironment_NssImpl : public ::cppu::WeakImplHelper<
private:
std::list< PK11SlotInfo* > m_Slots;
- typedef std::list< PK11SlotInfo* >::const_iterator CIT_SLOTS;
/// The last used certificate which has the private key for signing.
css::uno::Reference<css::security::XCertificate> m_xSigningCertificate;