Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
12195b32
Commit
12195b32
authored
Mar 13, 2011
by
Ken Thomases
Committed by
Alexandre Julliard
Mar 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Extract schan_imp_get_session_peer_certificate function.
parent
9b85662f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
17 deletions
+22
-17
schannel.c
dlls/secur32/schannel.c
+22
-17
No files found.
dlls/secur32/schannel.c
View file @
12195b32
...
@@ -72,6 +72,26 @@ MAKE_FUNCPTR(gnutls_transport_set_push_function);
...
@@ -72,6 +72,26 @@ MAKE_FUNCPTR(gnutls_transport_set_push_function);
#undef MAKE_FUNCPTR
#undef MAKE_FUNCPTR
static
SECURITY_STATUS
schan_imp_get_session_peer_certificate
(
gnutls_session_t
s
,
PCCERT_CONTEXT
*
cert
)
{
unsigned
int
list_size
;
const
gnutls_datum_t
*
datum
;
datum
=
pgnutls_certificate_get_peers
(
s
,
&
list_size
);
if
(
datum
)
{
*
cert
=
CertCreateCertificateContext
(
X509_ASN_ENCODING
,
datum
->
data
,
datum
->
size
);
if
(
!*
cert
)
return
GetLastError
();
else
return
SEC_E_OK
;
}
else
return
SEC_E_INTERNAL_ERROR
;
}
static
SECURITY_STATUS
schan_imp_send
(
gnutls_session_t
s
,
const
void
*
buffer
,
static
SECURITY_STATUS
schan_imp_send
(
gnutls_session_t
s
,
const
void
*
buffer
,
size_t
*
length
)
size_t
*
length
)
{
{
...
@@ -1014,23 +1034,8 @@ static SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesW(
...
@@ -1014,23 +1034,8 @@ static SECURITY_STATUS SEC_ENTRY schan_QueryContextAttributesW(
}
}
case
SECPKG_ATTR_REMOTE_CERT_CONTEXT
:
case
SECPKG_ATTR_REMOTE_CERT_CONTEXT
:
{
{
unsigned
int
list_size
;
PCCERT_CONTEXT
*
cert
=
buffer
;
const
gnutls_datum_t
*
datum
;
return
schan_imp_get_session_peer_certificate
(
ctx
->
session
,
cert
);
datum
=
pgnutls_certificate_get_peers
(
ctx
->
session
,
&
list_size
);
if
(
datum
)
{
PCCERT_CONTEXT
*
cert
=
buffer
;
*
cert
=
CertCreateCertificateContext
(
X509_ASN_ENCODING
,
datum
->
data
,
datum
->
size
);
if
(
!*
cert
)
return
GetLastError
();
else
return
SEC_E_OK
;
}
else
return
SEC_E_INTERNAL_ERROR
;
}
}
case
SECPKG_ATTR_CONNECTION_INFO
:
case
SECPKG_ATTR_CONNECTION_INFO
:
{
{
...
...
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