aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrik Fiedler <[email protected]>2018-01-03 16:50:45 +0100
committerPatrik Fiedler <[email protected]>2018-01-03 16:50:45 +0100
commitbe81e8d15a5b1698863dc09816f15d7fcaddca65 (patch)
tree122a5cdeba0e5b61befa912097c595dd09d7605f /src
parentcc5e87c0bf9553b1c18b1c487c4089111d3271d7 (diff)
use range-based for loop instead of std::for_each
Diffstat (limited to 'src')
-rw-r--r--src/build-data/oids.txt1
-rw-r--r--src/lib/asn1/oids.cpp4
-rw-r--r--src/lib/x509/x509_ext.cpp6
3 files changed, 5 insertions, 6 deletions
diff --git a/src/build-data/oids.txt b/src/build-data/oids.txt
index 089523e69..321439e5b 100644
--- a/src/build-data/oids.txt
+++ b/src/build-data/oids.txt
@@ -235,6 +235,7 @@
1.3.6.1.5.5.7.48.1 = PKIX.OCSP
1.3.6.1.5.5.7.48.1.1 = PKIX.OCSP.BasicResponse
+1.3.6.1.5.5.7.48.2 = PKIX.CertificateAuthorityIssuers
1.3.6.1.4.1.311.20.2.2 = Microsoft SmartcardLogon
diff --git a/src/lib/asn1/oids.cpp b/src/lib/asn1/oids.cpp
index e88fdc980..b60ec24d2 100644
--- a/src/lib/asn1/oids.cpp
+++ b/src/lib/asn1/oids.cpp
@@ -1,7 +1,7 @@
/*
* OID maps
*
-* This file was automatically generated by ./src/scripts/oids.py on 2017-12-05
+* This file was automatically generated by ./src/scripts/oids.py on 2018-01-03
*
* All manual edits to this file will be lost. Edit the script
* then regenerate this source file.
@@ -133,7 +133,6 @@ std::string lookup(const OID& oid)
if(oid_str == "1.3.6.1.4.1.8301.3.1.2.9.0.38") return "secp521r1";
if(oid_str == "1.3.6.1.5.5.7.1.1") return "PKIX.AuthorityInformationAccess";
if(oid_str == "1.3.6.1.5.5.7.3.1") return "PKIX.ServerAuth";
- if(oid_str == "1.3.6.1.5.5.7.48.2") return "PKIX.CertificateAuthorityIssuers";
if(oid_str == "1.3.6.1.5.5.7.3.2") return "PKIX.ClientAuth";
if(oid_str == "1.3.6.1.5.5.7.3.3") return "PKIX.CodeSigning";
if(oid_str == "1.3.6.1.5.5.7.3.4") return "PKIX.EmailProtection";
@@ -144,6 +143,7 @@ std::string lookup(const OID& oid)
if(oid_str == "1.3.6.1.5.5.7.3.9") return "PKIX.OCSPSigning";
if(oid_str == "1.3.6.1.5.5.7.48.1") return "PKIX.OCSP";
if(oid_str == "1.3.6.1.5.5.7.48.1.1") return "PKIX.OCSP.BasicResponse";
+ if(oid_str == "1.3.6.1.5.5.7.48.2") return "PKIX.CertificateAuthorityIssuers";
if(oid_str == "1.3.6.1.5.5.7.8.5") return "PKIX.XMPPAddr";
if(oid_str == "2.16.840.1.101.3.4.1.2") return "AES-128/CBC";
if(oid_str == "2.16.840.1.101.3.4.1.22") return "AES-192/CBC";
diff --git a/src/lib/x509/x509_ext.cpp b/src/lib/x509/x509_ext.cpp
index 64f5765ac..c3b58236a 100644
--- a/src/lib/x509/x509_ext.cpp
+++ b/src/lib/x509/x509_ext.cpp
@@ -793,10 +793,8 @@ void Authority_Information_Access::contents_to(Data_Store& subject, Data_Store&)
{
if(!m_ocsp_responder.empty())
subject.add("OCSP.responder", m_ocsp_responder);
- std::for_each(m_ca_issuers.begin(), m_ca_issuers.end(), [&subject] (const std::string& ca_issuer)
- {
- subject.add("PKIX.CertificateAuthorityIssuers", ca_issuer);
- });
+ for(const std::string& ca_issuer : m_ca_issuers)
+ subject.add("PKIX.CertificateAuthorityIssuers", ca_issuer);
}
/*