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
ff57ba9d
Commit
ff57ba9d
authored
Nov 20, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Nov 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptnet: Check CRL with verify time in CertDllVerifyRevocation.
parent
eee17920
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
cryptnet_main.c
dlls/cryptnet/cryptnet_main.c
+29
-1
No files found.
dlls/cryptnet/cryptnet_main.c
View file @
ff57ba9d
...
@@ -1441,6 +1441,15 @@ BOOL WINAPI CryptRetrieveObjectByUrlW(LPCWSTR pszURL, LPCSTR pszObjectOid,
...
@@ -1441,6 +1441,15 @@ BOOL WINAPI CryptRetrieveObjectByUrlW(LPCWSTR pszURL, LPCSTR pszObjectOid,
return
ret
;
return
ret
;
}
}
typedef
struct
_CERT_REVOCATION_PARA_NO_EXTRA_FIELDS
{
DWORD
cbSize
;
PCCERT_CONTEXT
pIssuerCert
;
DWORD
cCertStore
;
HCERTSTORE
*
rgCertStore
;
HCERTSTORE
hCrlStore
;
LPFILETIME
pftTimeToUse
;
}
CERT_REVOCATION_PARA_NO_EXTRA_FIELDS
,
*
PCERT_REVOCATION_PARA_NO_EXTRA_FIELDS
;
typedef
struct
_OLD_CERT_REVOCATION_STATUS
{
typedef
struct
_OLD_CERT_REVOCATION_STATUS
{
DWORD
cbSize
;
DWORD
cbSize
;
DWORD
dwIndex
;
DWORD
dwIndex
;
...
@@ -1457,6 +1466,8 @@ BOOL WINAPI CertDllVerifyRevocation(DWORD dwEncodingType, DWORD dwRevType,
...
@@ -1457,6 +1466,8 @@ BOOL WINAPI CertDllVerifyRevocation(DWORD dwEncodingType, DWORD dwRevType,
{
{
DWORD
error
=
0
,
i
;
DWORD
error
=
0
,
i
;
BOOL
ret
;
BOOL
ret
;
FILETIME
now
;
LPFILETIME
pTime
=
NULL
;
TRACE
(
"(%08x, %d, %d, %p, %08x, %p, %p)
\n
"
,
dwEncodingType
,
dwRevType
,
TRACE
(
"(%08x, %d, %d, %p, %08x, %p, %p)
\n
"
,
dwEncodingType
,
dwRevType
,
cContext
,
rgpvContext
,
dwFlags
,
pRevPara
,
pRevStatus
);
cContext
,
rgpvContext
,
dwFlags
,
pRevPara
,
pRevStatus
);
...
@@ -1472,6 +1483,14 @@ BOOL WINAPI CertDllVerifyRevocation(DWORD dwEncodingType, DWORD dwRevType,
...
@@ -1472,6 +1483,14 @@ BOOL WINAPI CertDllVerifyRevocation(DWORD dwEncodingType, DWORD dwRevType,
SetLastError
(
E_INVALIDARG
);
SetLastError
(
E_INVALIDARG
);
return
FALSE
;
return
FALSE
;
}
}
if
(
pRevPara
&&
pRevPara
->
cbSize
>=
sizeof
(
CERT_REVOCATION_PARA_NO_EXTRA_FIELDS
))
pTime
=
pRevPara
->
pftTimeToUse
;
if
(
!
pTime
)
{
GetSystemTimeAsFileTime
(
&
now
);
pTime
=
&
now
;
}
memset
(
&
pRevStatus
->
dwIndex
,
0
,
pRevStatus
->
cbSize
-
sizeof
(
DWORD
));
memset
(
&
pRevStatus
->
dwIndex
,
0
,
pRevStatus
->
cbSize
-
sizeof
(
DWORD
));
if
(
dwRevType
!=
CERT_CONTEXT_REVOCATION_TYPE
)
if
(
dwRevType
!=
CERT_CONTEXT_REVOCATION_TYPE
)
{
{
...
@@ -1524,6 +1543,14 @@ BOOL WINAPI CertDllVerifyRevocation(DWORD dwEncodingType, DWORD dwRevType,
...
@@ -1524,6 +1543,14 @@ BOOL WINAPI CertDllVerifyRevocation(DWORD dwEncodingType, DWORD dwRevType,
(
void
**
)
&
crl
,
NULL
,
NULL
,
NULL
,
NULL
);
(
void
**
)
&
crl
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
ret
)
if
(
ret
)
{
{
if
(
CertVerifyCRLTimeValidity
(
pTime
,
crl
->
pCrlInfo
))
{
/* The CRL isn't time valid */
error
=
CRYPT_E_NO_REVOCATION_CHECK
;
ret
=
FALSE
;
}
else
{
PCRL_ENTRY
entry
=
NULL
;
PCRL_ENTRY
entry
=
NULL
;
CertFindCertificateInCRL
(
CertFindCertificateInCRL
(
...
@@ -1535,7 +1562,8 @@ BOOL WINAPI CertDllVerifyRevocation(DWORD dwEncodingType, DWORD dwRevType,
...
@@ -1535,7 +1562,8 @@ BOOL WINAPI CertDllVerifyRevocation(DWORD dwEncodingType, DWORD dwRevType,
pRevStatus
->
dwIndex
=
i
;
pRevStatus
->
dwIndex
=
i
;
ret
=
FALSE
;
ret
=
FALSE
;
}
}
else
if
(
timeout
)
}
if
(
ret
&&
timeout
)
{
{
DWORD
time
=
GetTickCount
();
DWORD
time
=
GetTickCount
();
...
...
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