]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
added create_ipAddrBlock_enumerator() method to x509_t
authorAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 22 Dec 2009 10:58:30 +0000 (11:58 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 22 Dec 2009 10:58:30 +0000 (11:58 +0100)
src/libstrongswan/credentials/certificates/x509.h
src/libstrongswan/plugins/x509/x509_cert.c

index a671ce220bedc6cbaa28e968442aeb0449a995d7..37c59a963d65a41f38a995021ee3bf6c1a793e95 100644 (file)
@@ -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_ @}*/
index 74a2967f015a1162d3d4978385e7ab3e744fbe58..c3c377d089f6667045dd0dde865c2e7582c60ddf 100644 (file)
@@ -1323,6 +1323,14 @@ static enumerator_t* create_crl_uri_enumerator(private_x509_cert_t *this)
        return this->crl_uris->create_enumerator(this->crl_uris);
 }
 
+/**
+ * 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.
  */
@@ -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;