Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8926dce0
Commit
8926dce0
authored
Jan 02, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Avoid casting away const from the context pointer.
parent
a4ec3ff6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
14 deletions
+12
-14
context.c
dlls/crypt32/context.c
+1
-1
crl.c
dlls/crypt32/crl.c
+10
-12
crypt32_private.h
dlls/crypt32/crypt32_private.h
+1
-1
No files found.
dlls/crypt32/context.c
View file @
8926dce0
...
@@ -125,7 +125,7 @@ void *Context_GetLinkedContext(void *context, size_t contextSize)
...
@@ -125,7 +125,7 @@ void *Context_GetLinkedContext(void *context, size_t contextSize)
contextSize
);
contextSize
);
}
}
PCONTEXT_PROPERTY_LIST
Context_GetProperties
(
void
*
context
,
size_t
contextSize
)
PCONTEXT_PROPERTY_LIST
Context_GetProperties
(
const
void
*
context
,
size_t
contextSize
)
{
{
PBASE_CONTEXT
ptr
=
BASE_CONTEXT_FROM_CONTEXT
(
context
,
contextSize
);
PBASE_CONTEXT
ptr
=
BASE_CONTEXT_FROM_CONTEXT
(
context
,
contextSize
);
...
...
dlls/crypt32/crl.c
View file @
8926dce0
...
@@ -266,10 +266,10 @@ DWORD WINAPI CertEnumCRLContextProperties(PCCRL_CONTEXT pCRLContext,
...
@@ -266,10 +266,10 @@ DWORD WINAPI CertEnumCRLContextProperties(PCCRL_CONTEXT pCRLContext,
return
ret
;
return
ret
;
}
}
static
BOOL
WINAPI
CRLContext_SetProperty
(
void
*
context
,
DWORD
dwPropId
,
static
BOOL
CRLContext_SetProperty
(
PCCRL_CONTEXT
context
,
DWORD
dwPropId
,
DWORD
dwFlags
,
const
void
*
pvData
);
DWORD
dwFlags
,
const
void
*
pvData
);
static
BOOL
CRLContext_GetHashProp
(
void
*
context
,
DWORD
dwPropId
,
static
BOOL
CRLContext_GetHashProp
(
PCCRL_CONTEXT
context
,
DWORD
dwPropId
,
ALG_ID
algID
,
const
BYTE
*
toHash
,
DWORD
toHashLen
,
void
*
pvData
,
ALG_ID
algID
,
const
BYTE
*
toHash
,
DWORD
toHashLen
,
void
*
pvData
,
DWORD
*
pcbData
)
DWORD
*
pcbData
)
{
{
...
@@ -284,10 +284,9 @@ static BOOL CRLContext_GetHashProp(void *context, DWORD dwPropId,
...
@@ -284,10 +284,9 @@ static BOOL CRLContext_GetHashProp(void *context, DWORD dwPropId,
return
ret
;
return
ret
;
}
}
static
BOOL
WINAPI
CRLContext_GetProperty
(
void
*
context
,
DWORD
dwPropId
,
static
BOOL
CRLContext_GetProperty
(
PCCRL_CONTEXT
context
,
DWORD
dwPropId
,
void
*
pvData
,
DWORD
*
pcbData
)
void
*
pvData
,
DWORD
*
pcbData
)
{
{
PCCRL_CONTEXT
pCRLContext
=
(
PCCRL_CONTEXT
)
context
;
PCONTEXT_PROPERTY_LIST
properties
=
PCONTEXT_PROPERTY_LIST
properties
=
Context_GetProperties
(
context
,
sizeof
(
CRL_CONTEXT
));
Context_GetProperties
(
context
,
sizeof
(
CRL_CONTEXT
));
BOOL
ret
;
BOOL
ret
;
...
@@ -322,12 +321,12 @@ static BOOL WINAPI CRLContext_GetProperty(void *context, DWORD dwPropId,
...
@@ -322,12 +321,12 @@ static BOOL WINAPI CRLContext_GetProperty(void *context, DWORD dwPropId,
{
{
case
CERT_SHA1_HASH_PROP_ID
:
case
CERT_SHA1_HASH_PROP_ID
:
ret
=
CRLContext_GetHashProp
(
context
,
dwPropId
,
CALG_SHA1
,
ret
=
CRLContext_GetHashProp
(
context
,
dwPropId
,
CALG_SHA1
,
pCRLContext
->
pbCrlEncoded
,
pCRLC
ontext
->
cbCrlEncoded
,
pvData
,
context
->
pbCrlEncoded
,
c
ontext
->
cbCrlEncoded
,
pvData
,
pcbData
);
pcbData
);
break
;
break
;
case
CERT_MD5_HASH_PROP_ID
:
case
CERT_MD5_HASH_PROP_ID
:
ret
=
CRLContext_GetHashProp
(
context
,
dwPropId
,
CALG_MD5
,
ret
=
CRLContext_GetHashProp
(
context
,
dwPropId
,
CALG_MD5
,
pCRLContext
->
pbCrlEncoded
,
pCRLC
ontext
->
cbCrlEncoded
,
pvData
,
context
->
pbCrlEncoded
,
c
ontext
->
cbCrlEncoded
,
pvData
,
pcbData
);
pcbData
);
break
;
break
;
default:
default:
...
@@ -377,13 +376,13 @@ BOOL WINAPI CertGetCRLContextProperty(PCCRL_CONTEXT pCRLContext,
...
@@ -377,13 +376,13 @@ BOOL WINAPI CertGetCRLContextProperty(PCCRL_CONTEXT pCRLContext,
}
}
break
;
break
;
default:
default:
ret
=
CRLContext_GetProperty
(
(
void
*
)
pCRLContext
,
dwPropId
,
pvData
,
ret
=
CRLContext_GetProperty
(
pCRLContext
,
dwPropId
,
pvData
,
pcbData
);
pcbData
);
}
}
return
ret
;
return
ret
;
}
}
static
BOOL
WINAPI
CRLContext_SetProperty
(
void
*
context
,
DWORD
dwPropId
,
static
BOOL
CRLContext_SetProperty
(
PCCRL_CONTEXT
context
,
DWORD
dwPropId
,
DWORD
dwFlags
,
const
void
*
pvData
)
DWORD
dwFlags
,
const
void
*
pvData
)
{
{
PCONTEXT_PROPERTY_LIST
properties
=
PCONTEXT_PROPERTY_LIST
properties
=
...
@@ -460,8 +459,7 @@ BOOL WINAPI CertSetCRLContextProperty(PCCRL_CONTEXT pCRLContext,
...
@@ -460,8 +459,7 @@ BOOL WINAPI CertSetCRLContextProperty(PCCRL_CONTEXT pCRLContext,
SetLastError
(
E_INVALIDARG
);
SetLastError
(
E_INVALIDARG
);
return
FALSE
;
return
FALSE
;
}
}
ret
=
CRLContext_SetProperty
((
void
*
)
pCRLContext
,
dwPropId
,
dwFlags
,
ret
=
CRLContext_SetProperty
(
pCRLContext
,
dwPropId
,
dwFlags
,
pvData
);
pvData
);
TRACE
(
"returning %d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
return
ret
;
}
}
...
...
dlls/crypt32/crypt32_private.h
View file @
8926dce0
...
@@ -317,7 +317,7 @@ void Context_CopyProperties(const void *to, const void *from,
...
@@ -317,7 +317,7 @@ void Context_CopyProperties(const void *to, const void *from,
/* Returns context's properties, or the linked context's properties if context
/* Returns context's properties, or the linked context's properties if context
* is a link context.
* is a link context.
*/
*/
PCONTEXT_PROPERTY_LIST
Context_GetProperties
(
void
*
context
,
size_t
contextSize
);
PCONTEXT_PROPERTY_LIST
Context_GetProperties
(
const
void
*
context
,
size_t
contextSize
);
void
Context_AddRef
(
void
*
context
,
size_t
contextSize
);
void
Context_AddRef
(
void
*
context
,
size_t
contextSize
);
...
...
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