aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2009-12-22 11:58:30 +0100
committerAndreas Steffen <andreas.steffen@strongswan.org>2009-12-22 11:58:30 +0100
commit91e35b7c9ec356d7ba08e0672926dd2a80efefde (patch)
tree58385df5c4a251c36e7a85a48fa290585834210f /src
parent7686f981a4fafbe29ac27da9eb4bb50fece0dad8 (diff)
downloadstrongswan-91e35b7c9ec356d7ba08e0672926dd2a80efefde.tar.bz2
strongswan-91e35b7c9ec356d7ba08e0672926dd2a80efefde.tar.xz
added create_ipAddrBlock_enumerator() method to x509_t
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/credentials/certificates/x509.h7
-rw-r--r--src/libstrongswan/plugins/x509/x509_cert.c9
2 files changed, 16 insertions, 0 deletions
diff --git a/src/libstrongswan/credentials/certificates/x509.h b/src/libstrongswan/credentials/certificates/x509.h
index a671ce220..37c59a963 100644
--- a/src/libstrongswan/credentials/certificates/x509.h
+++ b/src/libstrongswan/credentials/certificates/x509.h
@@ -121,6 +121,13 @@ struct x509_t {
* @return enumerator over URIs as char*
*/
enumerator_t* (*create_ocsp_uri_enumerator)(x509_t *this);
+
+ /**
+ * Create an enumerator over all ipAddrBlocks.
+ *
+ * @return enumerator over ipAddrBlocks as traffic_selector_t*
+ */
+ enumerator_t* (*create_ipAddrBlock_enumerator)(x509_t *this);
};
#endif /** X509_H_ @}*/
diff --git a/src/libstrongswan/plugins/x509/x509_cert.c b/src/libstrongswan/plugins/x509/x509_cert.c
index 74a2967f0..c3c377d08 100644
--- a/src/libstrongswan/plugins/x509/x509_cert.c
+++ b/src/libstrongswan/plugins/x509/x509_cert.c
@@ -1324,6 +1324,14 @@ static enumerator_t* create_crl_uri_enumerator(private_x509_cert_t *this)
}
/**
+ * Implementation of x509_cert_t.create_ipAddrBlock_enumerator.
+ */
+static enumerator_t* create_ipAddrBlock_enumerator(private_x509_cert_t *this)
+{
+ return this->ipAddrBlocks->create_enumerator(this->ipAddrBlocks);
+}
+
+/**
* Implementation of certificate_t.destroy.
*/
static void destroy(private_x509_cert_t *this)
@@ -1379,6 +1387,7 @@ static private_x509_cert_t* create_empty(void)
this->public.interface.create_subjectAltName_enumerator = (enumerator_t* (*)(x509_t*))create_subjectAltName_enumerator;
this->public.interface.create_crl_uri_enumerator = (enumerator_t* (*)(x509_t*))create_crl_uri_enumerator;
this->public.interface.create_ocsp_uri_enumerator = (enumerator_t* (*)(x509_t*))create_ocsp_uri_enumerator;
+ this->public.interface.create_ipAddrBlock_enumerator = (enumerator_t* (*)(x509_t*))create_ipAddrBlock_enumerator;
this->encoding = chunk_empty;
this->encoding_hash = chunk_empty;