Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
12b5da66
Commit
12b5da66
authored
Apr 03, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Apr 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wldap32: Skip over the TLS certificate check if not using TLS.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54772
parent
b5ba4baa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
init.c
dlls/wldap32/init.c
+10
-10
parse.c
dlls/wldap32/tests/parse.c
+2
-0
No files found.
dlls/wldap32/init.c
View file @
12b5da66
...
...
@@ -271,17 +271,17 @@ ULONG CDECL WLDAP32_ldap_connect( LDAP *ld, struct l_timeval *timeout )
if
((
ret
=
ldap_get_option
(
CTX
(
ld
),
LDAP_OPT_X_TLS_SSL_CTX
,
&
tls_context
)))
return
map_error
(
ret
);
if
(
QueryContextAttributesA
(
tls_context
,
SECPKG_ATTR_REMOTE_CERT_CONTEXT
,
&
cert
)
!=
SEC_E_OK
)
return
WLDAP32_LDAP_SERVER_DOWN
;
if
(
cert_callback
(
ld
,
&
cert
))
{
TRACE
(
"accepted
\n
"
);
}
else
if
(
QueryContextAttributesA
(
tls_context
,
SECPKG_ATTR_REMOTE_CERT_CONTEXT
,
&
cert
)
==
SEC_E_OK
)
{
WARN
(
"rejected
\n
"
);
return
WLDAP32_LDAP_SERVER_DOWN
;
if
(
cert_callback
(
ld
,
&
cert
))
{
TRACE
(
"accepted
\n
"
);
}
else
{
WARN
(
"rejected
\n
"
);
return
WLDAP32_LDAP_SERVER_DOWN
;
}
}
}
...
...
dlls/wldap32/tests/parse.c
View file @
12b5da66
...
...
@@ -586,6 +586,8 @@ static void test_opt_server_certificate(void)
ok
(
!
ret
,
"ldap_set_optionA should succeed, got %#lx
\n
"
,
ret
);
ret
=
ldap_set_optionA
(
ld
,
LDAP_OPT_SERVER_CERTIFICATE
,
&
verify_certificate
);
ok
(
!
ret
,
"ldap_set_optionA should succeed, got %#lx
\n
"
,
ret
);
ret
=
ldap_connect
(
ld
,
NULL
);
ok
(
!
ret
,
"ldap_connect should succeed, got %#lx
\n
"
,
ret
);
ret
=
ldap_start_tls_sA
(
ld
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
ret
==
LDAP_LOCAL_ERROR
,
"ldap_start_tls_sA should fail, got %#lx
\n
"
,
ret
);
ldap_unbind
(
ld
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment