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
d7bd274e
Commit
d7bd274e
authored
Oct 01, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32/tests: Make some variables static.
parent
55676e84
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
19 deletions
+14
-19
base64.c
dlls/crypt32/tests/base64.c
+7
-12
encode.c
dlls/crypt32/tests/encode.c
+2
-2
main.c
dlls/crypt32/tests/main.c
+1
-1
str.c
dlls/crypt32/tests/str.c
+4
-4
No files found.
dlls/crypt32/tests/base64.c
View file @
d7bd274e
...
...
@@ -40,15 +40,12 @@
#define X509_HEADER_NOCR "-----BEGIN X509 CRL-----\n"
#define X509_TRAILER_NOCR "-----END X509 CRL-----\n"
typedef
BOOL
(
WINAPI
*
CryptBinaryToStringAFunc
)(
const
BYTE
*
pbBinary
,
static
BOOL
(
WINAPI
*
pCryptBinaryToStringA
)(
const
BYTE
*
pbBinary
,
DWORD
cbBinary
,
DWORD
dwFlags
,
LPSTR
pszString
,
DWORD
*
pcchString
);
typedef
BOOL
(
WINAPI
*
CryptStringToBinaryAFunc
)(
LPCSTR
pszString
,
static
BOOL
(
WINAPI
*
pCryptStringToBinaryA
)(
LPCSTR
pszString
,
DWORD
cchString
,
DWORD
dwFlags
,
BYTE
*
pbBinary
,
DWORD
*
pcbBinary
,
DWORD
*
pdwSkip
,
DWORD
*
pdwFlags
);
CryptBinaryToStringAFunc
pCryptBinaryToStringA
;
CryptStringToBinaryAFunc
pCryptStringToBinaryA
;
struct
BinTests
{
const
BYTE
*
toEncode
;
...
...
@@ -64,7 +61,7 @@ static const BYTE toEncode4[] =
"abcdefghijlkmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890"
"abcdefghijlkmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890"
;
struct
BinTests
tests
[]
=
{
st
atic
const
st
ruct
BinTests
tests
[]
=
{
{
toEncode1
,
sizeof
(
toEncode1
),
"AA==
\r\n
"
,
},
{
toEncode2
,
sizeof
(
toEncode2
),
"AQI=
\r\n
"
,
},
/* { toEncode3, sizeof(toEncode3), "AQID\r\n", }, This test fails on Vista. */
...
...
@@ -76,7 +73,7 @@ struct BinTests tests[] = {
"SElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0NTY3ODkwAA==
\r\n
"
},
};
struct
BinTests
testsNoCR
[]
=
{
st
atic
const
st
ruct
BinTests
testsNoCR
[]
=
{
{
toEncode1
,
sizeof
(
toEncode1
),
"AA==
\n
"
,
},
{
toEncode2
,
sizeof
(
toEncode2
),
"AQI=
\n
"
,
},
/* { toEncode3, sizeof(toEncode3), "AQID\n", }, This test fails on Vista. */
...
...
@@ -306,7 +303,7 @@ struct BadString
DWORD
format
;
};
struct
BadString
badStrings
[]
=
{
st
atic
const
st
ruct
BadString
badStrings
[]
=
{
{
"A
\r\n
A
\r\n
=
\r\n
=
\r\n
"
,
CRYPT_STRING_BASE64
},
{
"AA
\r\n
=
\r\n
=
\r\n
"
,
CRYPT_STRING_BASE64
},
{
"AA=
\r\n
=
\r\n
"
,
CRYPT_STRING_BASE64
},
...
...
@@ -441,10 +438,8 @@ START_TEST(base64)
{
HMODULE
lib
=
GetModuleHandleA
(
"crypt32"
);
pCryptBinaryToStringA
=
(
CryptBinaryToStringAFunc
)
GetProcAddress
(
lib
,
"CryptBinaryToStringA"
);
pCryptStringToBinaryA
=
(
CryptStringToBinaryAFunc
)
GetProcAddress
(
lib
,
"CryptStringToBinaryA"
);
pCryptBinaryToStringA
=
(
void
*
)
GetProcAddress
(
lib
,
"CryptBinaryToStringA"
);
pCryptStringToBinaryA
=
(
void
*
)
GetProcAddress
(
lib
,
"CryptStringToBinaryA"
);
if
(
pCryptBinaryToStringA
)
testBinaryToStringA
();
...
...
dlls/crypt32/tests/encode.c
View file @
d7bd274e
...
...
@@ -2356,7 +2356,7 @@ struct EncodedRSAPubKey
size_t
decodedModulusLen
;
};
struct
EncodedRSAPubKey
rsaPubKeys
[]
=
{
st
atic
const
st
ruct
EncodedRSAPubKey
rsaPubKeys
[]
=
{
{
modulus1
,
sizeof
(
modulus1
),
mod1_encoded
,
sizeof
(
modulus1
)
},
{
modulus2
,
sizeof
(
modulus2
),
mod2_encoded
,
5
},
{
modulus3
,
sizeof
(
modulus3
),
mod3_encoded
,
5
},
...
...
@@ -7137,7 +7137,7 @@ static CERT_GENERAL_SUBTREE IPAddressWithMinSubtree = {
static
CERT_GENERAL_SUBTREE
IPAddressWithMinMaxSubtree
=
{
{
CERT_ALT_NAME_IP_ADDRESS
,
{
0
}
},
5
,
TRUE
,
3
};
struct
EncodedNameConstraints
encodedNameConstraints
[]
=
{
st
atic
const
st
ruct
EncodedNameConstraints
encodedNameConstraints
[]
=
{
{
{
sizeof
(
emptySequence
),
(
LPBYTE
)
emptySequence
},
{
0
}
},
{
{
sizeof
(
emptyDNSPermittedConstraints
),
emptyDNSPermittedConstraints
},
{
1
,
&
emptyDNSSubtree
,
0
,
NULL
}
},
...
...
dlls/crypt32/tests/main.c
View file @
d7bd274e
...
...
@@ -28,7 +28,7 @@
#include "wine/test.h"
HMODULE
hCrypt
;
static
HMODULE
hCrypt
;
static
void
test_findAttribute
(
void
)
{
...
...
dlls/crypt32/tests/str.c
View file @
d7bd274e
...
...
@@ -191,7 +191,7 @@ typedef BOOL (WINAPI *CertStrToNameWFunc)(DWORD dwCertEncodingType,
LPCWSTR
pszX500
,
DWORD
dwStrType
,
void
*
pvReserved
,
BYTE
*
pbEncoded
,
DWORD
*
pcbEncoded
,
LPCWSTR
*
ppszError
);
HMODULE
dll
;
static
HMODULE
dll
;
static
CertNameToStrAFunc
pCertNameToStrA
;
static
CertNameToStrWFunc
pCertNameToStrW
;
static
CryptDecodeObjectFunc
pCryptDecodeObject
;
...
...
@@ -470,7 +470,7 @@ struct StrToNameA
const
BYTE
*
encoded
;
};
const
BYTE
encodedSimpleCN
[]
=
{
static
const
BYTE
encodedSimpleCN
[]
=
{
0x30
,
0x0c
,
0x31
,
0x0a
,
0x30
,
0x08
,
0x06
,
0x03
,
0x55
,
0x04
,
0x03
,
0x13
,
0x01
,
0x31
};
static
const
BYTE
encodedSingleQuotedCN
[]
=
{
0x30
,
0x0e
,
0x31
,
0x0c
,
0x30
,
0x0a
,
0x06
,
0x03
,
0x55
,
0x04
,
0x03
,
0x13
,
0x03
,
0x27
,
0x31
,
0x27
};
...
...
@@ -481,7 +481,7 @@ static const BYTE encodedQuotedCN[] = { 0x30,0x11,0x31,0x0f,0x30,0x0d,0x06,0x03,
static
const
BYTE
encodedMultipleAttrCN
[]
=
{
0x30
,
0x0e
,
0x31
,
0x0c
,
0x30
,
0x0a
,
0x06
,
0x03
,
0x55
,
0x04
,
0x03
,
0x13
,
0x03
,
0x31
,
0x2b
,
0x32
};
struct
StrToNameA
namesA
[]
=
{
st
atic
const
st
ruct
StrToNameA
namesA
[]
=
{
{
"CN=1"
,
sizeof
(
encodedSimpleCN
),
encodedSimpleCN
},
{
"CN=
\"
1
\"
"
,
sizeof
(
encodedSimpleCN
),
encodedSimpleCN
},
{
"CN =
\"
1
\"
"
,
sizeof
(
encodedSimpleCN
),
encodedSimpleCN
},
...
...
@@ -562,7 +562,7 @@ static const WCHAR japaneseCN_W[] = { 'C','N','=',0x226f,0x575b,0 };
static
const
BYTE
encodedJapaneseCN
[]
=
{
0x30
,
0x0f
,
0x31
,
0x0d
,
0x30
,
0x0b
,
0x06
,
0x03
,
0x55
,
0x04
,
0x03
,
0x1e
,
0x04
,
0x22
,
0x6f
,
0x57
,
0x5b
};
struct
StrToNameW
namesW
[]
=
{
st
atic
const
st
ruct
StrToNameW
namesW
[]
=
{
{
simpleCN_W
,
sizeof
(
encodedSimpleCN
),
encodedSimpleCN
},
{
simpleCN2_W
,
sizeof
(
encodedSimpleCN
),
encodedSimpleCN
},
{
simpleCN3_W
,
sizeof
(
encodedSimpleCN
),
encodedSimpleCN
},
...
...
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