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
41b3b8e4
Commit
41b3b8e4
authored
Dec 03, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Dec 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptnet: Add stub for verifying revocation via OCSP.
parent
7a987b77
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
cryptnet_main.c
dlls/cryptnet/cryptnet_main.c
+40
-0
No files found.
dlls/cryptnet/cryptnet_main.c
View file @
41b3b8e4
...
@@ -1654,6 +1654,42 @@ static DWORD verify_cert_revocation_from_dist_points_ext(
...
@@ -1654,6 +1654,42 @@ static DWORD verify_cert_revocation_from_dist_points_ext(
return
error
;
return
error
;
}
}
static
DWORD
verify_cert_revocation_from_aia_ext
(
const
CRYPT_DATA_BLOB
*
value
,
PCCERT_CONTEXT
cert
,
DWORD
index
,
FILETIME
*
pTime
,
DWORD
dwFlags
,
PCERT_REVOCATION_PARA
pRevPara
,
PCERT_REVOCATION_STATUS
pRevStatus
)
{
BOOL
ret
;
DWORD
error
,
size
;
CERT_AUTHORITY_INFO_ACCESS
*
aia
;
ret
=
CryptDecodeObjectEx
(
X509_ASN_ENCODING
,
X509_AUTHORITY_INFO_ACCESS
,
value
->
pbData
,
value
->
cbData
,
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
&
aia
,
&
size
);
if
(
ret
)
{
DWORD
i
;
for
(
i
=
0
;
i
<
aia
->
cAccDescr
;
i
++
)
if
(
!
strcmp
(
aia
->
rgAccDescr
[
i
].
pszAccessMethod
,
szOID_PKIX_OCSP
))
{
if
(
aia
->
rgAccDescr
[
i
].
AccessLocation
.
dwAltNameChoice
==
CERT_ALT_NAME_URL
)
FIXME
(
"OCSP URL = %s
\n
"
,
debugstr_w
(
aia
->
rgAccDescr
[
i
].
AccessLocation
.
u
.
pwszURL
));
else
FIXME
(
"unsupported AccessLocation type %d
\n
"
,
aia
->
rgAccDescr
[
i
].
AccessLocation
.
dwAltNameChoice
);
}
LocalFree
(
aia
);
/* FIXME: lie and pretend OCSP validated the cert */
error
=
ERROR_SUCCESS
;
}
else
error
=
GetLastError
();
return
error
;
}
static
DWORD
verify_cert_revocation
(
PCCERT_CONTEXT
cert
,
DWORD
index
,
static
DWORD
verify_cert_revocation
(
PCCERT_CONTEXT
cert
,
DWORD
index
,
FILETIME
*
pTime
,
DWORD
dwFlags
,
PCERT_REVOCATION_PARA
pRevPara
,
FILETIME
*
pTime
,
DWORD
dwFlags
,
PCERT_REVOCATION_PARA
pRevPara
,
PCERT_REVOCATION_STATUS
pRevStatus
)
PCERT_REVOCATION_STATUS
pRevStatus
)
...
@@ -1665,6 +1701,10 @@ static DWORD verify_cert_revocation(PCCERT_CONTEXT cert, DWORD index,
...
@@ -1665,6 +1701,10 @@ static DWORD verify_cert_revocation(PCCERT_CONTEXT cert, DWORD index,
cert
->
pCertInfo
->
cExtension
,
cert
->
pCertInfo
->
rgExtension
)))
cert
->
pCertInfo
->
cExtension
,
cert
->
pCertInfo
->
rgExtension
)))
error
=
verify_cert_revocation_from_dist_points_ext
(
&
ext
->
Value
,
cert
,
error
=
verify_cert_revocation_from_dist_points_ext
(
&
ext
->
Value
,
cert
,
index
,
pTime
,
dwFlags
,
pRevPara
,
pRevStatus
);
index
,
pTime
,
dwFlags
,
pRevPara
,
pRevStatus
);
else
if
((
ext
=
CertFindExtension
(
szOID_AUTHORITY_INFO_ACCESS
,
cert
->
pCertInfo
->
cExtension
,
cert
->
pCertInfo
->
rgExtension
)))
error
=
verify_cert_revocation_from_aia_ext
(
&
ext
->
Value
,
cert
,
index
,
pTime
,
dwFlags
,
pRevPara
,
pRevStatus
);
else
else
{
{
if
(
pRevPara
&&
pRevPara
->
hCrlStore
&&
pRevPara
->
pIssuerCert
)
if
(
pRevPara
&&
pRevPara
->
hCrlStore
&&
pRevPara
->
pIssuerCert
)
...
...
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