Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/security/manager/ssl/nsNSSCertValidity.h
Line
Count
Source (jump to first uncovered line)
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this
3
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5
#ifndef nsNSSCertValidity_h
6
#define nsNSSCertValidity_h
7
8
#include "DateTimeFormat.h"
9
#include "ScopedNSSTypes.h"
10
#include "nsIX509CertValidity.h"
11
12
class nsX509CertValidity : public nsIX509CertValidity
13
{
14
public:
15
  NS_DECL_THREADSAFE_ISUPPORTS
16
  NS_DECL_NSIX509CERTVALIDITY
17
18
  explicit nsX509CertValidity(const mozilla::UniqueCERTCertificate& cert);
19
20
protected:
21
0
  virtual ~nsX509CertValidity() {}
22
23
private:
24
  nsresult FormatTime(const PRTime& aTime,
25
                      PRTimeParamFn aParamFn,
26
                      const mozilla::nsTimeFormatSelector aTimeFormatSelector,
27
                      nsAString& aFormattedTimeDate);
28
29
  PRTime mNotBefore;
30
  PRTime mNotAfter;
31
  bool mTimesInitialized;
32
33
  nsX509CertValidity(const nsX509CertValidity& x) = delete;
34
  nsX509CertValidity& operator=(const nsX509CertValidity& x) = delete;
35
};
36
37
#endif // nsNSSCertValidity_h