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
5928c698
Commit
5928c698
authored
Oct 23, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Oct 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Implement CertVerifyRevocation.
parent
3b85a794
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
8 deletions
+75
-8
cert.c
dlls/crypt32/cert.c
+75
-2
cert.c
dlls/crypt32/tests/cert.c
+0
-6
No files found.
dlls/crypt32/cert.c
View file @
5928c698
...
...
@@ -1231,13 +1231,86 @@ PCCERT_CONTEXT WINAPI CertGetIssuerCertificateFromStore(HCERTSTORE hCertStore,
return
ret
;
}
typedef
struct
_OLD_CERT_REVOCATION_STATUS
{
DWORD
cbSize
;
DWORD
dwIndex
;
DWORD
dwError
;
DWORD
dwReason
;
}
OLD_CERT_REVOCATION_STATUS
,
*
POLD_CERT_REVOCATION_STATUS
;
typedef
BOOL
(
WINAPI
*
CertVerifyRevocationFunc
)(
DWORD
,
DWORD
,
DWORD
,
void
**
,
DWORD
,
PCERT_REVOCATION_PARA
,
PCERT_REVOCATION_STATUS
);
BOOL
WINAPI
CertVerifyRevocation
(
DWORD
dwEncodingType
,
DWORD
dwRevType
,
DWORD
cContext
,
void
*
rgpvContext
[],
DWORD
dwFlags
,
PCERT_REVOCATION_PARA
pRevPara
,
PCERT_REVOCATION_STATUS
pRevStatus
)
{
FIXME
(
"(%08x, %d, %d, %p, %08x, %p, %p): stub
\n
"
,
dwEncodingType
,
dwRevType
,
BOOL
ret
;
TRACE
(
"(%08x, %d, %d, %p, %08x, %p, %p)
\n
"
,
dwEncodingType
,
dwRevType
,
cContext
,
rgpvContext
,
dwFlags
,
pRevPara
,
pRevStatus
);
return
FALSE
;
if
(
pRevStatus
->
cbSize
!=
sizeof
(
OLD_CERT_REVOCATION_STATUS
)
&&
pRevStatus
->
cbSize
!=
sizeof
(
CERT_REVOCATION_STATUS
))
{
SetLastError
(
E_INVALIDARG
);
return
FALSE
;
}
if
(
cContext
)
{
static
HCRYPTOIDFUNCSET
set
=
NULL
;
DWORD
size
;
if
(
!
set
)
set
=
CryptInitOIDFunctionSet
(
CRYPT_OID_VERIFY_REVOCATION_FUNC
,
0
);
ret
=
CryptGetDefaultOIDDllList
(
set
,
dwEncodingType
,
NULL
,
&
size
);
if
(
ret
)
{
if
(
size
==
1
)
{
/* empty list */
SetLastError
(
CRYPT_E_NO_REVOCATION_DLL
);
ret
=
FALSE
;
}
else
{
LPWSTR
dllList
=
CryptMemAlloc
(
size
*
sizeof
(
WCHAR
)),
ptr
;
if
(
dllList
)
{
ret
=
CryptGetDefaultOIDDllList
(
set
,
dwEncodingType
,
dllList
,
&
size
);
if
(
ret
)
{
for
(
ptr
=
dllList
;
ret
&&
*
ptr
;
ptr
+=
lstrlenW
(
ptr
)
+
1
)
{
CertVerifyRevocationFunc
func
;
HCRYPTOIDFUNCADDR
hFunc
;
ret
=
CryptGetDefaultOIDFunctionAddress
(
set
,
dwEncodingType
,
ptr
,
0
,
(
void
**
)
&
func
,
&
hFunc
);
if
(
ret
)
{
ret
=
func
(
dwEncodingType
,
dwRevType
,
cContext
,
rgpvContext
,
dwFlags
,
pRevPara
,
pRevStatus
);
CryptFreeOIDFunctionAddress
(
hFunc
,
0
);
}
}
}
CryptMemFree
(
dllList
);
}
else
{
SetLastError
(
ERROR_OUTOFMEMORY
);
ret
=
FALSE
;
}
}
}
}
else
ret
=
TRUE
;
return
ret
;
}
PCRYPT_ATTRIBUTE
WINAPI
CertFindAttribute
(
LPCSTR
pszObjId
,
DWORD
cAttr
,
...
...
dlls/crypt32/tests/cert.c
View file @
5928c698
...
...
@@ -2587,27 +2587,21 @@ static void testVerifyRevocation(void)
*/
SetLastError
(
0xdeadbeef
);
ret
=
CertVerifyRevocation
(
0
,
0
,
0
,
NULL
,
0
,
NULL
,
&
status
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %08x
\n
"
,
GetLastError
());
status
.
cbSize
=
sizeof
(
status
);
ret
=
CertVerifyRevocation
(
0
,
0
,
0
,
NULL
,
0
,
NULL
,
&
status
);
todo_wine
ok
(
ret
,
"CertVerifyRevocation failed: %08x
\n
"
,
GetLastError
());
ret
=
CertVerifyRevocation
(
0
,
2
,
0
,
NULL
,
0
,
NULL
,
&
status
);
todo_wine
ok
(
ret
,
"CertVerifyRevocation failed: %08x
\n
"
,
GetLastError
());
ret
=
CertVerifyRevocation
(
2
,
0
,
0
,
NULL
,
0
,
NULL
,
&
status
);
todo_wine
ok
(
ret
,
"CertVerifyRevocation failed: %08x
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
CertVerifyRevocation
(
0
,
0
,
1
,
(
void
**
)
&
cert
,
0
,
NULL
,
&
status
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_NO_REVOCATION_DLL
,
"Expected CRYPT_E_NO_REVOCATION_DLL, got %08x
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
CertVerifyRevocation
(
0
,
2
,
1
,
(
void
**
)
&
cert
,
0
,
NULL
,
&
status
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_NO_REVOCATION_DLL
,
"Expected CRYPT_E_NO_REVOCATION_DLL, got %08x
\n
"
,
GetLastError
());
...
...
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