diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 00:01:28 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 00:01:28 +0000 |
commit | 95c60794f0b0122930b441df82eac8235e4e33ec (patch) | |
tree | 27257e21fd31a313a7d22479bd02a0b4d8a58845 | |
parent | a01665c91a9b9a23a8c8979c087140531c809de5 (diff) | |
download | chromium_src-95c60794f0b0122930b441df82eac8235e4e33ec.zip chromium_src-95c60794f0b0122930b441df82eac8235e4e33ec.tar.gz chromium_src-95c60794f0b0122930b441df82eac8235e4e33ec.tar.bz2 |
net: remove the NextUpdate and WindowSecs code from CRLSet.
Since we're now using Omaha to distribute the CRLSets, we don't need these values.
BUG=none
TEST=net_unittests
Review URL: http://codereview.chromium.org/8992019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115042 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/base/crl_set.cc | 28 | ||||
-rw-r--r-- | net/base/crl_set.h | 14 |
2 files changed, 2 insertions, 40 deletions
diff --git a/net/base/crl_set.cc b/net/base/crl_set.cc index dff962b..43d9204 100644 --- a/net/base/crl_set.cc +++ b/net/base/crl_set.cc @@ -69,9 +69,6 @@ CRLSet::~CRLSet() { // ContentType (string): "CRLSet" or "CRLSetDelta" (magic value) // DeltaFrom (int32): if this is a delta update (see below), then this contains // the sequence number of the base CRLSet. -// NextUpdate (int64, epoch seconds): the time at which an update is -// availible. -// WindowSecs (int64, seconds): the span of time to spread fetches over. // Sequence (int32): the monotonic sequence number of this CRL set. // // A delta CRLSet is similar to a CRLSet: @@ -208,18 +205,11 @@ bool CRLSet::Parse(base::StringPiece data, scoped_refptr<CRLSet>* out_crl_set) { return false; } - double next_update, update_window; int sequence; - if (!header_dict->GetDouble("NextUpdate", &next_update) || - !header_dict->GetDouble("WindowSecs", &update_window) || - !header_dict->GetInteger("Sequence", &sequence)) { + if (!header_dict->GetInteger("Sequence", &sequence)) return false; - } scoped_refptr<CRLSet> crl_set(new CRLSet); - crl_set->next_update_ = base::Time::FromDoubleT(next_update); - crl_set->update_window_ = - base::TimeDelta::FromSeconds(static_cast<int64>(update_window)); crl_set->sequence_ = static_cast<uint32>(sequence); for (size_t crl_index = 0; !data.empty(); crl_index++) { @@ -336,11 +326,8 @@ bool CRLSet::ApplyDelta(base::StringPiece data, return false; } - double next_update, update_window; int sequence, delta_from; - if (!header_dict->GetDouble("NextUpdate", &next_update) || - !header_dict->GetDouble("WindowSecs", &update_window) || - !header_dict->GetInteger("Sequence", &sequence) || + if (!header_dict->GetInteger("Sequence", &sequence) || !header_dict->GetInteger("DeltaFrom", &delta_from) || delta_from < 0 || static_cast<uint32>(delta_from) != sequence_) { @@ -348,9 +335,6 @@ bool CRLSet::ApplyDelta(base::StringPiece data, } scoped_refptr<CRLSet> crl_set(new CRLSet); - crl_set->next_update_ = base::Time::FromDoubleT(next_update); - crl_set->update_window_ = - base::TimeDelta::FromSeconds(static_cast<int64>(update_window)); crl_set->sequence_ = static_cast<uint32>(sequence); std::vector<uint8> crl_changes; @@ -435,14 +419,6 @@ CRLSet::Result CRLSet::CheckCertificate( return GOOD; } -base::Time CRLSet::next_update() const { - return next_update_; -} - -base::TimeDelta CRLSet::update_window() const { - return update_window_; -} - uint32 CRLSet::sequence() const { return sequence_; } diff --git a/net/base/crl_set.h b/net/base/crl_set.h index 14c4aa0..586a264 100644 --- a/net/base/crl_set.h +++ b/net/base/crl_set.h @@ -42,8 +42,6 @@ class NET_EXPORT CRLSet : public base::RefCountedThreadSafe<CRLSet> { // serial_number: the serial number of the certificate // issuer_spki_hash: the SHA256 of the SubjectPublicKeyInfo of the CRL // signer - // - // This does not check that the CRLSet is timely. See |next_update|. Result CheckCertificate( const base::StringPiece& serial_number, const base::StringPiece& issuer_spki_hash) const; @@ -53,15 +51,6 @@ class NET_EXPORT CRLSet : public base::RefCountedThreadSafe<CRLSet> { bool ApplyDelta(base::StringPiece delta_bytes, scoped_refptr<CRLSet>* out_crl_set); - // next_update returns the time at which a new CRLSet may be availible. - base::Time next_update() const; - - // update_window returns the length of the update window. Once the - // |next_update| time has occured, the client should schedule a fetch, - // uniformly at random, within |update_window|. This aims to smooth the load - // on the server. - base::TimeDelta update_window() const; - // sequence returns the sequence number of this CRL set. CRL sets generated // by the same source are given strictly monotonically increasing sequence // numbers. @@ -81,10 +70,7 @@ class NET_EXPORT CRLSet : public base::RefCountedThreadSafe<CRLSet> { static CRLSet* CRLSetFromHeader(base::StringPiece header); - base::Time next_update_; - base::TimeDelta update_window_; uint32 sequence_; - CRLList crls_; // crls_index_by_issuer_ maps from issuer SPKI hashes to the index in |crls_| // where the information for that issuer can be found. We have both |crls_| |