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
b92d1c7f
Commit
b92d1c7f
authored
May 08, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
May 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32/tests: Cleanup registry after tests.
parent
b3b6a227
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
3 deletions
+28
-3
oid.c
dlls/crypt32/tests/oid.c
+28
-3
No files found.
dlls/crypt32/tests/oid.c
View file @
b92d1c7f
...
...
@@ -310,16 +310,32 @@ static void test_registerOIDFunction(void)
ret
=
CryptUnregisterOIDFunction
(
X509_ASN_ENCODING
,
"bogus"
,
"1.2.3.4.5.6.7.8.9.10"
);
ok
(
ret
,
"CryptUnregisterOIDFunction failed: %d
\n
"
,
GetLastError
());
/* This has no effect */
/* Unwanted Cryptography\OID\EncodingType 1\bogus\ will still be there */
ok
(
!
RegDeleteKeyA
(
HKEY_LOCAL_MACHINE
,
"SOFTWARE
\\
Microsoft
\\
Cryptography
\\
OID
\\
EncodingType 1
\\
bogus"
),
"Could not delete bogus key
\n
"
);
/* Shouldn't have effect but registry keys are created */
ret
=
CryptRegisterOIDFunction
(
PKCS_7_ASN_ENCODING
,
"CryptDllEncodeObject"
,
"1.2.3.4.5.6.7.8.9.10"
,
bogusDll
,
NULL
);
ok
(
ret
,
"CryptRegisterOIDFunction failed: %d
\n
"
,
GetLastError
());
/* Check with bogus encoding type: */
ret
=
CryptUnregisterOIDFunction
(
PKCS_7_ASN_ENCODING
,
"CryptDllEncodeObject"
,
"1.2.3.4.5.6.7.8.9.10"
);
ok
(
ret
,
"CryptUnregisterOIDFunction failed: %d
\n
"
,
GetLastError
());
/* Check with bogus encoding type. Registry keys are still created */
ret
=
CryptRegisterOIDFunction
(
0
,
"CryptDllEncodeObject"
,
"1.2.3.4.5.6.7.8.9.10"
,
bogusDll
,
NULL
);
ok
(
ret
,
"CryptRegisterOIDFunction failed: %d
\n
"
,
GetLastError
());
ret
=
CryptUnregisterOIDFunction
(
0
,
"CryptDllEncodeObject"
,
"1.2.3.4.5.6.7.8.9.10"
);
ok
(
ret
,
"CryptUnregisterOIDFunction failed: %d
\n
"
,
GetLastError
());
/* Unwanted Cryptography\OID\EncodingType 0\CryptDllEncodeObject\
* will still be there
*/
ok
(
!
RegDeleteKeyA
(
HKEY_LOCAL_MACHINE
,
"SOFTWARE
\\
Microsoft
\\
Cryptography
\\
OID
\\
EncodingType 0
\\
CryptDllEncodeObject"
),
"Could not delete CryptDllEncodeObject key
\n
"
);
/* This is written with value 3 verbatim. Thus, the encoding type isn't
* (for now) treated as a mask.
* (for now) treated as a mask.
Registry keys are created.
*/
ret
=
CryptRegisterOIDFunction
(
3
,
"CryptDllEncodeObject"
,
"1.2.3.4.5.6.7.8.9.10"
,
bogusDll
,
NULL
);
...
...
@@ -327,6 +343,15 @@ static void test_registerOIDFunction(void)
ret
=
CryptUnregisterOIDFunction
(
3
,
"CryptDllEncodeObject"
,
"1.2.3.4.5.6.7.8.9.10"
);
ok
(
ret
,
"CryptUnregisterOIDFunction failed: %d
\n
"
,
GetLastError
());
/* Unwanted Cryptography\OID\EncodingType 3\CryptDllEncodeObject
* will still be there.
*/
ok
(
!
RegDeleteKeyA
(
HKEY_LOCAL_MACHINE
,
"SOFTWARE
\\
Microsoft
\\
Cryptography
\\
OID
\\
EncodingType 3
\\
CryptDllEncodeObject"
),
"Could not delete CryptDllEncodeObject key
\n
"
);
ok
(
!
RegDeleteKeyA
(
HKEY_LOCAL_MACHINE
,
"SOFTWARE
\\
Microsoft
\\
Cryptography
\\
OID
\\
EncodingType 3"
),
"Could not delete 'EncodingType 3' key
\n
"
);
}
static
void
test_registerDefaultOIDFunction
(
void
)
...
...
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