diff options
author | lloyd <[email protected]> | 2010-09-17 22:12:39 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-09-17 22:12:39 +0000 |
commit | f69375f3a137af835bd6e74dd5c5a1e94c882d8c (patch) | |
tree | c9fe1adb6a77153d16d1a33c5455f7e85a5533e2 | |
parent | f9d51dc97769c8dcda90221543f743a72391b2c2 (diff) |
Add strict comparisons for X509_Time
-rw-r--r-- | src/asn1/asn1_obj.h | 2 | ||||
-rw-r--r-- | src/asn1/asn1_tm.cpp | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/asn1/asn1_obj.h b/src/asn1/asn1_obj.h index 0672e6a44..068ed1565 100644 --- a/src/asn1/asn1_obj.h +++ b/src/asn1/asn1_obj.h @@ -145,6 +145,8 @@ bool BOTAN_DLL operator==(const X509_Time&, const X509_Time&); bool BOTAN_DLL operator!=(const X509_Time&, const X509_Time&); bool BOTAN_DLL operator<=(const X509_Time&, const X509_Time&); bool BOTAN_DLL operator>=(const X509_Time&, const X509_Time&); +bool BOTAN_DLL operator<(const X509_Time&, const X509_Time&); +bool BOTAN_DLL operator>(const X509_Time&, const X509_Time&); bool BOTAN_DLL operator==(const X509_DN&, const X509_DN&); bool BOTAN_DLL operator!=(const X509_DN&, const X509_DN&); diff --git a/src/asn1/asn1_tm.cpp b/src/asn1/asn1_tm.cpp index 01d31cfbd..2f4de39fa 100644 --- a/src/asn1/asn1_tm.cpp +++ b/src/asn1/asn1_tm.cpp @@ -271,9 +271,15 @@ bool operator==(const X509_Time& t1, const X509_Time& t2) { return (t1.cmp(t2) == 0); } bool operator!=(const X509_Time& t1, const X509_Time& t2) { return (t1.cmp(t2) != 0); } + bool operator<=(const X509_Time& t1, const X509_Time& t2) { return (t1.cmp(t2) <= 0); } bool operator>=(const X509_Time& t1, const X509_Time& t2) { return (t1.cmp(t2) >= 0); } +bool operator<(const X509_Time& t1, const X509_Time& t2) + { return (t1.cmp(t2) < 0); } +bool operator>(const X509_Time& t1, const X509_Time& t2) + { return (t1.cmp(t2) > 0); } + } |