Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

PCCRYPT_OID_INFO WINAPI CryptFindOIDInfo ( DWORD  dwKeyType,
void pvKey,
DWORD  dwGroupId 
)

Definition at line 1494 of file oid.c.

Referenced by add_cert_extension_detail(), add_oid_text_to_control(), cert_mgr_show_cert_usages(), cert_name_to_str_with_indent(), CertAlgIdToOID(), CertNameToStrA(), CertOIDToAlgId(), CertStrToNameW(), CRYPT_FormatEnhancedKeyUsage(), CRYPT_VerifyCertSignatureFromPublicKeyInfo(), CryptHashToBeSigned(), CryptSignCertificate(), field_format_public_key(), find_oid_in_list(), initialize_purpose_selection(), request_query_option(), and show_cert_usages().

01496 {
01497     PCCRYPT_OID_INFO ret = NULL;
01498 
01499     TRACE("(%d, %p, %d)\n", dwKeyType, pvKey, dwGroupId);
01500 
01501     switch(dwKeyType)
01502     {
01503     case CRYPT_OID_INFO_ALGID_KEY:
01504     {
01505         struct OIDInfo *info;
01506 
01507         TRACE("CRYPT_OID_INFO_ALGID_KEY: %d\n", *(DWORD *)pvKey);
01508         EnterCriticalSection(&oidInfoCS);
01509         LIST_FOR_EACH_ENTRY(info, &oidInfo, struct OIDInfo, entry)
01510         {
01511             if (info->info.u.Algid == *(DWORD *)pvKey &&
01512              (!dwGroupId || info->info.dwGroupId == dwGroupId))
01513             {
01514                 ret = &info->info;
01515                 break;
01516             }
01517         }
01518         LeaveCriticalSection(&oidInfoCS);
01519         break;
01520     }
01521     case CRYPT_OID_INFO_NAME_KEY:
01522     {
01523         struct OIDInfo *info;
01524 
01525         TRACE("CRYPT_OID_INFO_NAME_KEY: %s\n", debugstr_w(pvKey));
01526         EnterCriticalSection(&oidInfoCS);
01527         LIST_FOR_EACH_ENTRY(info, &oidInfo, struct OIDInfo, entry)
01528         {
01529             if (!lstrcmpW(info->info.pwszName, pvKey) &&
01530              (!dwGroupId || info->info.dwGroupId == dwGroupId))
01531             {
01532                 ret = &info->info;
01533                 break;
01534             }
01535         }
01536         LeaveCriticalSection(&oidInfoCS);
01537         break;
01538     }
01539     case CRYPT_OID_INFO_OID_KEY:
01540     {
01541         struct OIDInfo *info;
01542         LPSTR oid = pvKey;
01543 
01544         TRACE("CRYPT_OID_INFO_OID_KEY: %s\n", debugstr_a(oid));
01545         EnterCriticalSection(&oidInfoCS);
01546         LIST_FOR_EACH_ENTRY(info, &oidInfo, struct OIDInfo, entry)
01547         {
01548             if (!lstrcmpA(info->info.pszOID, oid) &&
01549              (!dwGroupId || info->info.dwGroupId == dwGroupId))
01550             {
01551                 ret = &info->info;
01552                 break;
01553             }
01554         }
01555         LeaveCriticalSection(&oidInfoCS);
01556         break;
01557     }
01558     case CRYPT_OID_INFO_SIGN_KEY:
01559     {
01560         struct OIDInfo *info;
01561 
01562         TRACE("CRYPT_OID_INFO_SIGN_KEY: %d\n", *(DWORD *)pvKey);
01563         EnterCriticalSection(&oidInfoCS);
01564         LIST_FOR_EACH_ENTRY(info, &oidInfo, struct OIDInfo, entry)
01565         {
01566             if (info->info.u.Algid == *(DWORD *)pvKey &&
01567              info->info.ExtraInfo.cbData >= sizeof(DWORD) &&
01568              *(DWORD *)info->info.ExtraInfo.pbData ==
01569              *(DWORD *)((LPBYTE)pvKey + sizeof(DWORD)) &&
01570              (!dwGroupId || info->info.dwGroupId == dwGroupId))
01571             {
01572                 ret = &info->info;
01573                 break;
01574             }
01575         }
01576         LeaveCriticalSection(&oidInfoCS);
01577         break;
01578     }
01579     }
01580     return ret;
01581 }


Generated on Fri Feb 10 05:27:54 2012 for ReactOS by doxygen 1.6.3

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.