aboutsummaryrefslogtreecommitdiffstats
path: root/src/cert/x509/crl_ent.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cert/x509/crl_ent.h')
-rw-r--r--src/cert/x509/crl_ent.h43
1 files changed, 37 insertions, 6 deletions
diff --git a/src/cert/x509/crl_ent.h b/src/cert/x509/crl_ent.h
index 8aa567a2a..40d82a8d7 100644
--- a/src/cert/x509/crl_ent.h
+++ b/src/cert/x509/crl_ent.h
@@ -10,20 +10,43 @@
namespace Botan {
-/*************************************************
-* CRL Entry *
-*************************************************/
+/**
+* This class represents CRL entries
+*/
class BOTAN_DLL CRL_Entry : public ASN1_Object
{
public:
void encode_into(class DER_Encoder&) const;
void decode_from(class BER_Decoder&);
+ /**
+ * Get the serial number of the certificate associated with this entry.
+ * @return the certificate's serial number
+ */
MemoryVector<byte> serial_number() const { return serial; }
+
+ /**
+ * Get the revocation date of the certificate associated with this entry
+ * @return the certificate's revocation date
+ */
X509_Time expire_time() const { return time; }
+
+ /**
+ * Get the entries reason code
+ * @return the reason code
+ */
CRL_Code reason_code() const { return reason; }
+ /**
+ * Construct an empty CRL entry.
+ */
CRL_Entry(bool throw_on_unknown_critical_extension = false);
+
+ /**
+ * Construct an CRL entry.
+ * @param cert the certificate to revoke
+ * @param reason the reason code to set in the entry
+ */
CRL_Entry(const X509_Certificate&, CRL_Code = UNSPECIFIED);
private:
@@ -33,11 +56,19 @@ class BOTAN_DLL CRL_Entry : public ASN1_Object
CRL_Code reason;
};
-/*************************************************
-* Comparison Operations *
-*************************************************/
+/**
+* Test two CRL entries for equality in all fields.
+*/
BOTAN_DLL bool operator==(const CRL_Entry&, const CRL_Entry&);
+
+/**
+* Test two CRL entries for inequality in at least one field.
+*/
BOTAN_DLL bool operator!=(const CRL_Entry&, const CRL_Entry&);
+
+/**
+* Order two entries based on the revocation date.
+*/
BOTAN_DLL bool operator<(const CRL_Entry&, const CRL_Entry&);
}