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
f86ab49b
Commit
f86ab49b
authored
May 30, 2012
by
Juan Lang
Committed by
Alexandre Julliard
May 31, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Initialize key spec correctly.
parent
1a03839b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
cert.c
dlls/crypt32/cert.c
+2
-2
cert.c
dlls/crypt32/tests/cert.c
+0
-2
No files found.
dlls/crypt32/cert.c
View file @
f86ab49b
...
...
@@ -3139,7 +3139,7 @@ PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate(HCRYPTPROV_OR_NCRYPT_KEY_HAN
PCCERT_CONTEXT
context
=
NULL
;
BOOL
ret
,
releaseContext
=
FALSE
;
PCERT_PUBLIC_KEY_INFO
pubKey
=
NULL
;
DWORD
pubKeySize
=
0
,
dwKeySpec
=
AT_SIGNATURE
;
DWORD
pubKeySize
=
0
,
dwKeySpec
;
TRACE
(
"(%08lx, %p, %08x, %p, %p, %p, %p, %p)
\n
"
,
hProv
,
pSubjectIssuerBlob
,
dwFlags
,
pKeyProvInfo
,
pSignatureAlgorithm
,
pStartTime
,
...
...
@@ -3151,6 +3151,7 @@ PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate(HCRYPTPROV_OR_NCRYPT_KEY_HAN
return
NULL
;
}
dwKeySpec
=
pKeyProvInfo
?
pKeyProvInfo
->
dwKeySpec
:
AT_SIGNATURE
;
if
(
!
hProv
)
{
if
(
!
pKeyProvInfo
)
...
...
@@ -3181,7 +3182,6 @@ PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate(HCRYPTPROV_OR_NCRYPT_KEY_HAN
if
(
!
ret
)
return
NULL
;
}
dwKeySpec
=
pKeyProvInfo
->
dwKeySpec
;
/* check if the key is here */
ret
=
CryptGetUserKey
(
hProv
,
dwKeySpec
,
&
hKey
);
if
(
!
ret
)
...
...
dlls/crypt32/tests/cert.c
View file @
f86ab49b
...
...
@@ -2156,7 +2156,6 @@ static void testCreateSelfSignCert(void)
SetLastError
(
0xdeadbeef
);
context
=
pCertCreateSelfSignCertificate
(
csp
,
&
name
,
0
,
&
info
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
context
==
NULL
,
"expected failure
\n
"
);
if
(
context
!=
NULL
)
CertFreeCertificateContext
(
context
);
...
...
@@ -2278,7 +2277,6 @@ static void testCreateSelfSignCert(void)
SetLastError
(
0xdeadbeef
);
context
=
pCertCreateSelfSignCertificate
(
csp
,
&
name
,
0
,
&
info
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
context
==
NULL
,
"expected failure
\n
"
);
if
(
context
!=
NULL
)
CertFreeCertificateContext
(
context
);
...
...
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