Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: chrome/browser/ssl/ssl_severity_date_invalid.h

Issue 376663002: Calculate severity score for date_invalid error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test cases Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ssl/ssl_severity_date_invalid.h
diff --git a/chrome/browser/ssl/ssl_severity_date_invalid.h b/chrome/browser/ssl/ssl_severity_date_invalid.h
new file mode 100644
index 0000000000000000000000000000000000000000..f356978a955afcc0bf1dadc5da5e1c6e3ddd3308
--- /dev/null
+++ b/chrome/browser/ssl/ssl_severity_date_invalid.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SSL_SSL_SEVERITY_DATE_INVALID_H_
+#define CHROME_BROWSER_SSL_SSL_SEVERITY_DATE_INVALID_H_
+#endif
+
+#include "base/time/time.h"
+#include "net/cert/x509_certificate.h"
+
+// This class describes the functions which will be usefule in calcualting the
+// severity score when the SSL Error is Date Invalid.
felt 2014/07/07 22:01:34 ^ make sure to read your comments, there are two b
radhikabhar 2014/07/09 17:17:12 Done.
+class SSLSeverityDateInvalid {
felt 2014/07/07 22:01:34 I don't think you need to make a new class for eac
radhikabhar 2014/07/09 17:17:12 Done.
+ public :
+ // A function which calcualtes the weight of the client characteristics in
+ // contributing towards the SSL error.
+ float ClientCharacteristics();
+
+ // A function which calculates the weight of the server characteristics in
+ // contributing towards the SSL error.
+ float ServerCharacteristics();
+
+ SSLSeverityDateInvalid(base::Time current_time,
+ net::X509Certificate* cert);
+ ~SSLSeverityDateInvalid();
+
+ private:
+
+ float IsUserClockWrong();
+ float TimePassedSinceExpiry();
+
+ // This stores the current time.
+ base::Time current_time_;
+
+ // This stores the certificate.
+ net::X509Certificate* cert_ ;
+ FRIEND_TEST_ALL_PREFIXES(SSLSeverityDateInvalidTest, IsUserClockWrongTest);
+};
« no previous file with comments | « no previous file | chrome/browser/ssl/ssl_severity_date_invalid.cc » ('j') | chrome/browser/ssl/ssl_severity_date_invalid.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698