diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-01-18 18:35:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-18 18:35:12 +0100 |
commit | 34b99fec8edcff7d3b667f273afea69df15e4d5e (patch) | |
tree | 108ea1800b83641023baede5bf9bceba8238f203 /cli/ops/tls.rs | |
parent | 4f1fa82d1d0458170039d4809c3879993659e560 (diff) |
rename dial to connect and dialTLS to connectTLS (#3710)
Diffstat (limited to 'cli/ops/tls.rs')
-rw-r--r-- | cli/ops/tls.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cli/ops/tls.rs b/cli/ops/tls.rs index 4bbab3f4e..fc2dec0d1 100644 --- a/cli/ops/tls.rs +++ b/cli/ops/tls.rs @@ -36,7 +36,10 @@ use webpki::DNSNameRef; use webpki_roots; pub fn init(i: &mut Isolate, s: &ThreadSafeState) { - i.register_op("dial_tls", s.core_op(json_op(s.stateful_op(op_dial_tls)))); + i.register_op( + "connect_tls", + s.core_op(json_op(s.stateful_op(op_connect_tls))), + ); i.register_op( "listen_tls", s.core_op(json_op(s.stateful_op(op_listen_tls))), @@ -49,18 +52,18 @@ pub fn init(i: &mut Isolate, s: &ThreadSafeState) { #[derive(Deserialize)] #[serde(rename_all = "camelCase")] -struct DialTLSArgs { +struct ConnectTLSArgs { hostname: String, port: u16, cert_file: Option<String>, } -pub fn op_dial_tls( +pub fn op_connect_tls( state: &ThreadSafeState, args: Value, _zero_copy: Option<PinnedBuf>, ) -> Result<JsonOp, ErrBox> { - let args: DialTLSArgs = serde_json::from_value(args)?; + let args: ConnectTLSArgs = serde_json::from_value(args)?; let cert_file = args.cert_file.clone(); let state_ = state.clone(); state.check_net(&args.hostname, args.port)?; |