Interface DirectoryKeyCertificate

All Superinterfaces:
Descriptor, Serializable

public interface DirectoryKeyCertificate extends Descriptor
Contains a key certificate in the version 3 directory protocol.

Every directory authority in the version 3 directory protocol uses two keys: a medium-term signing key, and a long-term authority identity key. (Authorities also have a relay identity key used in their role as a relay and by earlier versions of the directory protocol.) The identity key is used from time to time to sign new key certificates containing signing keys. The contained signing key is used to sign key certificates and status documents.

Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the authority's primary IPv4 address in dotted-quad format, or null if the certificate does not contain an address.
    Return the SHA-1 certificate digest, encoded as 40 lower-case hexadecimal characters.
    Return the authority's identity key in PEM format.
    int
    Return the version of this descriptor, which must be 3 or higher.
    Return the certificate signature from the initial item "dir-key-certificate-version" until the final item "dir-key-certification", signed with the authority identity key.
    Return the signature of the authority's identity key made using the authority's signing key, or null if the certificate does not contain such a signature.
    long
    Return the time in milliseconds since the epoch after which the authority's signing key is no longer valid.
    long
    Return the time in milliseconds since the epoch when the authority's signing key and this key certificate were generated.
    Return the authority's signing key in PEM format.
    Return a SHA-1 digest of the authority's long-term authority identity key used for the version 3 directory protocol, encoded as 40 upper-case hexadecimal characters.
    int
    Return the TCP port where this authority accepts directory-related HTTP connections, or -1 if the certificate does not contain a port.

    Methods inherited from interface org.torproject.descriptor.Descriptor

    getAnnotations, getDescriptorFile, getRawDescriptorBytes, getRawDescriptorLength, getUnrecognizedLines
  • Method Details

    • getDirKeyCertificateVersion

      int getDirKeyCertificateVersion()
      Return the version of this descriptor, which must be 3 or higher.
      Since:
      1.0.0
    • getAddress

      String getAddress()
      Return the authority's primary IPv4 address in dotted-quad format, or null if the certificate does not contain an address.
      Since:
      1.0.0
    • getPort

      int getPort()
      Return the TCP port where this authority accepts directory-related HTTP connections, or -1 if the certificate does not contain a port.
      Since:
      1.0.0
    • getFingerprint

      String getFingerprint()
      Return a SHA-1 digest of the authority's long-term authority identity key used for the version 3 directory protocol, encoded as 40 upper-case hexadecimal characters.
      Since:
      1.0.0
    • getDirIdentityKey

      String getDirIdentityKey()
      Return the authority's identity key in PEM format.
      Since:
      1.0.0
    • getDirKeyPublishedMillis

      long getDirKeyPublishedMillis()
      Return the time in milliseconds since the epoch when the authority's signing key and this key certificate were generated.
      Since:
      1.0.0
    • getDirKeyExpiresMillis

      long getDirKeyExpiresMillis()
      Return the time in milliseconds since the epoch after which the authority's signing key is no longer valid.
      Since:
      1.0.0
    • getDirSigningKey

      String getDirSigningKey()
      Return the authority's signing key in PEM format.
      Since:
      1.0.0
    • getDirKeyCrosscert

      String getDirKeyCrosscert()
      Return the signature of the authority's identity key made using the authority's signing key, or null if the certificate does not contain such a signature.
      Since:
      1.0.0
    • getDirKeyCertification

      String getDirKeyCertification()
      Return the certificate signature from the initial item "dir-key-certificate-version" until the final item "dir-key-certification", signed with the authority identity key.
      Since:
      1.0.0
    • getDigestSha1Hex

      String getDigestSha1Hex()
      Return the SHA-1 certificate digest, encoded as 40 lower-case hexadecimal characters.
      Since:
      1.7.0