Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
2.1 KiB

  1. This file will be deleted when the latest version of the AUTHORITY_INFO_ACCESS
  2. extension is added to wincrypt.h
  3. //+-------------------------------------------------------------------------
  4. // X509_AUTHORITY_INFO_ACCESS
  5. // szOID_AUTHORITY_INFO_ACCESS
  6. //
  7. // pvStructInfo points to following CERT_AUTHORITY_INFO_ACCESS.
  8. //
  9. // For CRYPT_E_INVALID_IA5_STRING, the error location is returned in
  10. // *pcbEncoded by CryptEncodeObject(X509_AUTHORITY_INFO_ACCESS)
  11. //
  12. // Error location consists of:
  13. // ACCESS_INDEX - 8 bits << 24
  14. // ENTRY_INDEX - 8 bits << 16
  15. // VALUE_INDEX - 16 bits (unicode character index)
  16. //
  17. // See X509_ALTERNATE_NAME for ENTRY_INDEX and VALUE_INDEX error location
  18. // defines.
  19. //--------------------------------------------------------------------------
  20. typedef struct _CERT_ACCESS_DESCRIPTION {
  21. LPSTR pszAccessMethod; // pszObjId
  22. CERT_ALT_NAME_ENTRY AccessLocation;
  23. } CERT_ACCESS_DESCRIPTION, *PCERT_ACCESS_DESCRIPTION;
  24. #define szOID_APPL_TCP_PROTO "1.3.6.1.2.1.27.4"
  25. #define szOID_FTP_ACCESS_METHOD "1.3.6.1.2.1.27.4.21"
  26. #define szOID_HTTP_ACCESS_METHOD "1.3.6.1.2.1.27.4.80"
  27. #define szOID_SMTP_ACCESS_METHOD "1.3.6.1.2.1.27.4.25"
  28. #define szOID_LDAP_ACCESS_METHOD "1.3.6.1.2.1.27.4.389"
  29. typedef struct _CERT_AUTHORITY_INFO_ACCESS {
  30. DWORD cbSize;
  31. DWORD cCertStatus;
  32. CERT_ACCESS_DESCRIPTION *rgCertStatus;
  33. DWORD cCertRetrieval;
  34. CERT_ACCESS_DESCRIPTION *rgCertRetrieval;
  35. DWORD cCAPolicy;
  36. CERT_ACCESS_DESCRIPTION *rgCAPolicy;
  37. DWORD cCACerts;
  38. CERT_ACCESS_DESCRIPTION *rgCACerts;
  39. } CERT_AUTHORITY_INFO_ACCESS, *PCERT_AUTHORITY_INFO_ACCESS;
  40. #define CERT_ACCESS_ERR_INDEX_MASK 0xFF
  41. #define CERT_ACCESS_ERR_INDEX_SHIFT 24
  42. #define CERT_ACCESS_CERT_STATUS_INDEX 0
  43. #define CERT_ACCESS_CERT_RETRIEVAL_INDEX 1
  44. #define CERT_ACCESS_CA_POLICY_INDEX 2
  45. #define CERT_ACCESS_CA_CERTS_INDEX 3
  46. #define GET_CERT_ACCESS_ERR_INDEX(X) \
  47. ((X >> CERT_ACCESS_ERR_INDEX_SHIFT) & CERT_ACCESS_ERR_INDEX_MASK)