Commit 81570c4d authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Parse recently added lines.

 - Compute bandwidth file digests.
 - Parse bandwidth file header and bandwidth file digest in votes.
 - Parse bridge distribution requests in bridge server descriptors.
 - Parse authority fingerprint in bridge network statuses.

Implements #33206.
parent 9ccb934f
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
# Changes in version 2.1?.? - 2020-0?-??
# Changes in version 2.11.0 - 2020-0?-??

 * Medium changes
   - Compute bandwidth file digests.
   - Parse bandwidth file header and bandwidth file digest in votes.
   - Parse bridge distribution requests in bridge server descriptors.
   - Parse authority fingerprint in bridge network statuses.

 * Minor changes
   - Avoid invoking overridable methods from constructors.
+9 −0
Original line number Diff line number Diff line
@@ -17,6 +17,15 @@ import java.util.Optional;
 */
public interface BandwidthFile extends Descriptor {

  /**
   * Return the SHA-256 bandwidth file digest, encoded as 43 base64 characters
   * without padding characters, that is used to reference this bandwidth file
   * from a vote.
   *
   * @since 2.11.0
   */
  String digestSha256Base64();

  /**
   * Time of the most recent generator bandwidth result.
   *
+8 −0
Original line number Diff line number Diff line
@@ -116,6 +116,14 @@ public interface BridgeNetworkStatus extends Descriptor {
   */
  int getIgnoringAdvertisedBws();

  /**
   * Return a SHA-1 digest of the bridge authority's identity key, encoded as 40
   * upper-case hexadecimal characters.
   *
   * @since 2.11.0
   */
  String getFingerprint();

  /**
   * Return status entries for each contained bridge, with map keys being
   * SHA-1 digests of SHA-1 digest of the bridges' public identity keys,
+20 −0
Original line number Diff line number Diff line
@@ -360,6 +360,26 @@ public interface RelayNetworkStatusVote extends Descriptor {
   */
  String getSharedRandCurrentValue();

  /**
   * Return the headers from the bandwidth file used to generate this vote, or
   * null if the authority producing this vote is not configured with a
   * bandwidth file or does not include the headers of the configured bandwidth
   * file in its vote.
   *
   * @since 2.11.0
   */
  SortedMap<String, String> getBandwidthFileHeaders();

  /**
   * Return the SHA256 digest of the bandwidth file, encoded as 43 base64
   * characters without padding characters, or null if the authority producing
   * this vote is not configured with a bandwidth file or does not include the
   * SHA256 digest of the configured bandwidth file in its vote.
   *
   * @since 2.11.0
   */
  String getBandwidthFileDigestSha256Base64();

  /**
   * Return the version of the directory key certificate used by this
   * authority, which must be 3 or higher.
+8 −0
Original line number Diff line number Diff line
@@ -244,6 +244,14 @@ public interface ServerDescriptor extends Descriptor {
   */
  String getContact();

  /**
   * Return the method how a bridge requests to be distributed by BridgeDB, or
   * {@code null} if no such request is contained in the descriptor.
   *
   * @since 2.11.0
   */
  String getBridgeDistributionRequest();

  /**
   * Return nicknames, $-prefixed identity fingerprints, or tuples of the
   * format {@code $fingerprint=nickname} or {@code $fingerprint~nickname}
Loading