diff --git a/Cargo.toml b/Cargo.toml index 9d8ccf95..0caaac81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,7 @@ uuid = "1.0" winauth = { version = "0.0.4", optional = true } [target.'cfg(unix)'.dependencies] -libgssapi = { version = "0.4.5", optional = true, default-features = false } +libgssapi = { version = "0.8.1", optional = true, default-features = false } [dependencies.async-native-tls] version = "0.4" diff --git a/src/client/connection.rs b/src/client/connection.rs index c6ce1d66..09d37256 100644 --- a/src/client/connection.rs +++ b/src/client/connection.rs @@ -347,14 +347,14 @@ impl Connection { let client_cred = Cred::acquire(None, None, CredUsage::Initiate, Some(&s))?; - let ctx = ClientCtx::new( - client_cred, + let mut ctx = ClientCtx::new( + Some(client_cred), Name::new(self.context.spn().as_bytes(), Some(&GSS_NT_KRB5_PRINCIPAL))?, CtxFlags::GSS_C_MUTUAL_FLAG | CtxFlags::GSS_C_SEQUENCE_FLAG, None, ); - let init_token = ctx.step(None)?; + let init_token = ctx.step(None, None)?; login_message.integrated_security(Some(Vec::from(init_token.unwrap().deref()))); @@ -365,7 +365,7 @@ impl Connection { let auth_bytes = self.flush_sspi().await?; - let next_token = match ctx.step(Some(auth_bytes.as_ref()))? { + let next_token = match ctx.step(Some(auth_bytes.as_ref()), None)? { Some(response) => { event!(Level::TRACE, response_len = response.len()); TokenSspi::new(Vec::from(response.deref()))