signed_certificate_timestamp.cc revision f2477e01787aa58f445919b809d89e252beef54f
10f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved.
20f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
30f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)// found in the LICENSE file.
40f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
50f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)#include "net/cert/signed_certificate_timestamp.h"
60f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
70f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)namespace net {
80f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
90f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)namespace ct {
100f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
11f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)bool SignedCertificateTimestamp::LessThan::operator()(
12f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    const scoped_refptr<SignedCertificateTimestamp>& lhs,
13f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    const scoped_refptr<SignedCertificateTimestamp>& rhs) const {
14f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  if (lhs.get() == rhs.get())
15f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    return false;
16f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  if (lhs->signature.signature_data != rhs->signature.signature_data)
17f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    return lhs->signature.signature_data < rhs->signature.signature_data;
18f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  if (lhs->log_id != rhs->log_id)
19f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    return lhs->log_id < rhs->log_id;
20f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  if (lhs->timestamp != rhs->timestamp)
21f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    return lhs->timestamp < rhs->timestamp;
22f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  if (lhs->extensions != rhs->extensions)
23f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    return lhs->extensions < rhs->extensions;
24f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  return lhs->version < rhs->version;
25f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}
26f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
270f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)SignedCertificateTimestamp::SignedCertificateTimestamp() {}
280f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
290f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)SignedCertificateTimestamp::~SignedCertificateTimestamp() {}
300f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
310f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)LogEntry::LogEntry() {}
320f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
330f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)LogEntry::~LogEntry() {}
340f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
350f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)void LogEntry::Reset() {
360f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)  type = LogEntry::LOG_ENTRY_TYPE_X509;
370f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)  leaf_certificate.clear();
380f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)  tbs_certificate.clear();
390f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)}
400f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
410f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)DigitallySigned::DigitallySigned() {}
420f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
430f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)DigitallySigned::~DigitallySigned() {}
440f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
450f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)}  // namespace ct
460f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
470f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)}  // namespace net
48