certificate_transparency.py 797 B

1234567891011121314151617181920212223242526272829303132333435
  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. from __future__ import annotations
  5. from cryptography import utils
  6. from cryptography.hazmat.bindings._rust import x509 as rust_x509
  7. class LogEntryType(utils.Enum):
  8. X509_CERTIFICATE = 0
  9. PRE_CERTIFICATE = 1
  10. class Version(utils.Enum):
  11. v1 = 0
  12. class SignatureAlgorithm(utils.Enum):
  13. """
  14. Signature algorithms that are valid for SCTs.
  15. These are exactly the same as SignatureAlgorithm in RFC 5246 (TLS 1.2).
  16. See: <https://datatracker.ietf.org/doc/html/rfc5246#section-7.4.1.4.1>
  17. """
  18. ANONYMOUS = 0
  19. RSA = 1
  20. DSA = 2
  21. ECDSA = 3
  22. SignedCertificateTimestamp = rust_x509.Sct