crypt32: Fix incorrect casts in X509_CERT and friends.

This commit is contained in:
Gerald Pfeifer 2007-10-15 13:58:45 +02:00 committed by Alexandre Julliard
parent 136f033158
commit 119e4d4955
1 changed files with 33 additions and 33 deletions

View File

@ -3488,101 +3488,101 @@ static CryptEncodeObjectExFunc CRYPT_GetBuiltinEncoder(DWORD dwCertEncodingType,
{ {
switch (LOWORD(lpszStructType)) switch (LOWORD(lpszStructType))
{ {
case (WORD)X509_CERT: case LOWORD(X509_CERT):
encodeFunc = CRYPT_AsnEncodeCert; encodeFunc = CRYPT_AsnEncodeCert;
break; break;
case (WORD)X509_CERT_TO_BE_SIGNED: case LOWORD(X509_CERT_TO_BE_SIGNED):
encodeFunc = CRYPT_AsnEncodeCertInfo; encodeFunc = CRYPT_AsnEncodeCertInfo;
break; break;
case (WORD)X509_CERT_CRL_TO_BE_SIGNED: case LOWORD(X509_CERT_CRL_TO_BE_SIGNED):
encodeFunc = CRYPT_AsnEncodeCRLInfo; encodeFunc = CRYPT_AsnEncodeCRLInfo;
break; break;
case (WORD)X509_EXTENSIONS: case LOWORD(X509_EXTENSIONS):
encodeFunc = CRYPT_AsnEncodeExtensions; encodeFunc = CRYPT_AsnEncodeExtensions;
break; break;
case (WORD)X509_NAME_VALUE: case LOWORD(X509_NAME_VALUE):
encodeFunc = CRYPT_AsnEncodeNameValue; encodeFunc = CRYPT_AsnEncodeNameValue;
break; break;
case (WORD)X509_NAME: case LOWORD(X509_NAME):
encodeFunc = CRYPT_AsnEncodeName; encodeFunc = CRYPT_AsnEncodeName;
break; break;
case (WORD)X509_PUBLIC_KEY_INFO: case LOWORD(X509_PUBLIC_KEY_INFO):
encodeFunc = CRYPT_AsnEncodePubKeyInfo; encodeFunc = CRYPT_AsnEncodePubKeyInfo;
break; break;
case (WORD)X509_AUTHORITY_KEY_ID: case LOWORD(X509_AUTHORITY_KEY_ID):
encodeFunc = CRYPT_AsnEncodeAuthorityKeyId; encodeFunc = CRYPT_AsnEncodeAuthorityKeyId;
break; break;
case (WORD)X509_ALTERNATE_NAME: case LOWORD(X509_ALTERNATE_NAME):
encodeFunc = CRYPT_AsnEncodeAltName; encodeFunc = CRYPT_AsnEncodeAltName;
break; break;
case (WORD)X509_BASIC_CONSTRAINTS: case LOWORD(X509_BASIC_CONSTRAINTS):
encodeFunc = CRYPT_AsnEncodeBasicConstraints; encodeFunc = CRYPT_AsnEncodeBasicConstraints;
break; break;
case (WORD)X509_BASIC_CONSTRAINTS2: case LOWORD(X509_BASIC_CONSTRAINTS2):
encodeFunc = CRYPT_AsnEncodeBasicConstraints2; encodeFunc = CRYPT_AsnEncodeBasicConstraints2;
break; break;
case (WORD)RSA_CSP_PUBLICKEYBLOB: case LOWORD(RSA_CSP_PUBLICKEYBLOB):
encodeFunc = CRYPT_AsnEncodeRsaPubKey; encodeFunc = CRYPT_AsnEncodeRsaPubKey;
break; break;
case (WORD)X509_UNICODE_NAME: case LOWORD(X509_UNICODE_NAME):
encodeFunc = CRYPT_AsnEncodeUnicodeName; encodeFunc = CRYPT_AsnEncodeUnicodeName;
break; break;
case (WORD)PKCS_CONTENT_INFO: case LOWORD(PKCS_CONTENT_INFO):
encodeFunc = CRYPT_AsnEncodePKCSContentInfo; encodeFunc = CRYPT_AsnEncodePKCSContentInfo;
break; break;
case (WORD)PKCS_ATTRIBUTE: case LOWORD(PKCS_ATTRIBUTE):
encodeFunc = CRYPT_AsnEncodePKCSAttribute; encodeFunc = CRYPT_AsnEncodePKCSAttribute;
break; break;
case (WORD)X509_UNICODE_NAME_VALUE: case LOWORD(X509_UNICODE_NAME_VALUE):
encodeFunc = CRYPT_AsnEncodeUnicodeNameValue; encodeFunc = CRYPT_AsnEncodeUnicodeNameValue;
break; break;
case (WORD)X509_OCTET_STRING: case LOWORD(X509_OCTET_STRING):
encodeFunc = CRYPT_AsnEncodeOctets; encodeFunc = CRYPT_AsnEncodeOctets;
break; break;
case (WORD)X509_BITS: case LOWORD(X509_BITS):
case (WORD)X509_KEY_USAGE: case LOWORD(X509_KEY_USAGE):
encodeFunc = CRYPT_AsnEncodeBits; encodeFunc = CRYPT_AsnEncodeBits;
break; break;
case (WORD)X509_INTEGER: case LOWORD(X509_INTEGER):
encodeFunc = CRYPT_AsnEncodeInt; encodeFunc = CRYPT_AsnEncodeInt;
break; break;
case (WORD)X509_MULTI_BYTE_INTEGER: case LOWORD(X509_MULTI_BYTE_INTEGER):
encodeFunc = CRYPT_AsnEncodeInteger; encodeFunc = CRYPT_AsnEncodeInteger;
break; break;
case (WORD)X509_MULTI_BYTE_UINT: case LOWORD(X509_MULTI_BYTE_UINT):
encodeFunc = CRYPT_AsnEncodeUnsignedInteger; encodeFunc = CRYPT_AsnEncodeUnsignedInteger;
break; break;
case (WORD)X509_ENUMERATED: case LOWORD(X509_ENUMERATED):
encodeFunc = CRYPT_AsnEncodeEnumerated; encodeFunc = CRYPT_AsnEncodeEnumerated;
break; break;
case (WORD)X509_CHOICE_OF_TIME: case LOWORD(X509_CHOICE_OF_TIME):
encodeFunc = CRYPT_AsnEncodeChoiceOfTime; encodeFunc = CRYPT_AsnEncodeChoiceOfTime;
break; break;
case (WORD)X509_AUTHORITY_KEY_ID2: case LOWORD(X509_AUTHORITY_KEY_ID2):
encodeFunc = CRYPT_AsnEncodeAuthorityKeyId2; encodeFunc = CRYPT_AsnEncodeAuthorityKeyId2;
break; break;
case (WORD)X509_SEQUENCE_OF_ANY: case LOWORD(X509_SEQUENCE_OF_ANY):
encodeFunc = CRYPT_AsnEncodeSequenceOfAny; encodeFunc = CRYPT_AsnEncodeSequenceOfAny;
break; break;
case (WORD)PKCS_UTC_TIME: case LOWORD(PKCS_UTC_TIME):
encodeFunc = CRYPT_AsnEncodeUtcTime; encodeFunc = CRYPT_AsnEncodeUtcTime;
break; break;
case (WORD)X509_CRL_DIST_POINTS: case LOWORD(X509_CRL_DIST_POINTS):
encodeFunc = CRYPT_AsnEncodeCRLDistPoints; encodeFunc = CRYPT_AsnEncodeCRLDistPoints;
break; break;
case (WORD)X509_ENHANCED_KEY_USAGE: case LOWORD(X509_ENHANCED_KEY_USAGE):
encodeFunc = CRYPT_AsnEncodeEnhancedKeyUsage; encodeFunc = CRYPT_AsnEncodeEnhancedKeyUsage;
break; break;
case (WORD)PKCS_ATTRIBUTES: case LOWORD(PKCS_ATTRIBUTES):
encodeFunc = CRYPT_AsnEncodePKCSAttributes; encodeFunc = CRYPT_AsnEncodePKCSAttributes;
break; break;
case (WORD)X509_ISSUING_DIST_POINT: case LOWORD(X509_ISSUING_DIST_POINT):
encodeFunc = CRYPT_AsnEncodeIssuingDistPoint; encodeFunc = CRYPT_AsnEncodeIssuingDistPoint;
break; break;
case (WORD)X509_NAME_CONSTRAINTS: case LOWORD(X509_NAME_CONSTRAINTS):
encodeFunc = CRYPT_AsnEncodeNameConstraints; encodeFunc = CRYPT_AsnEncodeNameConstraints;
break; break;
case (WORD)PKCS7_SIGNER_INFO: case LOWORD(PKCS7_SIGNER_INFO):
encodeFunc = CRYPT_AsnEncodePKCSSignerInfo; encodeFunc = CRYPT_AsnEncodePKCSSignerInfo;
break; break;
} }