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
937488c2
Commit
937488c2
authored
Oct 06, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Improve error handling for gnutls_certificate_allocate_credentials().
parent
79d88ffe
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
schannel.c
dlls/secur32/schannel.c
+15
-7
No files found.
dlls/secur32/schannel.c
View file @
937488c2
...
@@ -46,6 +46,7 @@ MAKE_FUNCPTR(gnutls_global_deinit);
...
@@ -46,6 +46,7 @@ MAKE_FUNCPTR(gnutls_global_deinit);
MAKE_FUNCPTR
(
gnutls_global_init
);
MAKE_FUNCPTR
(
gnutls_global_init
);
MAKE_FUNCPTR
(
gnutls_global_set_log_function
);
MAKE_FUNCPTR
(
gnutls_global_set_log_function
);
MAKE_FUNCPTR
(
gnutls_global_set_log_level
);
MAKE_FUNCPTR
(
gnutls_global_set_log_level
);
MAKE_FUNCPTR
(
gnutls_perror
);
#undef MAKE_FUNCPTR
#undef MAKE_FUNCPTR
#define SCHAN_INVALID_HANDLE ~0UL
#define SCHAN_INVALID_HANDLE ~0UL
...
@@ -262,6 +263,7 @@ static SECURITY_STATUS schan_CheckCreds(const SCHANNEL_CRED *schanCred)
...
@@ -262,6 +263,7 @@ static SECURITY_STATUS schan_CheckCreds(const SCHANNEL_CRED *schanCred)
static
SECURITY_STATUS
schan_AcquireClientCredentials
(
const
SCHANNEL_CRED
*
schanCred
,
static
SECURITY_STATUS
schan_AcquireClientCredentials
(
const
SCHANNEL_CRED
*
schanCred
,
PCredHandle
phCredential
,
PTimeStamp
ptsExpiry
)
PCredHandle
phCredential
,
PTimeStamp
ptsExpiry
)
{
{
struct
schan_credentials
*
creds
;
SECURITY_STATUS
st
=
SEC_E_OK
;
SECURITY_STATUS
st
=
SEC_E_OK
;
TRACE
(
"schanCred %p, phCredential %p, ptsExpiry %p
\n
"
,
schanCred
,
phCredential
,
ptsExpiry
);
TRACE
(
"schanCred %p, phCredential %p, ptsExpiry %p
\n
"
,
schanCred
,
phCredential
,
ptsExpiry
);
...
@@ -279,20 +281,21 @@ static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schan
...
@@ -279,20 +281,21 @@ static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schan
if
(
st
==
SEC_E_OK
)
if
(
st
==
SEC_E_OK
)
{
{
ULONG_PTR
handle
;
ULONG_PTR
handle
;
struct
schan_credentials
*
creds
;
int
ret
;
creds
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
creds
));
creds
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
creds
));
if
(
!
creds
)
return
SEC_E_INSUFFICIENT_MEMORY
;
if
(
!
creds
)
return
SEC_E_INSUFFICIENT_MEMORY
;
handle
=
schan_alloc_handle
(
creds
,
SCHAN_HANDLE_CRED
);
handle
=
schan_alloc_handle
(
creds
,
SCHAN_HANDLE_CRED
);
if
(
handle
==
SCHAN_INVALID_HANDLE
)
if
(
handle
==
SCHAN_INVALID_HANDLE
)
goto
fail
;
{
HeapFree
(
GetProcessHeap
(),
0
,
creds
);
return
SEC_E_INTERNAL_ERROR
;
}
creds
->
credential_use
=
SECPKG_CRED_OUTBOUND
;
creds
->
credential_use
=
SECPKG_CRED_OUTBOUND
;
pgnutls_certificate_allocate_credentials
(
&
creds
->
credentials
);
ret
=
pgnutls_certificate_allocate_credentials
(
&
creds
->
credentials
);
if
(
ret
!=
GNUTLS_E_SUCCESS
)
{
pgnutls_perror
(
ret
);
goto
fail
;
}
phCredential
->
dwLower
=
handle
;
phCredential
->
dwLower
=
handle
;
phCredential
->
dwUpper
=
0
;
phCredential
->
dwUpper
=
0
;
...
@@ -305,6 +308,10 @@ static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schan
...
@@ -305,6 +308,10 @@ static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schan
}
}
}
}
return
st
;
return
st
;
fail:
HeapFree
(
GetProcessHeap
(),
0
,
creds
);
return
SEC_E_INTERNAL_ERROR
;
}
}
static
SECURITY_STATUS
schan_AcquireServerCredentials
(
const
SCHANNEL_CRED
*
schanCred
,
static
SECURITY_STATUS
schan_AcquireServerCredentials
(
const
SCHANNEL_CRED
*
schanCred
,
...
@@ -548,6 +555,7 @@ void SECUR32_initSchannelSP(void)
...
@@ -548,6 +555,7 @@ void SECUR32_initSchannelSP(void)
LOAD_FUNCPTR
(
gnutls_global_init
)
LOAD_FUNCPTR
(
gnutls_global_init
)
LOAD_FUNCPTR
(
gnutls_global_set_log_function
)
LOAD_FUNCPTR
(
gnutls_global_set_log_function
)
LOAD_FUNCPTR
(
gnutls_global_set_log_level
)
LOAD_FUNCPTR
(
gnutls_global_set_log_level
)
LOAD_FUNCPTR
(
gnutls_perror
)
#undef LOAD_FUNCPTR
#undef LOAD_FUNCPTR
provider
=
SECUR32_addProvider
(
&
schanTableA
,
&
schanTableW
,
schannelDllName
);
provider
=
SECUR32_addProvider
(
&
schanTableA
,
&
schanTableW
,
schannelDllName
);
...
...
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