Definition at line 101 of file oid.c.
Referenced by CertVerifyCertificateChainPolicy(), CertVerifyRevocation(), CRYPT_ExportEncryptedKey(), CRYPT_GenKey(), CRYPT_GetCreateFunction(), CRYPT_GetRetrieveFunction(), CRYPT_ImportEncryptedKey(), CRYPT_LoadDecoderExFunc(), CRYPT_LoadDecoderFunc(), CRYPT_LoadEncoderExFunc(), CRYPT_LoadEncoderFunc(), CRYPT_ProvOpenStore(), CryptExportPublicKeyInfoEx(), CryptFormatObject(), CryptGetObjectUrl(), CryptImportPublicKeyInfoEx(), and CryptInstallOIDFunctionAddress().
00103 {
00104 struct OIDFunctionSet *cursor, *ret = NULL;
00105
00106 TRACE("(%s, %x)\n", debugstr_a(pszFuncName), dwFlags);
00107
00108 EnterCriticalSection(&funcSetCS);
00109 LIST_FOR_EACH_ENTRY(cursor, &funcSets, struct OIDFunctionSet, next)
00110 {
00111 if (!strcasecmp(pszFuncName, cursor->name))
00112 {
00113 ret = cursor;
00114 break;
00115 }
00116 }
00117 if (!ret)
00118 {
00119 ret = CryptMemAlloc(sizeof(struct OIDFunctionSet));
00120 if (ret)
00121 {
00122 memset(ret, 0, sizeof(*ret));
00123 ret->name = CryptMemAlloc(strlen(pszFuncName) + 1);
00124 if (ret->name)
00125 {
00126 InitializeCriticalSection(&ret->cs);
00127 ret->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": OIDFunctionSet.cs");
00128 list_init(&ret->functions);
00129 strcpy(ret->name, pszFuncName);
00130 list_add_tail(&funcSets, &ret->next);
00131 }
00132 else
00133 {
00134 CryptMemFree(ret);
00135 ret = NULL;
00136 }
00137 }
00138 }
00139 LeaveCriticalSection(&funcSetCS);
00140
00141 return ret;
00142 }