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
cdbf6e86
Commit
cdbf6e86
authored
Dec 05, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Dec 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32/tests: Don't pass as a parameter a variable that could be local.
parent
a5facc9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
cert.c
dlls/crypt32/tests/cert.c
+7
-8
No files found.
dlls/crypt32/tests/cert.c
View file @
cdbf6e86
...
...
@@ -1639,16 +1639,16 @@ static void verifySig(HCRYPTPROV csp, const BYTE *toSign, size_t toSignLen,
/* Tests signing the certificate described by toBeSigned with the CSP passed in,
* using the algorithm with OID sigOID. The CSP is assumed to be empty, and a
* keyset named AT_SIGNATURE will be added to it. The signing key will be
* stored in *key, and the signature will be stored in sig. sigLen should be
* at least 64 bytes.
* keyset named AT_SIGNATURE will be added to it. The signature will be stored
* in sig. sigLen should be at least 64 bytes.
*/
static
void
testSignCert
(
HCRYPTPROV
csp
,
const
CRYPT_DATA_BLOB
*
toBeSigned
,
LPCSTR
sigOID
,
HCRYPTKEY
*
key
,
BYTE
*
sig
,
DWORD
*
sigLen
)
LPCSTR
sigOID
,
BYTE
*
sig
,
DWORD
*
sigLen
)
{
BOOL
ret
;
DWORD
size
=
0
;
CRYPT_ALGORITHM_IDENTIFIER
algoID
=
{
NULL
,
{
0
,
NULL
}
};
HCRYPTKEY
key
;
/* These all crash
ret = CryptSignCertificate(0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL);
...
...
@@ -1680,7 +1680,7 @@ static void testSignCert(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigned,
ok
(
!
ret
&&
(
GetLastError
()
==
NTE_BAD_KEYSET
||
GetLastError
()
==
NTE_NO_KEY
),
"Expected NTE_BAD_KEYSET or NTE_NO_KEY, got %08x
\n
"
,
GetLastError
());
ret
=
CryptGenKey
(
csp
,
AT_SIGNATURE
,
0
,
key
);
ret
=
CryptGenKey
(
csp
,
AT_SIGNATURE
,
0
,
&
key
);
ok
(
ret
,
"CryptGenKey failed: %08x
\n
"
,
GetLastError
());
if
(
ret
)
{
...
...
@@ -1700,6 +1700,7 @@ static void testSignCert(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigned,
size
);
}
}
CryptDestroyKey
(
key
);
}
}
...
...
@@ -1809,7 +1810,6 @@ static void testCertSigs(void)
HCRYPTPROV
csp
;
CRYPT_DATA_BLOB
toBeSigned
=
{
sizeof
(
emptyCert
),
emptyCert
};
BOOL
ret
;
HCRYPTKEY
key
;
BYTE
sig
[
64
];
DWORD
sigSize
=
sizeof
(
sig
);
...
...
@@ -1820,10 +1820,9 @@ static void testCertSigs(void)
CRYPT_NEWKEYSET
);
ok
(
ret
,
"CryptAcquireContext failed: %08x
\n
"
,
GetLastError
());
testSignCert
(
csp
,
&
toBeSigned
,
szOID_RSA_SHA1RSA
,
&
key
,
sig
,
&
sigSize
);
testSignCert
(
csp
,
&
toBeSigned
,
szOID_RSA_SHA1RSA
,
sig
,
&
sigSize
);
testVerifyCertSig
(
csp
,
&
toBeSigned
,
szOID_RSA_SHA1RSA
,
sig
,
sigSize
);
CryptDestroyKey
(
key
);
CryptReleaseContext
(
csp
,
0
);
ret
=
pCryptAcquireContextA
(
&
csp
,
cspNameA
,
MS_DEF_PROV_A
,
PROV_RSA_FULL
,
CRYPT_DELETEKEYSET
);
...
...
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