sync crypt32 with wine 1.1.24

svn path=/trunk/; revision=41550
This commit is contained in:
Christoph von Wittich 2009-06-22 19:27:02 +00:00
parent 9152e0286c
commit c7b0db5721
9 changed files with 28 additions and 27 deletions

View file

@ -2419,7 +2419,7 @@ static void CRYPT_SetBitInField(struct BitField *field, DWORD bit)
field->indexes[indexIndex] |= 1 << (bit % BITS_PER_DWORD);
}
static BOOL CRYPT_IsBitInFieldSet(struct BitField *field, DWORD bit)
static BOOL CRYPT_IsBitInFieldSet(const struct BitField *field, DWORD bit)
{
BOOL set = FALSE;
DWORD indexIndex = bit / BITS_PER_DWORD;

View file

@ -262,7 +262,7 @@ static void CRYPT_CheckSimpleChainForCycles(PCERT_SIMPLE_CHAIN chain)
}
/* Checks whether the chain is cyclic by examining the last element's status */
static inline BOOL CRYPT_IsSimpleChainCyclic(PCERT_SIMPLE_CHAIN chain)
static inline BOOL CRYPT_IsSimpleChainCyclic(const CERT_SIMPLE_CHAIN *chain)
{
if (chain->cElement)
return chain->rgpElement[chain->cElement - 1]->TrustStatus.dwErrorStatus
@ -272,7 +272,7 @@ static inline BOOL CRYPT_IsSimpleChainCyclic(PCERT_SIMPLE_CHAIN chain)
}
static inline void CRYPT_CombineTrustStatus(CERT_TRUST_STATUS *chainStatus,
CERT_TRUST_STATUS *elementStatus)
const CERT_TRUST_STATUS *elementStatus)
{
/* Any error that applies to an element also applies to a chain.. */
chainStatus->dwErrorStatus |= elementStatus->dwErrorStatus;
@ -282,7 +282,7 @@ static inline void CRYPT_CombineTrustStatus(CERT_TRUST_STATUS *chainStatus,
chainStatus->dwInfoStatus |= (elementStatus->dwInfoStatus & 0xfffffff0);
}
static BOOL CRYPT_AddCertToSimpleChain(PCertificateChainEngine engine,
static BOOL CRYPT_AddCertToSimpleChain(const CertificateChainEngine *engine,
PCERT_SIMPLE_CHAIN chain, PCCERT_CONTEXT cert, DWORD subjectInfoStatus)
{
BOOL ret = FALSE;
@ -720,7 +720,7 @@ static void CRYPT_CheckChainNameConstraints(PCERT_SIMPLE_CHAIN chain)
}
}
static void dump_basic_constraints(PCERT_EXTENSION ext)
static void dump_basic_constraints(const CERT_EXTENSION *ext)
{
CERT_BASIC_CONSTRAINTS_INFO *info;
DWORD size = 0;
@ -737,7 +737,7 @@ static void dump_basic_constraints(PCERT_EXTENSION ext)
}
}
static void dump_basic_constraints2(PCERT_EXTENSION ext)
static void dump_basic_constraints2(const CERT_EXTENSION *ext)
{
CERT_BASIC_CONSTRAINTS2_INFO constraints;
DWORD size = sizeof(CERT_BASIC_CONSTRAINTS2_INFO);
@ -754,7 +754,7 @@ static void dump_basic_constraints2(PCERT_EXTENSION ext)
}
}
static void dump_extension(PCERT_EXTENSION ext)
static void dump_extension(const CERT_EXTENSION *ext)
{
TRACE_(chain)("%s (%scritical)\n", debugstr_a(ext->pszObjId),
ext->fCritical ? "" : "not ");
@ -1008,7 +1008,7 @@ static PCCERT_CONTEXT CRYPT_GetIssuer(HCERTSTORE store, PCCERT_CONTEXT subject,
/* Builds a simple chain by finding an issuer for the last cert in the chain,
* until reaching a self-signed cert, or until no issuer can be found.
*/
static BOOL CRYPT_BuildSimpleChain(PCertificateChainEngine engine,
static BOOL CRYPT_BuildSimpleChain(const CertificateChainEngine *engine,
HCERTSTORE world, PCERT_SIMPLE_CHAIN chain)
{
BOOL ret = TRUE;
@ -1116,7 +1116,7 @@ static BOOL CRYPT_BuildCandidateChainFromCert(HCERTCHAINENGINE hChainEngine,
/* Makes and returns a copy of chain, up to and including element iElement. */
static PCERT_SIMPLE_CHAIN CRYPT_CopySimpleChainToElement(
PCERT_SIMPLE_CHAIN chain, DWORD iElement)
const CERT_SIMPLE_CHAIN *chain, DWORD iElement)
{
PCERT_SIMPLE_CHAIN copy = CryptMemAlloc(sizeof(CERT_SIMPLE_CHAIN));
@ -1345,7 +1345,7 @@ static PCertificateChain CRYPT_BuildAlternateContextFromChain(
#define IS_TRUST_ERROR_SET(TrustStatus, bits) \
(TrustStatus)->dwErrorStatus & (bits)
static DWORD CRYPT_ChainQuality(PCertificateChain chain)
static DWORD CRYPT_ChainQuality(const CertificateChain *chain)
{
DWORD quality = CHAIN_QUALITY_HIGHEST;
@ -1402,7 +1402,7 @@ static PCertificateChain CRYPT_ChooseHighestQualityChain(
}
static BOOL CRYPT_AddAlternateChainToChain(PCertificateChain chain,
PCertificateChain alternate)
const CertificateChain *alternate)
{
BOOL ret;
@ -1427,7 +1427,7 @@ static BOOL CRYPT_AddAlternateChainToChain(PCertificateChain chain,
}
static PCERT_CHAIN_ELEMENT CRYPT_FindIthElementInChain(
PCERT_CHAIN_CONTEXT chain, DWORD i)
const CERT_CHAIN_CONTEXT *chain, DWORD i)
{
DWORD j, iElement;
PCERT_CHAIN_ELEMENT element = NULL;
@ -1448,7 +1448,7 @@ typedef struct _CERT_CHAIN_PARA_NO_EXTRA_FIELDS {
} CERT_CHAIN_PARA_NO_EXTRA_FIELDS, *PCERT_CHAIN_PARA_NO_EXTRA_FIELDS;
static void CRYPT_VerifyChainRevocation(PCERT_CHAIN_CONTEXT chain,
LPFILETIME pTime, PCERT_CHAIN_PARA pChainPara, DWORD chainFlags)
LPFILETIME pTime, const CERT_CHAIN_PARA *pChainPara, DWORD chainFlags)
{
DWORD cContext;

View file

@ -201,7 +201,7 @@ struct ContextList *ContextList_Create(
return list;
}
static inline struct list *ContextList_ContextToEntry(struct ContextList *list,
static inline struct list *ContextList_ContextToEntry(const struct ContextList *list,
const void *context)
{
struct list *ret;
@ -213,7 +213,7 @@ static inline struct list *ContextList_ContextToEntry(struct ContextList *list,
return ret;
}
static inline void *ContextList_EntryToContext(struct ContextList *list,
static inline void *ContextList_EntryToContext(const struct ContextList *list,
struct list *entry)
{
return (LPBYTE)entry - sizeof(LINK_CONTEXT) - list->contextSize;

View file

@ -1,7 +1,7 @@
/*
* crypt32 dll French resources
*
* Copyright 2006-2008 Jonathan Ernst
* Copyright 2006-2009 Jonathan Ernst
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -171,6 +171,7 @@ STRINGTABLE DISCARDABLE
IDS_LOCALIZEDNAME_MY "Personnel"
IDS_LOCALIZEDNAME_CA "Autorités intermédiaires"
IDS_LOCALIZEDNAME_ADDRESSBOOK "Autres personnes"
IDS_LOCALIZEDNAME_TRUSTEDPUBLISHER "Éditeurs de confiance"
}
STRINGTABLE DISCARDABLE

View file

@ -79,7 +79,7 @@ typedef struct _CRYPT_DIGESTED_DATA
CRYPT_HASH_BLOB hash;
} CRYPT_DIGESTED_DATA;
BOOL CRYPT_AsnEncodePKCSDigestedData(CRYPT_DIGESTED_DATA *digestedData,
BOOL CRYPT_AsnEncodePKCSDigestedData(const CRYPT_DIGESTED_DATA *digestedData,
void *pvData, DWORD *pcbData);
typedef struct _CRYPT_SIGNED_INFO

View file

@ -1078,7 +1078,7 @@ static BOOL WINAPI CRYPT_AsnEncodeNameValue(DWORD dwCertEncodingType,
}
static BOOL CRYPT_AsnEncodeRdnAttr(DWORD dwCertEncodingType,
CERT_RDN_ATTR *attr, CryptEncodeObjectExFunc nameValueEncodeFunc,
const CERT_RDN_ATTR *attr, CryptEncodeObjectExFunc nameValueEncodeFunc,
BYTE *pbEncoded, DWORD *pcbEncoded)
{
DWORD bytesNeeded = 0, lenBytes, size;
@ -1268,7 +1268,7 @@ static BOOL WINAPI CRYPT_DEREncodeItemsAsSet(DWORD dwCertEncodingType,
return ret;
}
static BOOL CRYPT_AsnEncodeRdn(DWORD dwCertEncodingType, CERT_RDN *rdn,
static BOOL CRYPT_AsnEncodeRdn(DWORD dwCertEncodingType, const CERT_RDN *rdn,
CryptEncodeObjectExFunc nameValueEncodeFunc, BYTE *pbEncoded,
DWORD *pcbEncoded)
{
@ -1881,7 +1881,7 @@ static BOOL WINAPI CRYPT_AsnEncodePKCSContentInfoInternal(
cItem, dwFlags, pEncodePara, pbEncoded, pcbEncoded);
}
BOOL CRYPT_AsnEncodePKCSDigestedData(CRYPT_DIGESTED_DATA *digestedData,
BOOL CRYPT_AsnEncodePKCSDigestedData(const CRYPT_DIGESTED_DATA *digestedData,
void *pvData, DWORD *pcbData)
{
struct AsnEncodeSequenceItem items[] = {

View file

@ -1340,7 +1340,7 @@ static BOOL CSignedEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
}
static HCRYPTMSG CSignedEncodeMsg_Open(DWORD dwFlags,
const void *pvMsgEncodeInfo, LPSTR pszInnerContentObjID,
const void *pvMsgEncodeInfo, LPCSTR pszInnerContentObjID,
PCMSG_STREAM_INFO pStreamInfo)
{
const CMSG_SIGNED_ENCODE_INFO_WITH_CMS *info = pvMsgEncodeInfo;
@ -1553,7 +1553,7 @@ static BOOL CDecodeMsg_CopyData(CRYPT_DATA_BLOB *blob, const BYTE *pbData,
return ret;
}
static BOOL CDecodeMsg_DecodeDataContent(CDecodeMsg *msg, CRYPT_DER_BLOB *blob)
static BOOL CDecodeMsg_DecodeDataContent(CDecodeMsg *msg, const CRYPT_DER_BLOB *blob)
{
BOOL ret;
CRYPT_DATA_BLOB *data;
@ -1613,7 +1613,7 @@ static inline void CRYPT_FixUpAlgorithmID(CRYPT_ALGORITHM_IDENTIFIER *id)
}
static BOOL CDecodeMsg_DecodeHashedContent(CDecodeMsg *msg,
CRYPT_DER_BLOB *blob)
const CRYPT_DER_BLOB *blob)
{
BOOL ret;
CRYPT_DIGESTED_DATA *digestedData;

View file

@ -1080,7 +1080,7 @@ static BOOL WINAPI CRYPT_FormatBasicConstraints2(DWORD dwCertEncodingType,
return ret;
}
static BOOL CRYPT_FormatHexStringWithPrefix(CRYPT_DATA_BLOB *blob, int id,
static BOOL CRYPT_FormatHexStringWithPrefix(const CRYPT_DATA_BLOB *blob, int id,
LPWSTR str, DWORD *pcbStr)
{
WCHAR buf[MAX_STRING_RESOURCE_LEN];
@ -1114,13 +1114,13 @@ static BOOL CRYPT_FormatHexStringWithPrefix(CRYPT_DATA_BLOB *blob, int id,
return ret;
}
static BOOL CRYPT_FormatKeyId(CRYPT_DATA_BLOB *keyId, LPWSTR str,
static BOOL CRYPT_FormatKeyId(const CRYPT_DATA_BLOB *keyId, LPWSTR str,
DWORD *pcbStr)
{
return CRYPT_FormatHexStringWithPrefix(keyId, IDS_KEY_ID, str, pcbStr);
}
static BOOL CRYPT_FormatCertSerialNumber(CRYPT_DATA_BLOB *serialNum, LPWSTR str,
static BOOL CRYPT_FormatCertSerialNumber(const CRYPT_DATA_BLOB *serialNum, LPWSTR str,
DWORD *pcbStr)
{
return CRYPT_FormatHexStringWithPrefix(serialNum, IDS_CERT_SERIAL_NUMBER,

View file

@ -341,7 +341,7 @@ static DWORD CRYPT_AddPrefixW(LPCWSTR prefix, LPWSTR psz, DWORD csz)
static const WCHAR indent[] = { ' ',' ',' ',' ',' ',0 };
DWORD cert_name_to_str_with_indent(DWORD dwCertEncodingType, DWORD indentLevel,
PCERT_NAME_BLOB pName, DWORD dwStrType, LPWSTR psz, DWORD csz)
const CERT_NAME_BLOB *pName, DWORD dwStrType, LPWSTR psz, DWORD csz)
{
static const DWORD unsupportedFlags = CERT_NAME_STR_NO_QUOTING_FLAG |
CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG;