Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename getIdentityKeyFingerprint() to getAuthorityIdentityKeyFingerprint() #978

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public Path getTorrcPath() {
return dataDir.resolve("torrc");
}

public Optional<String> getIdentityKeyFingerprint() {
public Optional<String> getAuthorityIdentityKeyFingerprint() {
if (type != Type.DIRECTORY_AUTHORITY) {
return Optional.empty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static void generate(TorNode directoryAuthority, String passphrase) throw
"127.0.0.1:" + directoryAuthority.getDirPort()
);
identityKeyGenProcess.generateKeys(passphrase);
String identityKeyFingerprint = directoryAuthority.getIdentityKeyFingerprint().orElseThrow();
String identityKeyFingerprint = directoryAuthority.getAuthorityIdentityKeyFingerprint().orElseThrow();

var relayKeyGenProcess = new RelayKeyGenProcess(directoryAuthority);
relayKeyGenProcess.generateKeys(identityKeyFingerprint);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void generate() throws IOException {
allDirAuthorities.forEach(dirAuthority ->
torrcStringBuilder.append("DirAuthority ").append(dirAuthority.getNickname())
.append(" orport=").append(dirAuthority.getOrPort())
.append(" v3ident=").append(dirAuthority.getIdentityKeyFingerprint().orElseThrow())
.append(" v3ident=").append(dirAuthority.getAuthorityIdentityKeyFingerprint().orElseThrow())
.append(" 127.0.0.1:").append(dirAuthority.getDirPort())
.append(" ").append(dirAuthority.getRelayKeyFingerprint().orElseThrow())
.append("\n"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void basicTest(@TempDir Path tempDir) throws IOException {

doReturn(Optional.of("AAAA_fp"))
.when(firstDirAuth)
.getIdentityKeyFingerprint();
.getAuthorityIdentityKeyFingerprint();

doReturn(Optional.of("AAAA_v3"))
.when(firstDirAuth)
Expand All @@ -73,7 +73,7 @@ void basicTest(@TempDir Path tempDir) throws IOException {

doReturn(Optional.of("BBBB_fp"))
.when(secondDirAuth)
.getIdentityKeyFingerprint();
.getAuthorityIdentityKeyFingerprint();

doReturn(Optional.of("BBBB_v3"))
.when(secondDirAuth)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void basicTest(@TempDir Path tempDir) throws IOException {

doReturn(Optional.of("AAAA_fp"))
.when(firstDirAuth)
.getIdentityKeyFingerprint();
.getAuthorityIdentityKeyFingerprint();

doReturn(Optional.of("AAAA_v3"))
.when(firstDirAuth)
Expand All @@ -73,7 +73,7 @@ void basicTest(@TempDir Path tempDir) throws IOException {

doReturn(Optional.of("BBBB_fp"))
.when(secondDirAuth)
.getIdentityKeyFingerprint();
.getAuthorityIdentityKeyFingerprint();

doReturn(Optional.of("BBBB_v3"))
.when(secondDirAuth)
Expand Down