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
217e0119
Commit
217e0119
authored
Oct 21, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Get rid of no longer needed hCertStore checks.
parent
e7ab43c4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
56 deletions
+17
-56
cert.c
dlls/crypt32/cert.c
+1
-9
crl.c
dlls/crypt32/crl.c
+1
-8
ctl.c
dlls/crypt32/ctl.c
+6
-18
store.c
dlls/crypt32/store.c
+9
-21
No files found.
dlls/crypt32/cert.c
View file @
217e0119
...
@@ -555,15 +555,7 @@ BOOL WINAPI CertGetCertificateContextProperty(PCCERT_CONTEXT pCertContext,
...
@@ -555,15 +555,7 @@ BOOL WINAPI CertGetCertificateContextProperty(PCCERT_CONTEXT pCertContext,
ret
=
FALSE
;
ret
=
FALSE
;
break
;
break
;
case
CERT_ACCESS_STATE_PROP_ID
:
case
CERT_ACCESS_STATE_PROP_ID
:
if
(
pCertContext
->
hCertStore
)
ret
=
CertGetStoreProperty
(
cert
->
ctx
.
hCertStore
,
dwPropId
,
pvData
,
pcbData
);
ret
=
CertGetStoreProperty
(
pCertContext
->
hCertStore
,
dwPropId
,
pvData
,
pcbData
);
else
{
DWORD
state
=
0
;
ret
=
CertContext_CopyParam
(
pvData
,
pcbData
,
&
state
,
sizeof
(
state
));
}
break
;
break
;
case
CERT_KEY_PROV_HANDLE_PROP_ID
:
case
CERT_KEY_PROV_HANDLE_PROP_ID
:
{
{
...
...
dlls/crypt32/crl.c
View file @
217e0119
...
@@ -499,14 +499,7 @@ BOOL WINAPI CertGetCRLContextProperty(PCCRL_CONTEXT pCRLContext,
...
@@ -499,14 +499,7 @@ BOOL WINAPI CertGetCRLContextProperty(PCCRL_CONTEXT pCRLContext,
}
}
else
else
{
{
if
(
pCRLContext
->
hCertStore
)
ret
=
CertGetStoreProperty
(
pCRLContext
->
hCertStore
,
dwPropId
,
pvData
,
pcbData
);
ret
=
CertGetStoreProperty
(
pCRLContext
->
hCertStore
,
dwPropId
,
pvData
,
pcbData
);
else
{
*
(
DWORD
*
)
pvData
=
0
;
ret
=
TRUE
;
}
}
}
break
;
break
;
default:
default:
...
...
dlls/crypt32/ctl.c
View file @
217e0119
...
@@ -341,26 +341,21 @@ PCCTL_CONTEXT WINAPI CertFindCTLInStore(HCERTSTORE hCertStore,
...
@@ -341,26 +341,21 @@ PCCTL_CONTEXT WINAPI CertFindCTLInStore(HCERTSTORE hCertStore,
BOOL
WINAPI
CertDeleteCTLFromStore
(
PCCTL_CONTEXT
pCtlContext
)
BOOL
WINAPI
CertDeleteCTLFromStore
(
PCCTL_CONTEXT
pCtlContext
)
{
{
WINECRYPT_CERTSTORE
*
hcs
=
pCtlContext
->
hCertStore
;
ctl_t
*
ctl
=
ctl_from_ptr
(
pCtlContext
);
BOOL
ret
;
BOOL
ret
;
TRACE
(
"(%p)
\n
"
,
pCtlContext
);
TRACE
(
"(%p)
\n
"
,
pCtlContext
);
if
(
!
pCtlContext
)
if
(
!
pCtlContext
)
ret
=
TRUE
;
return
TRUE
;
else
if
(
!
pCtlContext
->
hCertStore
)
ret
=
CertFreeCTLContext
(
pCtlContext
);
else
{
WINECRYPT_CERTSTORE
*
hcs
=
pCtlContext
->
hCertStore
;
ctl_t
*
ctl
=
ctl_from_ptr
(
pCtlContext
);
if
(
hcs
->
dwMagic
!=
WINE_CRYPTCERTSTORE_MAGIC
)
if
(
hcs
->
dwMagic
!=
WINE_CRYPTCERTSTORE_MAGIC
)
ret
=
FALSE
;
ret
urn
FALSE
;
else
ret
=
hcs
->
vtbl
->
ctls
.
delete
(
hcs
,
&
ctl
->
base
);
ret
=
hcs
->
vtbl
->
ctls
.
delete
(
hcs
,
&
ctl
->
base
);
if
(
ret
)
if
(
ret
)
ret
=
CertFreeCTLContext
(
pCtlContext
);
ret
=
CertFreeCTLContext
(
pCtlContext
);
}
return
ret
;
return
ret
;
}
}
...
@@ -621,14 +616,7 @@ BOOL WINAPI CertGetCTLContextProperty(PCCTL_CONTEXT pCTLContext,
...
@@ -621,14 +616,7 @@ BOOL WINAPI CertGetCTLContextProperty(PCCTL_CONTEXT pCTLContext,
}
}
else
else
{
{
if
(
pCTLContext
->
hCertStore
)
ret
=
CertGetStoreProperty
(
pCTLContext
->
hCertStore
,
dwPropId
,
pvData
,
pcbData
);
ret
=
CertGetStoreProperty
(
pCTLContext
->
hCertStore
,
dwPropId
,
pvData
,
pcbData
);
else
{
*
(
DWORD
*
)
pvData
=
0
;
ret
=
TRUE
;
}
}
}
break
;
break
;
default:
default:
...
...
dlls/crypt32/store.c
View file @
217e0119
...
@@ -949,24 +949,17 @@ PCCERT_CONTEXT WINAPI CertEnumCertificatesInStore(HCERTSTORE hCertStore, PCCERT_
...
@@ -949,24 +949,17 @@ PCCERT_CONTEXT WINAPI CertEnumCertificatesInStore(HCERTSTORE hCertStore, PCCERT_
BOOL
WINAPI
CertDeleteCertificateFromStore
(
PCCERT_CONTEXT
pCertContext
)
BOOL
WINAPI
CertDeleteCertificateFromStore
(
PCCERT_CONTEXT
pCertContext
)
{
{
BOOL
ret
;
WINECRYPT_CERTSTORE
*
hcs
=
pCertContext
->
hCertStore
;
TRACE
(
"(%p)
\n
"
,
pCertContext
);
TRACE
(
"(%p)
\n
"
,
pCertContext
);
if
(
!
pCertContext
)
if
(
!
pCertContext
)
ret
=
TRUE
;
return
TRUE
;
else
if
(
!
pCertContext
->
hCertStore
)
ret
=
CertFreeCertificateContext
(
pCertContext
);
else
{
WINECRYPT_CERTSTORE
*
hcs
=
pCertContext
->
hCertStore
;
if
(
hcs
->
dwMagic
!=
WINE_CRYPTCERTSTORE_MAGIC
)
if
(
hcs
->
dwMagic
!=
WINE_CRYPTCERTSTORE_MAGIC
)
ret
=
FALSE
;
return
FALSE
;
else
ret
=
hcs
->
vtbl
->
certs
.
delete
(
hcs
,
&
cert_from_ptr
(
pCertContext
)
->
base
);
return
hcs
->
vtbl
->
certs
.
delete
(
hcs
,
&
cert_from_ptr
(
pCertContext
)
->
base
);
}
return
ret
;
}
}
BOOL
WINAPI
CertAddCRLContextToStore
(
HCERTSTORE
hCertStore
,
BOOL
WINAPI
CertAddCRLContextToStore
(
HCERTSTORE
hCertStore
,
...
@@ -1091,25 +1084,20 @@ BOOL WINAPI CertAddCRLContextToStore(HCERTSTORE hCertStore,
...
@@ -1091,25 +1084,20 @@ BOOL WINAPI CertAddCRLContextToStore(HCERTSTORE hCertStore,
BOOL
WINAPI
CertDeleteCRLFromStore
(
PCCRL_CONTEXT
pCrlContext
)
BOOL
WINAPI
CertDeleteCRLFromStore
(
PCCRL_CONTEXT
pCrlContext
)
{
{
WINECRYPT_CERTSTORE
*
hcs
=
pCrlContext
->
hCertStore
;
BOOL
ret
;
BOOL
ret
;
TRACE
(
"(%p)
\n
"
,
pCrlContext
);
TRACE
(
"(%p)
\n
"
,
pCrlContext
);
if
(
!
pCrlContext
)
if
(
!
pCrlContext
)
ret
=
TRUE
;
return
TRUE
;
else
if
(
!
pCrlContext
->
hCertStore
)
ret
=
CertFreeCRLContext
(
pCrlContext
);
else
{
WINECRYPT_CERTSTORE
*
hcs
=
pCrlContext
->
hCertStore
;
if
(
hcs
->
dwMagic
!=
WINE_CRYPTCERTSTORE_MAGIC
)
if
(
hcs
->
dwMagic
!=
WINE_CRYPTCERTSTORE_MAGIC
)
ret
=
FALSE
;
return
FALSE
;
else
ret
=
hcs
->
vtbl
->
crls
.
delete
(
hcs
,
&
crl_from_ptr
(
pCrlContext
)
->
base
);
ret
=
hcs
->
vtbl
->
crls
.
delete
(
hcs
,
&
crl_from_ptr
(
pCrlContext
)
->
base
);
if
(
ret
)
if
(
ret
)
ret
=
CertFreeCRLContext
(
pCrlContext
);
ret
=
CertFreeCRLContext
(
pCrlContext
);
}
return
ret
;
return
ret
;
}
}
...
...
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