Commit c94f113f authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

rsaenh: Constify some variables.

parent 4945a255
...@@ -328,7 +328,7 @@ BOOL gen_rand_impl(BYTE *pbBuffer, DWORD dwLen) ...@@ -328,7 +328,7 @@ BOOL gen_rand_impl(BYTE *pbBuffer, DWORD dwLen)
return SystemFunction036(pbBuffer, dwLen); return SystemFunction036(pbBuffer, dwLen);
} }
BOOL export_public_key_impl(BYTE *pbDest, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,DWORD *pdwPubExp) BOOL export_public_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,DWORD *pdwPubExp)
{ {
mp_to_unsigned_bin(&pKeyContext->rsa.N, pbDest); mp_to_unsigned_bin(&pKeyContext->rsa.N, pbDest);
reverse_bytes(pbDest, dwKeyLen); reverse_bytes(pbDest, dwKeyLen);
...@@ -362,7 +362,7 @@ BOOL import_public_key_impl(CONST BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD d ...@@ -362,7 +362,7 @@ BOOL import_public_key_impl(CONST BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD d
return TRUE; return TRUE;
} }
BOOL export_private_key_impl(BYTE *pbDest, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, BOOL export_private_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
DWORD *pdwPubExp) DWORD *pdwPubExp)
{ {
mp_to_unsigned_bin(&pKeyContext->rsa.N, pbDest); mp_to_unsigned_bin(&pKeyContext->rsa.N, pbDest);
......
...@@ -86,11 +86,11 @@ BOOL encrypt_block_impl(ALG_ID aiAlgid, DWORD dwKeySpec, KEY_CONTEXT *pKeyContex ...@@ -86,11 +86,11 @@ BOOL encrypt_block_impl(ALG_ID aiAlgid, DWORD dwKeySpec, KEY_CONTEXT *pKeyContex
DWORD enc); DWORD enc);
BOOL encrypt_stream_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, BYTE *pbInOut, DWORD dwLen); BOOL encrypt_stream_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, BYTE *pbInOut, DWORD dwLen);
BOOL export_public_key_impl(BYTE *pbDest, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, BOOL export_public_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
DWORD *pdwPubExp); DWORD *pdwPubExp);
BOOL import_public_key_impl(CONST BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, BOOL import_public_key_impl(CONST BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
DWORD dwPubExp); DWORD dwPubExp);
BOOL export_private_key_impl(BYTE *pbDest, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, BOOL export_private_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
DWORD *pdwPubExp); DWORD *pdwPubExp);
BOOL import_private_key_impl(CONST BYTE* pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, BOOL import_private_key_impl(CONST BYTE* pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,
DWORD dwPubExp); DWORD dwPubExp);
......
...@@ -521,7 +521,7 @@ static inline void free_hmac_info(PHMAC_INFO hmac_info) { ...@@ -521,7 +521,7 @@ static inline void free_hmac_info(PHMAC_INFO hmac_info) {
* NOTES * NOTES
* See Internet RFC 2104 for details on the HMAC algorithm. * See Internet RFC 2104 for details on the HMAC algorithm.
*/ */
static BOOL copy_hmac_info(PHMAC_INFO *dst, PHMAC_INFO src) { static BOOL copy_hmac_info(PHMAC_INFO *dst, const HMAC_INFO *src) {
if (!src) return FALSE; if (!src) return FALSE;
*dst = HeapAlloc(GetProcessHeap(), 0, sizeof(HMAC_INFO)); *dst = HeapAlloc(GetProcessHeap(), 0, sizeof(HMAC_INFO));
if (!*dst) return FALSE; if (!*dst) return FALSE;
...@@ -974,7 +974,7 @@ static void destroy_key_container(OBJECTHDR *pObjectHdr) ...@@ -974,7 +974,7 @@ static void destroy_key_container(OBJECTHDR *pObjectHdr)
* Success: Handle to the new key container. * Success: Handle to the new key container.
* Failure: INVALID_HANDLE_VALUE * Failure: INVALID_HANDLE_VALUE
*/ */
static HCRYPTPROV new_key_container(PCCH pszContainerName, DWORD dwFlags, PVTableProvStruc pVTable) static HCRYPTPROV new_key_container(PCCH pszContainerName, DWORD dwFlags, const VTableProvStruc *pVTable)
{ {
KEYCONTAINER *pKeyContainer; KEYCONTAINER *pKeyContainer;
HCRYPTPROV hKeyContainer; HCRYPTPROV hKeyContainer;
...@@ -1039,7 +1039,7 @@ static HCRYPTPROV new_key_container(PCCH pszContainerName, DWORD dwFlags, PVTabl ...@@ -1039,7 +1039,7 @@ static HCRYPTPROV new_key_container(PCCH pszContainerName, DWORD dwFlags, PVTabl
* Success: Handle to the key container read from the registry * Success: Handle to the key container read from the registry
* Failure: INVALID_HANDLE_VALUE * Failure: INVALID_HANDLE_VALUE
*/ */
static HCRYPTPROV read_key_container(PCHAR pszContainerName, DWORD dwFlags, PVTableProvStruc pVTable) static HCRYPTPROV read_key_container(PCHAR pszContainerName, DWORD dwFlags, const VTableProvStruc *pVTable)
{ {
CHAR szRSABase[MAX_PATH]; CHAR szRSABase[MAX_PATH];
BYTE *pbKey; BYTE *pbKey;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment