summaryrefslogtreecommitdiff
path: root/src/charon/encoding/payloads/certreq_payload.h
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2008-07-09 21:02:41 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2008-07-09 21:02:41 +0000
commitdb67c87db3c9089ea8d2e14f617bf3d9e2af261f (patch)
tree665c0caea83d34c11c1517c4c57137bb58cba6fb /src/charon/encoding/payloads/certreq_payload.h
parent1c088a8b6237ec67f63c23f97a0f2dc4e99af869 (diff)
downloadvyos-strongswan-db67c87db3c9089ea8d2e14f617bf3d9e2af261f.tar.gz
vyos-strongswan-db67c87db3c9089ea8d2e14f617bf3d9e2af261f.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.2.4)
Diffstat (limited to 'src/charon/encoding/payloads/certreq_payload.h')
-rw-r--r--src/charon/encoding/payloads/certreq_payload.h104
1 files changed, 26 insertions, 78 deletions
diff --git a/src/charon/encoding/payloads/certreq_payload.h b/src/charon/encoding/payloads/certreq_payload.h
index 2985fdae1..b835d7ad6 100644
--- a/src/charon/encoding/payloads/certreq_payload.h
+++ b/src/charon/encoding/payloads/certreq_payload.h
@@ -1,10 +1,3 @@
-/**
- * @file certreq_payload.h
- *
- * @brief Interface of certreq_payload_t.
- *
- */
-
/*
* Copyright (C) 2005-2006 Martin Willi
* Copyright (C) 2005 Jan Hutter
@@ -19,6 +12,13 @@
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
+ *
+ * $Id: certreq_payload.h 3589 2008-03-13 14:14:44Z martin $
+ */
+
+/**
+ * @defgroup certreq_payload certreq_payload
+ * @{ @ingroup payloads
*/
#ifndef CERTREQ_PAYLOAD_H_
@@ -32,26 +32,13 @@ typedef struct certreq_payload_t certreq_payload_t;
/**
* Length of a CERTREQ payload without the CERTREQ data in bytes.
- *
- * @ingroup payloads
*/
#define CERTREQ_PAYLOAD_HEADER_LENGTH 5
-
/**
- * @brief Class representing an IKEv2 CERTREQ payload.
+ * Class representing an IKEv2 CERTREQ payload.
*
* The CERTREQ payload format is described in RFC section 3.7.
- * This is just a dummy implementation to fullfill the standards
- * requirements. A full implementation would offer setters/getters
- * for the different encoding types.
- *
- * @b Constructors:
- * - certreq_payload_create()
- *
- * @todo Implement payload functionality.
- *
- * @ingroup payloads
*/
struct certreq_payload_t {
/**
@@ -60,85 +47,46 @@ struct certreq_payload_t {
payload_t payload_interface;
/**
- * @brief Set the CERT encoding.
- *
- * @param this calling certreq_payload_t object
- * @param encoding CERT encoding
- */
- void (*set_cert_encoding) (certreq_payload_t *this, cert_encoding_t encoding);
-
- /**
- * @brief Get the CERT encoding.
- *
- * @param this calling certreq_payload_t object
- * @return Encoding of the CERT
- */
- cert_encoding_t (*get_cert_encoding) (certreq_payload_t *this);
-
- /**
- * @brief Set the CERTREQ data.
- *
- * Data are getting cloned.
+ * Create an enumerator over contained keyids.
*
- * @param this calling certreq_payload_t object
- * @param data CERTREQ data as chunk_t
+ * @return enumerator over chunk_t's.
*/
- void (*set_data) (certreq_payload_t *this, chunk_t data);
+ enumerator_t* (*create_keyid_enumerator)(certreq_payload_t *this);
/**
- * @brief Get the CERTREQ data.
- *
- * Returned data are a copy of the internal one.
+ * Get the type of contained certificate keyids.
*
- * @param this calling certreq_payload_t object
- * @return CERTREQ data as chunk_t
+ * @return certificate keyid type
*/
- chunk_t (*get_data_clone) (certreq_payload_t *this);
+ certificate_type_t (*get_cert_type)(certreq_payload_t *this);
/**
- * @brief Get the CERTREQ data.
- *
- * Returned data are NOT copied.
+ * Add a certificates keyid to the payload.
*
- * @param this calling certreq_payload_t object
- * @return CERTREQ data as chunk_t
+ * @param keyid keyid of the trusted certifcate
+ * @return
*/
- chunk_t (*get_data) (certreq_payload_t *this);
+ void (*add_keyid)(certreq_payload_t *this, chunk_t keyid);
/**
- * @brief Destroys an certreq_payload_t object.
- *
- * @param this certreq_payload_t object to destroy
+ * Destroys an certreq_payload_t object.
*/
void (*destroy) (certreq_payload_t *this);
};
/**
- * @brief Creates an empty certreq_payload_t object.
+ * Creates an empty certreq_payload_t object.
*
- * @return certreq_payload_t object
- *
- * @ingroup payloads
+ * @return certreq payload
*/
certreq_payload_t *certreq_payload_create(void);
/**
- * @brief Creates a certreq_payload_t object from a ca certificate
- *
- * @param id subject distinguished name of CA certificate
- * @return certreq_payload_t object
- *
- * @ingroup payloads
- */
-certreq_payload_t *certreq_payload_create_from_cacert(identification_t *id);
-
-/**
- * @brief Creates a certreq_payload_t object from all ca certificates
- *
- * @return certreq_payload_t object
+ * Creates an empty certreq_payload_t for a kind of certificates.
*
- * @ingroup payloads
+ * @param type type of the added keyids
+ * @return certreq payload
*/
-certreq_payload_t *certreq_payload_create_from_cacerts(void);
+certreq_payload_t *certreq_payload_create_type(certificate_type_t type);
-#endif /* CERTREQ_PAYLOAD_H_ */
+#endif /* CERTREQ_PAYLOAD_H_ @} */