summaryrefslogtreecommitdiff
path: root/src/libstrongswan/crypto/ac.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/crypto/ac.h')
-rw-r--r--src/libstrongswan/crypto/ac.h37
1 files changed, 33 insertions, 4 deletions
diff --git a/src/libstrongswan/crypto/ac.h b/src/libstrongswan/crypto/ac.h
index b7fd26c94..8a4ccbd4c 100644
--- a/src/libstrongswan/crypto/ac.h
+++ b/src/libstrongswan/crypto/ac.h
@@ -21,11 +21,15 @@
* 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.
+ *
+ * RCSID $Id: ac.h 3300 2007-10-12 21:53:18Z andreas $
*/
#ifndef AC_H_
#define AC_H_
+#include <library.h>
+
typedef struct x509ac_t x509ac_t;
/**
@@ -48,6 +52,32 @@ struct x509ac_t {
*/
err_t (*is_valid) (const x509ac_t *this, time_t *until);
+ /** @brief Checks if this attr cert is newer than the other attr cert
+ *
+ * @param this calling object
+ * @param other other attr cert object
+ * @return TRUE if this was issued more recently than other
+ */
+ bool (*is_newer) (const x509ac_t *this, const x509ac_t *other);
+
+ /**
+ * @brief Checks if two attribute certificates belong to the same holder
+ *
+ * @param this calling attribute certificate
+ * @param that other attribute certificate
+ * @return TRUE if same holder
+ */
+ bool (*equals_holder) (const x509ac_t *this, const x509ac_t *other);
+
+ /**
+ * @brief Log the attribute certificate info to out.
+ *
+ * @param this calling object
+ * @param out stream to write to
+ * @param utc TRUE for UTC times, FALSE for local time
+ */
+ void (*list)(const x509ac_t *this, FILE *out, bool utc);
+
/**
* @brief Destroys the attribute certificate.
*
@@ -68,14 +98,13 @@ x509ac_t *x509ac_create_from_chunk(chunk_t chunk);
/**
* @brief Read a x509 attribute certificate from a DER encoded file.
- *
+ *
* @param filename file containing DER encoded data
- * @return created x509ac_t certificate, or NULL if invalid.
- *
+ * @return created x509ac_t certificate, or NULL if invalid.
+ *
* @ingroup crypto
*/
x509ac_t *x509ac_create_from_file(const char *filename);
-
#endif /* AC_H_ */