Skip to content

Commit 309ba61

Browse files
committed
fix(win32): initialize with a domain, if one is provided
1 parent 5394561 commit 309ba61

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/win32/kerberos_sspi.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ auth_sspi_client_init(WCHAR* service,
7373
authIdentity.UserLength = ulen;
7474
authIdentity.Password = (unsigned short*)password;
7575
authIdentity.PasswordLength = plen;
76-
authIdentity.Domain = NULL;
77-
authIdentity.DomainLength = 0;
76+
authIdentity.Domain = (unsigned short*)domain;
77+
authIdentity.DomainLength = dlen;
7878

7979
authIdentity.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE;
8080
}
@@ -269,7 +269,7 @@ auth_sspi_client_unwrap(sspi_client_state* state, SEC_CHAR* challenge) {
269269
result = sspi_error_result(status, "DecryptMessage");
270270
goto done;
271271
}
272-
272+
273273
if (wrapBufs[1].cbBuffer) {
274274
state->response = base64_encode((const SEC_CHAR*)wrapBufs[1].pvBuffer, wrapBufs[1].cbBuffer);
275275
if (!state->response) {

0 commit comments

Comments
 (0)