• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This file is dual licensed under the terms of the Apache License, Version
2# 2.0, and the BSD License. See the LICENSE file in the root of this repository
3# for complete details.
4
5from __future__ import absolute_import, division, print_function
6
7import abc
8from enum import Enum
9
10import six
11
12
13class LogEntryType(Enum):
14    X509_CERTIFICATE = 0
15    PRE_CERTIFICATE = 1
16
17
18class Version(Enum):
19    v1 = 0
20
21
22@six.add_metaclass(abc.ABCMeta)
23class SignedCertificateTimestamp(object):
24    @abc.abstractproperty
25    def version(self):
26        """
27        Returns the SCT version.
28        """
29
30    @abc.abstractproperty
31    def log_id(self):
32        """
33        Returns an identifier indicating which log this SCT is for.
34        """
35
36    @abc.abstractproperty
37    def timestamp(self):
38        """
39        Returns the timestamp for this SCT.
40        """
41
42    @abc.abstractproperty
43    def entry_type(self):
44        """
45        Returns whether this is an SCT for a certificate or pre-certificate.
46        """
47