File tree Expand file tree Collapse file tree 9 files changed +13
-12
lines changed Expand file tree Collapse file tree 9 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ static private CircuitNodeDetail ConvertToCircuitNodeDetail(ServerDescriptorEntr
2525 var endpoint = IPEndPoint . Parse ( $ "{ server . Address . Value } :{ server . OnionRouterPort . Value } ") ;
2626 return CircuitNodeDetail . NewCreate ( endpoint ,
2727 new NTorOnionKey ( nTorOnionKeyBytes ) ,
28- new IdentityKey ( fingerprintBytes ) ) ;
28+ new Fingerprint ( fingerprintBytes ) ) ;
2929 }
3030
3131 /* It's possible that the router returned by GetRandomFallbackDirectory
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ private async Task ReturnRandomRouter()
5656 TorDirectory directory = await TorDirectory . BootstrapAsync ( FallbackDirectorySelector . GetRandomFallbackDirectory ( ) , cachePath ) ;
5757 var ( endPoint , router ) = await directory . GetRouterAsync ( RouterType . Normal ) ;
5858 Assert . IsTrue ( router . IsCreate ) ;
59- Assert . IsFalse ( ( ( CircuitNodeDetail . Create ) router ) . IdentityKey . ToByteArray ( ) . All ( x => x == 0 ) ) ;
59+ Assert . IsFalse ( ( ( CircuitNodeDetail . Create ) router ) . Fingerprint . ToByteArray ( ) . All ( x => x == 0 ) ) ;
6060 Assert . IsFalse ( ( ( CircuitNodeDetail . Create ) router ) . NTorOnionKey . ToByteArray ( ) . All ( x => x == 0 ) ) ;
6161 Assert . IsNotNull ( ( ( CircuitNodeDetail . Create ) router ) . EndPoint ) ;
6262 Assert . That ( endPoint , Is . EqualTo ( ( ( CircuitNodeDetail . Create ) router ) . EndPoint ) ) ;
Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ type TorDirectory =
277277 CircuitNodeDetail.Create(
278278 endpoint,
279279 NTorOnionKey nTorOnionKeyBytes,
280- IdentityKey fingerprintBytes
280+ Fingerprint fingerprintBytes
281281 )
282282 }
283283
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ type NTorOnionKey(bytes: array<byte>) =
5757 member self.ToByteArray () =
5858 bytes
5959
60- type IdentityKey ( bytes : array < byte >) =
60+ /// Digest of identity key.
61+ type Fingerprint ( bytes : array < byte >) =
6162 do
6263 if bytes.Length <> Constants.IdentityKeyLength then
6364 failwithf
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ type CircuitNodeDetail =
2626 | Create of
2727 EndPoint: IPEndPoint *
2828 NTorOnionKey: NTorOnionKey *
29- IdentityKey : IdentityKey
29+ Fingerprint : Fingerprint
3030
3131 member self.GetIdentityKey () =
3232 match self with
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ type TorGuard
4949 (
5050 client: TcpClient,
5151 sslStream: SslStream,
52- fingerprintOpt: Option< IdentityKey >
52+ fingerprintOpt: Option< Fingerprint >
5353 ) =
5454 let shutdownToken = new CancellationTokenSource()
5555
@@ -116,7 +116,7 @@ type TorGuard
116116
117117 static member private InnerNewClient
118118 ( ipEndpoint : IPEndPoint )
119- ( fingerprintOpt : Option < IdentityKey >)
119+ ( fingerprintOpt : Option < Fingerprint >)
120120 =
121121 async {
122122 let tcpClient = new TcpClient()
Original file line number Diff line number Diff line change @@ -373,7 +373,7 @@ type TorServiceClient =
373373 CircuitNodeDetail.Create(
374374 endpointSpecifier,
375375 introductionPoint.OnionKey.Value,
376- IdentityKey identityKey
376+ Fingerprint identityKey
377377 )
378378
379379 return
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ type IntroductionPointInfo =
3131 AuthKey: AsymmetricCipherKeyPair
3232 MasterPublicKey: Ed25519PublicKeyParameters
3333 NTorOnionKey: NTorOnionKey
34- Fingerprint: IdentityKey
34+ Fingerprint: Fingerprint
3535 }
3636
3737type TorServiceHost
@@ -234,7 +234,7 @@ type TorServiceHost
234234 |> Seq.tryExactlyOne
235235
236236 match linkSpecifierOpt with
237- | Some linkSpecifier -> IdentityKey linkSpecifier.Data
237+ | Some linkSpecifier -> Fingerprint linkSpecifier.Data
238238 | None -> failwith " No rendezvous fingerprint found!"
239239
240240 let connectToRendezvousJob =
Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ type NTorHandshake =
1515 {
1616 RandomClientPrivateKey: X25519PrivateKeyParameters
1717 RandomClientPublicKey: X25519PublicKeyParameters
18- IdentityDigest: IdentityKey
18+ IdentityDigest: Fingerprint
1919 NTorOnionKey: X25519PublicKeyParameters
2020 }
2121
2222
2323 static member Create
24- ( identityDigest : IdentityKey )
24+ ( identityDigest : Fingerprint )
2525 ( nTorOnionKey : NTorOnionKey )
2626 =
2727
You can’t perform that action at this time.
0 commit comments