Skip to content

Commit

Permalink
Dependency for libgssapi updated to version 0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mfriebe committed Dec 20, 2024
1 parent 51f0cbb commit 3d11467
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions src/client/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,14 +347,14 @@ impl<S: AsyncRead + AsyncWrite + Unpin + Send> Connection<S> {

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())));

Expand All @@ -365,7 +365,7 @@ impl<S: AsyncRead + AsyncWrite + Unpin + Send> Connection<S> {

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()))
Expand Down

0 comments on commit 3d11467

Please sign in to comment.