Commit 690f9840 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: implement CryptEnumOIDInfo and CryptFindOIDInfo.

- implement CryptEnumOIDInfo and CryptFindOIDInfo - implement CertOIDToAlgId and CertAlgIdToOID using CryptFindOIDInfo
parent 110612c1
Makefile Makefile
crypt32.res
libcrypt32.def libcrypt32.def
...@@ -16,6 +16,8 @@ C_SRCS = \ ...@@ -16,6 +16,8 @@ C_SRCS = \
str.c \ str.c \
main.c main.c
RC_SRCS = crypt32.rc
SUBDIRS = tests SUBDIRS = tests
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
......
/*
* crypt32 dll resources
*
* Copyright (C) 2006 Juan Lang
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "cryptres.h"
#include "version.rc"
#include "crypt32_En.rc"
/*
* crypt32 dll resources
*
* Copyright (C) 2006 Juan Lang
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
IDS_AUTHORITY_KEY_ID "Authority Key Identifier"
IDS_KEY_ATTRIBUTES "Key Attributes"
IDS_KEY_USAGE_RESTRICTION "Key Usage Restriction"
IDS_SUBJECT_ALT_NAME "Subject Alternative Name"
IDS_ISSUER_ALT_NAME "Issuer Alternative Name"
IDS_BASIC_CONSTRAINTS "Basic Constraints"
IDS_KEY_USAGE "Key Usage"
IDS_CERT_POLICIES "Certificate Policies"
IDS_SUBJECT_KEY_IDENTIFIER "Subject Key Identifier"
IDS_CRL_REASON_CODE "CRL Reason Code"
IDS_CRL_DIST_POINTS "CRL Distribution Points"
IDS_ENHANCED_KEY_USAGE "Enhanced Key Usage"
IDS_AUTHORITY_INFO_ACCESS "Authority Information Access"
IDS_CERT_EXTENSIONS "Certificate Extensions"
IDS_NEXT_UPDATE_LOCATION "Next Update Location"
IDS_YES_OR_NO_TRUST "Yes or No Trust"
IDS_EMAIL_ADDRESS "Email Address"
IDS_UNSTRUCTURED_NAME "Unstructured Name"
IDS_CONTENT_TYPE "Content Type"
IDS_MESSAGE_DIGEST "Message Digest"
IDS_SIGNING_TIME "Signing Time"
IDS_COUNTER_SIGN "Counter Sign"
IDS_CHALLENGE_PASSWORD "Challenge Password"
IDS_UNSTRUCTURED_ADDRESS "Unstructured Address"
IDS_SMIME_CAPABILITIES "SMIME Capabilities"
IDS_PREFER_SIGNED_DATA "Prefer Signed Data"
IDS_CPS "CPS"
IDS_USER_NOTICE "User Notice"
IDS_OCSP "On-line Certificate Status Protocol"
IDS_CA_ISSUER "Certification Authority Issuer"
IDS_CERT_TEMPLATE_NAME "Certification Template Name"
IDS_CERT_TYPE "Certificate Type"
IDS_CERT_MANIFOLD "Certificate Manifold"
IDS_NETSCAPE_CERT_TYPE "Netscape Cert Type"
IDS_NETSCAPE_BASE_URL "Netscape Base URL"
IDS_NETSCAPE_REVOCATION_URL "Netscape Revocation URL"
IDS_NETSCAPE_CA_REVOCATION_URL "Netscape CA Revocation URL"
IDS_NETSCAPE_CERT_RENEWAL_URL "Netscape Cert Renewal URL"
IDS_NETSCAPE_CA_POLICY_URL "Netscape CA Policy URL"
IDS_NETSCAPE_SSL_SERVER_NAME "Netscape SSL ServerName"
IDS_NETSCAPE_COMMENT "Netscape Comment"
IDS_SPC_SP_AGENCY_INFO "SpcSpAgencyInfo"
IDS_SPC_FINANCIAL_CRITERIA "SpcFinancialCriteria"
IDS_SPC_MINIMAL_CRITERIA "SpcMinimalCriteria"
IDS_COUNTRY "Country/Region"
IDS_ORGANIZATION "Organization"
IDS_ORGANIZATIONAL_UNIT "Organizational Unit"
IDS_COMMON_NAME "Common Name"
IDS_LOCALITY "Locality"
IDS_STATE_OR_PROVINCE "State or Province"
IDS_TITLE "Title"
IDS_GIVEN_NAME "Given Name"
IDS_INITIALS "Initials"
IDS_SUR_NAME "Sur Name"
IDS_DOMAIN_COMPONENT "Domain Component"
IDS_STREET_ADDRESS "Street Address"
IDS_SERIAL_NUMBER "Serial Number"
IDS_CA_VERSION "CA Version"
IDS_CROSS_CA_VERSION "Cross CA Version"
IDS_SERIALIZED_SIG_SERIAL_NUMBER "Serialized Signature Serial Number"
IDS_PRINCIPAL_NAME "Principal Name"
IDS_WINDOWS_PRODUCT_UPDATE "Windows Product Update"
IDS_ENROLLMENT_NAME_VALUE_PAIR "Enrollment Name Value Pair"
IDS_OS_VERSION "OS Version"
IDS_ENROLLMENT_CSP "Enrollment CSP"
IDS_CRL_NUMBER "CRL Number"
IDS_DELTA_CRL_INDICATOR "Delta CRL Indicator"
IDS_ISSUING_DIST_POINT "Issuing Distribution Point"
IDS_FRESHEST_CRL "Freshest CRL"
IDS_NAME_CONSTRAINTS "Name Constraints"
IDS_POLICY_MAPPINGS "Policy Mappings"
IDS_POLICY_CONSTRAINTS "Policy Constraints"
IDS_CROSS_CERT_DIST_POINTS "Cross-Certificate Distribution Points"
IDS_APPLICATION_POLICIES "Application Policies"
IDS_APPLICATION_POLICY_MAPPINGS "Application Policy Mappings"
IDS_APPLICATION_POLICY_CONSTRAINTS "Application Policy Constraints"
IDS_CMC_DATA "CMC Data"
IDS_CMC_RESPONSE "CMC Response"
IDS_UNSIGNED_CMC_REQUEST "Unsigned CMC Request"
IDS_CMC_STATUS_INFO "CMC Status Info"
IDS_CMC_EXTENSIONS "CMC Extensions"
IDS_CMC_ATTRIBUTES "CMC Attributes"
IDS_PKCS_7_DATA "PKCS 7 Data"
IDS_PKCS_7_SIGNED "PKCS 7 Signed"
IDS_PKCS_7_ENVELOPED "PKCS 7 Enveloped"
IDS_PKCS_7_SIGNED_ENVELOPED "PKCS 7 Signed Enveloped"
IDS_PKCS_7_DIGESTED "PKCS 7 Digested"
IDS_PKCS_7_ENCRYPTED "PKCS 7 Encrypted"
IDS_PREVIOUS_CA_CERT_HASH "Previous CA Certificate Hash"
IDS_CRL_VIRTUAL_BASE "Virtual Base CRL Number"
IDS_CRL_NEXT_PUBLISH "Next CRL Publish"
IDS_CA_EXCHANGE "CA Encryption Certificate"
IDS_KEY_RECOVERY_AGENT "Key Recovery Agent"
IDS_CERTIFICATE_TEMPLATE "Certificate Template Information"
IDS_ENTERPRISE_ROOT_OID "Enterprise Root OID"
IDS_RDN_DUMMY_SIGNER "Dummy Signer"
IDS_ARCHIVED_KEY_ATTR "Encrypted Private Key"
IDS_CRL_SELF_CDP "Published CRL Locations"
IDS_REQUIRE_CERT_CHAIN_POLICY "Enforce Certificate Chain Policy"
IDS_TRANSACTION_ID "Transaction Id"
IDS_SENDER_NONCE "Sender Nonce"
IDS_RECIPIENT_NONCE "Recipient Nonce"
IDS_REG_INFO "Reg Info"
IDS_GET_CERTIFICATE "Get Certificate"
IDS_GET_CRL "Get CRL"
IDS_REVOKE_REQUEST "Revoke Request"
IDS_QUERY_PENDING "Query Pending"
IDS_SORTED_CTL "Certificate Trust List"
IDS_ARCHIVED_KEY_CERT_HASH "Archived Key Certificate Hash"
IDS_PRIVATE_KEY_USAGE_PERIOD "Private Key Usage Period"
IDS_CLIENT_INFORMATION "Client Information"
IDS_SERVER_AUTHENTICATION "Server Authentication"
IDS_CLIENT_AUTHENTICATION "Client Authentication"
IDS_CODE_SIGNING "Code Signing"
IDS_SECURE_EMAIL "Secure Email"
IDS_TIME_STAMPING "Time Stamping"
IDS_MICROSOFT_TRUST_LIST_SIGNING "Microsoft Trust List Signing"
IDS_MICROSOFT_TIME_STAMPING "Microsoft Time Stamping"
IDS_IPSEC_END_SYSTEM "IP security end system"
IDS_IPSEC_TUNNEL "IP security tunnel termination"
IDS_IPSEC_USER "IP security user"
IDS_EFS "Encrypting File System"
IDS_WHQL_CRYPTO "Windows Hardware Driver Verification"
IDS_NT5_CRYPTO "Windows System Component Verification"
IDS_OEM_WHQL_CRYPTO "OEM Windows System Component Verification"
IDS_EMBEDDED_NT_CRYPTO "Embedded Windows System Component Verification"
IDS_KEY_PACK_LICENSES "Key Pack Licenses"
IDS_LICENSE_SERVER "License Server Verification"
IDS_SMART_CARD_LOGON "Smart Card Logon"
IDS_DIGITAL_RIGHTS "Digital Rights"
IDS_QUALIFIED_SUBORDINATION "Qualified Subordination"
IDS_KEY_RECOVERY "Key Recovery"
IDS_DOCUMENT_SIGNING "Document Signing"
IDS_IPSEC_IKE_INTERMEDIATE "IP security IKE intermediate"
IDS_FILE_RECOVERY "File Recovery"
IDS_ROOT_LIST_SIGNER "Root List Signer"
IDS_ANY_APPLICATION_POLICIES "All application policies"
IDS_DS_EMAIL_REPLICATION "Directory Service Email Replication"
IDS_ENROLLMENT_AGENT "Certificate Request Agent"
IDS_LIFETIME_SIGNING "Lifetime Signing"
IDS_ANY_CERT_POLICY "All issuance policies"
}
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
*/ */
HCRYPTPROV CRYPT_GetDefaultProvider(void); HCRYPTPROV CRYPT_GetDefaultProvider(void);
void CRYPT_InitFunctionSets(void); void crypt_oid_init(HINSTANCE hinst);
void CRYPT_FreeFunctionSets(void); void crypt_oid_free(void);
#endif #endif
/*
* Copyright 2006 Juan Lang
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __WINE_CRYPTRES_H__
#define __WINE_CRYPTRES_H__
#define IDS_AUTHORITY_KEY_ID 1000
#define IDS_KEY_ATTRIBUTES 1001
#define IDS_KEY_USAGE_RESTRICTION 1002
#define IDS_SUBJECT_ALT_NAME 1003
#define IDS_ISSUER_ALT_NAME 1004
#define IDS_BASIC_CONSTRAINTS 1005
#define IDS_KEY_USAGE 1006
#define IDS_CERT_POLICIES 1007
#define IDS_SUBJECT_KEY_IDENTIFIER 1008
#define IDS_CRL_REASON_CODE 1009
#define IDS_CRL_DIST_POINTS 1010
#define IDS_ENHANCED_KEY_USAGE 1011
#define IDS_AUTHORITY_INFO_ACCESS 1012
#define IDS_CERT_EXTENSIONS 1013
#define IDS_NEXT_UPDATE_LOCATION 1014
#define IDS_YES_OR_NO_TRUST 1015
#define IDS_EMAIL_ADDRESS 1016
#define IDS_UNSTRUCTURED_NAME 1017
#define IDS_CONTENT_TYPE 1018
#define IDS_MESSAGE_DIGEST 1019
#define IDS_SIGNING_TIME 1020
#define IDS_COUNTER_SIGN 1021
#define IDS_CHALLENGE_PASSWORD 1022
#define IDS_UNSTRUCTURED_ADDRESS 1023
#define IDS_SMIME_CAPABILITIES 1024
#define IDS_PREFER_SIGNED_DATA 1025
#define IDS_CPS 1026
#define IDS_USER_NOTICE 1027
#define IDS_OCSP 1028
#define IDS_CA_ISSUER 1029
#define IDS_CERT_TEMPLATE_NAME 1030
#define IDS_CERT_TYPE 1031
#define IDS_CERT_MANIFOLD 1032
#define IDS_NETSCAPE_CERT_TYPE 1033
#define IDS_NETSCAPE_BASE_URL 1034
#define IDS_NETSCAPE_REVOCATION_URL 1035
#define IDS_NETSCAPE_CA_REVOCATION_URL 1036
#define IDS_NETSCAPE_CERT_RENEWAL_URL 1037
#define IDS_NETSCAPE_CA_POLICY_URL 1038
#define IDS_NETSCAPE_SSL_SERVER_NAME 1039
#define IDS_NETSCAPE_COMMENT 1040
#define IDS_SPC_SP_AGENCY_INFO 1041
#define IDS_SPC_FINANCIAL_CRITERIA 1042
#define IDS_SPC_MINIMAL_CRITERIA 1043
#define IDS_COUNTRY 1044
#define IDS_ORGANIZATION 1045
#define IDS_ORGANIZATIONAL_UNIT 1046
#define IDS_COMMON_NAME 1047
#define IDS_LOCALITY 1048
#define IDS_STATE_OR_PROVINCE 1049
#define IDS_TITLE 1050
#define IDS_GIVEN_NAME 1051
#define IDS_INITIALS 1052
#define IDS_SUR_NAME 1053
#define IDS_DOMAIN_COMPONENT 1054
#define IDS_STREET_ADDRESS 1055
#define IDS_SERIAL_NUMBER 1056
#define IDS_CA_VERSION 1057
#define IDS_CROSS_CA_VERSION 1058
#define IDS_SERIALIZED_SIG_SERIAL_NUMBER 1059
#define IDS_PRINCIPAL_NAME 1060
#define IDS_WINDOWS_PRODUCT_UPDATE 1061
#define IDS_ENROLLMENT_NAME_VALUE_PAIR 1062
#define IDS_OS_VERSION 1063
#define IDS_ENROLLMENT_CSP 1064
#define IDS_CRL_NUMBER 1065
#define IDS_DELTA_CRL_INDICATOR 1066
#define IDS_ISSUING_DIST_POINT 1067
#define IDS_FRESHEST_CRL 1068
#define IDS_NAME_CONSTRAINTS 1069
#define IDS_POLICY_MAPPINGS 1070
#define IDS_POLICY_CONSTRAINTS 1071
#define IDS_CROSS_CERT_DIST_POINTS 1072
#define IDS_APPLICATION_POLICIES 1073
#define IDS_APPLICATION_POLICY_MAPPINGS 1074
#define IDS_APPLICATION_POLICY_CONSTRAINTS 1075
#define IDS_CMC_DATA 1076
#define IDS_CMC_RESPONSE 1077
#define IDS_UNSIGNED_CMC_REQUEST 1078
#define IDS_CMC_STATUS_INFO 1079
#define IDS_CMC_EXTENSIONS 1080
#define IDS_CMC_ATTRIBUTES 1081
#define IDS_PKCS_7_DATA 1082
#define IDS_PKCS_7_SIGNED 1083
#define IDS_PKCS_7_ENVELOPED 1084
#define IDS_PKCS_7_SIGNED_ENVELOPED 1085
#define IDS_PKCS_7_DIGESTED 1086
#define IDS_PKCS_7_ENCRYPTED 1087
#define IDS_PREVIOUS_CA_CERT_HASH 1088
#define IDS_CRL_VIRTUAL_BASE 1089
#define IDS_CRL_NEXT_PUBLISH 1090
#define IDS_CA_EXCHANGE 1091
#define IDS_KEY_RECOVERY_AGENT 1092
#define IDS_CERTIFICATE_TEMPLATE 1093
#define IDS_ENTERPRISE_ROOT_OID 1094
#define IDS_RDN_DUMMY_SIGNER 1095
#define IDS_ARCHIVED_KEY_ATTR 1096
#define IDS_CRL_SELF_CDP 1097
#define IDS_REQUIRE_CERT_CHAIN_POLICY 1098
#define IDS_TRANSACTION_ID 1099
#define IDS_SENDER_NONCE 1100
#define IDS_RECIPIENT_NONCE 1101
#define IDS_REG_INFO 1102
#define IDS_GET_CERTIFICATE 1103
#define IDS_GET_CRL 1104
#define IDS_REVOKE_REQUEST 1105
#define IDS_QUERY_PENDING 1106
#define IDS_SORTED_CTL 1107
#define IDS_ARCHIVED_KEY_CERT_HASH 1108
#define IDS_PRIVATE_KEY_USAGE_PERIOD 1109
#define IDS_CLIENT_INFORMATION 1110
#define IDS_SERVER_AUTHENTICATION 1111
#define IDS_CLIENT_AUTHENTICATION 1112
#define IDS_CODE_SIGNING 1113
#define IDS_SECURE_EMAIL 1114
#define IDS_TIME_STAMPING 1115
#define IDS_MICROSOFT_TRUST_LIST_SIGNING 1116
#define IDS_MICROSOFT_TIME_STAMPING 1117
#define IDS_IPSEC_END_SYSTEM 1118
#define IDS_IPSEC_TUNNEL 1119
#define IDS_IPSEC_USER 1120
#define IDS_EFS 1121
#define IDS_WHQL_CRYPTO 1122
#define IDS_NT5_CRYPTO 1123
#define IDS_OEM_WHQL_CRYPTO 1124
#define IDS_EMBEDDED_NT_CRYPTO 1125
#define IDS_KEY_PACK_LICENSES 1126
#define IDS_LICENSE_SERVER 1127
#define IDS_SMART_CARD_LOGON 1128
#define IDS_DIGITAL_RIGHTS 1129
#define IDS_QUALIFIED_SUBORDINATION 1130
#define IDS_KEY_RECOVERY 1131
#define IDS_DOCUMENT_SIGNING 1132
#define IDS_IPSEC_IKE_INTERMEDIATE 1133
#define IDS_FILE_RECOVERY 1134
#define IDS_ROOT_LIST_SIGNER 1135
#define IDS_ANY_APPLICATION_POLICIES 1136
#define IDS_DS_EMAIL_REPLICATION 1137
#define IDS_ENROLLMENT_AGENT 1138
#define IDS_LIFETIME_SIGNING 1139
#define IDS_ANY_CERT_POLICY 1140
#endif /* ndef __WINE_CRYPTRES_H__ */
...@@ -40,10 +40,10 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved) ...@@ -40,10 +40,10 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved)
{ {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstance); DisableThreadLibraryCalls(hInstance);
CRYPT_InitFunctionSets(); crypt_oid_init(hInstance);
break; break;
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
CRYPT_FreeFunctionSets(); crypt_oid_free();
if (hDefProv) CryptReleaseContext(hDefProv, 0); if (hDefProv) CryptReleaseContext(hDefProv, 0);
break; break;
} }
......
...@@ -314,10 +314,86 @@ static void test_registerOIDFunction(void) ...@@ -314,10 +314,86 @@ static void test_registerOIDFunction(void)
ok(ret, "CryptUnregisterOIDFunction failed: %ld\n", GetLastError()); ok(ret, "CryptUnregisterOIDFunction failed: %ld\n", GetLastError());
} }
static BOOL WINAPI countOidInfo(PCCRYPT_OID_INFO pInfo, void *pvArg)
{
(*(DWORD *)pvArg)++;
return TRUE;
}
static BOOL WINAPI noOidInfo(PCCRYPT_OID_INFO pInfo, void *pvArg)
{
return FALSE;
}
static void test_enumOIDInfo(void)
{
BOOL ret;
DWORD count = 0;
/* This crashes
ret = CryptEnumOIDInfo(7, 0, NULL, NULL);
*/
/* Silly tests, check that more than one thing is enumerated */
ret = CryptEnumOIDInfo(0, 0, &count, countOidInfo);
ok(ret && count > 0, "Expected more than item enumerated\n");
ret = CryptEnumOIDInfo(0, 0, NULL, noOidInfo);
ok(!ret, "Expected FALSE\n");
}
static void test_findOIDInfo(void)
{
static const WCHAR sha1[] = { 's','h','a','1',0 };
ALG_ID alg = CALG_SHA1;
ALG_ID algs[2] = { CALG_MD5, CALG_RSA_SIGN };
PCCRYPT_OID_INFO info;
info = CryptFindOIDInfo(0, NULL, 0);
ok(info == NULL, "Expected NULL\n");
info = CryptFindOIDInfo(CRYPT_OID_INFO_OID_KEY, szOID_RSA_MD5, 0);
ok(info != NULL, "Expected to find szOID_RSA_MD5\n");
if (info)
{
ok(!strcmp(info->pszOID, szOID_RSA_MD5), "Expected %s, got %s\n",
szOID_RSA_MD5, info->pszOID);
ok(info->Algid == CALG_MD5, "Expected CALG_MD5, got %d\n",
info->Algid);
}
info = CryptFindOIDInfo(CRYPT_OID_INFO_NAME_KEY, (void *)sha1, 0);
ok(info != NULL, "Expected to find sha1\n");
if (info)
{
ok(!strcmp(info->pszOID, szOID_OIWSEC_sha1), "Expected %s, got %s\n",
szOID_OIWSEC_sha1, info->pszOID);
ok(info->Algid == CALG_SHA1, "Expected CALG_SHA1, got %d\n",
info->Algid);
}
info = CryptFindOIDInfo(CRYPT_OID_INFO_ALGID_KEY, &alg, 0);
ok(info != NULL, "Expected to find sha1\n");
if (info)
{
ok(!strcmp(info->pszOID, szOID_OIWSEC_sha1), "Expected %s, got %s\n",
szOID_OIWSEC_sha1, info->pszOID);
ok(info->Algid == CALG_SHA1, "Expected CALG_SHA1, got %d\n",
info->Algid);
}
info = CryptFindOIDInfo(CRYPT_OID_INFO_SIGN_KEY, algs, 0);
ok(info != NULL, "Expected to find md5RSA\n");
if (info)
{
ok(!strcmp(info->pszOID, szOID_RSA_MD5RSA), "Expected %s, got %s\n",
szOID_RSA_MD5RSA, info->pszOID);
ok(info->Algid == CALG_MD5, "Expected CALG_MD5, got %d\n",
info->Algid);
}
}
START_TEST(oid) START_TEST(oid)
{ {
testOIDToAlgID(); testOIDToAlgID();
testAlgIDToOID(); testAlgIDToOID();
test_enumOIDInfo();
test_findOIDInfo();
test_oidFunctionSet(); test_oidFunctionSet();
test_installOIDFunctionAddress(); test_installOIDFunctionAddress();
test_registerOIDFunction(); test_registerOIDFunction();
......
/*
* crypt32 dll version resources
*
* Copyright (C) 2006 Juan Lang
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define WINE_FILEDESCRIPTION_STR "Wine CryptoAPI Library"
#define WINE_FILENAME_STR "crypt32.dll"
#define WINE_FILEVERSION 5,131,2600,1243
#define WINE_FILEVERSION_STR "5.131.2600.1243"
#define WINE_PRODUCTVERSION 5,131,2600,1243
#define WINE_PRODUCTVERSION_STR "5.131.2600.1243"
#include "wine/wine_common_ver.rc"
...@@ -1016,6 +1016,7 @@ typedef struct _CRYPT_URL_INFO { ...@@ -1016,6 +1016,7 @@ typedef struct _CRYPT_URL_INFO {
#define CALG_TLS1PRF (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_TLS1PRF) #define CALG_TLS1PRF (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_TLS1PRF)
#define CALG_RSA_SIGN (ALG_CLASS_SIGNATURE | ALG_TYPE_RSA | ALG_SID_RSA_ANY) #define CALG_RSA_SIGN (ALG_CLASS_SIGNATURE | ALG_TYPE_RSA | ALG_SID_RSA_ANY)
#define CALG_DSS_SIGN (ALG_CLASS_SIGNATURE | ALG_TYPE_DSS | ALG_SID_DSS_ANY) #define CALG_DSS_SIGN (ALG_CLASS_SIGNATURE | ALG_TYPE_DSS | ALG_SID_DSS_ANY)
#define CALG_NO_SIGN (ALG_CLASS_SIGNATURE | ALG_TYPE_ANY | ALG_SID_ANY)
#define CALG_DH_SF (ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_DH_SANDF) #define CALG_DH_SF (ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_DH_SANDF)
#define CALG_DH_EPHEM (ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_DH_EPHEM) #define CALG_DH_EPHEM (ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_DH_EPHEM)
#define CALG_RSA_KEYX (ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_RSA | ALG_SID_RSA_ANY) #define CALG_RSA_KEYX (ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_RSA | ALG_SID_RSA_ANY)
......
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