aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-06-23 06:53:56 +0000
committerlloyd <[email protected]>2006-06-23 06:53:56 +0000
commitaa0b566aa76b0105e256bbf788ce7a71ea1f60e3 (patch)
tree74d5f6a22a13fa4c8002b1dbd45e86c13ea2100e /src
parent4248def7fa3a7ef45e27b971e83a383ada68031a (diff)
Use accessor functions for CRL_Entry, instead of having public data
Diffstat (limited to 'src')
-rw-r--r--src/crl_ent.cpp8
-rw-r--r--src/x509_ca.cpp6
-rw-r--r--src/x509_ext.cpp2
-rw-r--r--src/x509stor.cpp4
4 files changed, 9 insertions, 11 deletions
diff --git a/src/crl_ent.cpp b/src/crl_ent.cpp
index e2348a0cb..16c6fa561 100644
--- a/src/crl_ent.cpp
+++ b/src/crl_ent.cpp
@@ -37,11 +37,11 @@ CRL_Entry::CRL_Entry(const X509_Certificate& cert, CRL_Code why)
*************************************************/
bool operator==(const CRL_Entry& a1, const CRL_Entry& a2)
{
- if(a1.serial != a2.serial)
+ if(a1.serial_number() != a2.serial_number())
return false;
- if(a1.time != a2.time)
+ if(a1.expire_time() != a2.expire_time())
return false;
- if(a1.reason != a2.reason)
+ if(a1.reason_code() != a2.reason_code())
return false;
return true;
}
@@ -59,7 +59,7 @@ bool operator!=(const CRL_Entry& a1, const CRL_Entry& a2)
*************************************************/
bool operator<(const CRL_Entry& a1, const CRL_Entry& a2)
{
- return (a1.time.cmp(a2.time) < 0);
+ return (a1.expire_time().cmp(a2.expire_time()) < 0);
}
/*************************************************
diff --git a/src/x509_ca.cpp b/src/x509_ca.cpp
index 1799de4f6..f5893734c 100644
--- a/src/x509_ca.cpp
+++ b/src/x509_ca.cpp
@@ -195,8 +195,8 @@ X509_CRL X509_CA::update_crl(const X509_CRL& crl,
std::set<SecureVector<byte> > removed_from_crl;
for(u32bit j = 0; j != new_revoked.size(); ++j)
{
- if(new_revoked[j].reason == DELETE_CRL_ENTRY)
- removed_from_crl.insert(new_revoked[j].serial);
+ if(new_revoked[j].reason_code() == DELETE_CRL_ENTRY)
+ removed_from_crl.insert(new_revoked[j].serial_number());
else
all_revoked.push_back(new_revoked[j]);
}
@@ -204,7 +204,7 @@ X509_CRL X509_CA::update_crl(const X509_CRL& crl,
for(u32bit j = 0; j != already_revoked.size(); ++j)
{
std::set<SecureVector<byte> >::const_iterator i;
- i = removed_from_crl.find(already_revoked[j].serial);
+ i = removed_from_crl.find(already_revoked[j].serial_number());
if(i == removed_from_crl.end())
all_revoked.push_back(already_revoked[j]);
diff --git a/src/x509_ext.cpp b/src/x509_ext.cpp
index d173df9a7..750054668 100644
--- a/src/x509_ext.cpp
+++ b/src/x509_ext.cpp
@@ -144,8 +144,6 @@ Certificate_Extension* Extensions::make_extension(const OID& oid)
else if(oid_name == "X509v3.CertificatePolicies")
return new Cert_Extension::Certificate_Policies();
- printf("%s\n", oid_name.c_str());
-
return 0;
}
diff --git a/src/x509stor.cpp b/src/x509stor.cpp
index d84fbe8b0..c4a673cda 100644
--- a/src/x509stor.cpp
+++ b/src/x509stor.cpp
@@ -574,13 +574,13 @@ X509_Code X509_Store::add_crl(const X509_CRL& crl)
{
CRL_Data revoked_info;
revoked_info.issuer = crl.issuer_dn();
- revoked_info.serial = revoked_certs[j].serial;
+ revoked_info.serial = revoked_certs[j].serial_number();
revoked_info.auth_key_id = crl.authority_key_id();
std::vector<CRL_Data>::iterator p =
std::find(revoked.begin(), revoked.end(), revoked_info);
- if(revoked_certs[j].reason == REMOVE_FROM_CRL)
+ if(revoked_certs[j].reason_code() == REMOVE_FROM_CRL)
{
if(p == revoked.end()) continue;
revoked.erase(p);