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.2 KiB
54 lines
2.2 KiB
|
|
This file will be deleted when the latest version of the AUTHORITY_INFO_ACCESS
|
|
extension is added to wincrypt.h
|
|
|
|
//+-------------------------------------------------------------------------
|
|
// X509_AUTHORITY_INFO_ACCESS
|
|
// szOID_AUTHORITY_INFO_ACCESS
|
|
//
|
|
// pvStructInfo points to following CERT_AUTHORITY_INFO_ACCESS.
|
|
//
|
|
// For CRYPT_E_INVALID_IA5_STRING, the error location is returned in
|
|
// *pcbEncoded by CryptEncodeObject(X509_AUTHORITY_INFO_ACCESS)
|
|
//
|
|
// Error location consists of:
|
|
// ACCESS_INDEX - 8 bits << 24
|
|
// ENTRY_INDEX - 8 bits << 16
|
|
// VALUE_INDEX - 16 bits (unicode character index)
|
|
//
|
|
// See X509_ALTERNATE_NAME for ENTRY_INDEX and VALUE_INDEX error location
|
|
// defines.
|
|
//--------------------------------------------------------------------------
|
|
|
|
typedef struct _CERT_ACCESS_DESCRIPTION {
|
|
LPSTR pszAccessMethod; // pszObjId
|
|
CERT_ALT_NAME_ENTRY AccessLocation;
|
|
} CERT_ACCESS_DESCRIPTION, *PCERT_ACCESS_DESCRIPTION;
|
|
|
|
#define szOID_APPL_TCP_PROTO "1.3.6.1.2.1.27.4"
|
|
#define szOID_FTP_ACCESS_METHOD "1.3.6.1.2.1.27.4.21"
|
|
#define szOID_HTTP_ACCESS_METHOD "1.3.6.1.2.1.27.4.80"
|
|
#define szOID_SMTP_ACCESS_METHOD "1.3.6.1.2.1.27.4.25"
|
|
#define szOID_LDAP_ACCESS_METHOD "1.3.6.1.2.1.27.4.389"
|
|
|
|
typedef struct _CERT_AUTHORITY_INFO_ACCESS {
|
|
DWORD cbSize;
|
|
DWORD cCertStatus;
|
|
CERT_ACCESS_DESCRIPTION *rgCertStatus;
|
|
DWORD cCertRetrieval;
|
|
CERT_ACCESS_DESCRIPTION *rgCertRetrieval;
|
|
DWORD cCAPolicy;
|
|
CERT_ACCESS_DESCRIPTION *rgCAPolicy;
|
|
DWORD cCACerts;
|
|
CERT_ACCESS_DESCRIPTION *rgCACerts;
|
|
} CERT_AUTHORITY_INFO_ACCESS, *PCERT_AUTHORITY_INFO_ACCESS;
|
|
|
|
#define CERT_ACCESS_ERR_INDEX_MASK 0xFF
|
|
#define CERT_ACCESS_ERR_INDEX_SHIFT 24
|
|
#define CERT_ACCESS_CERT_STATUS_INDEX 0
|
|
#define CERT_ACCESS_CERT_RETRIEVAL_INDEX 1
|
|
#define CERT_ACCESS_CA_POLICY_INDEX 2
|
|
#define CERT_ACCESS_CA_CERTS_INDEX 3
|
|
|
|
#define GET_CERT_ACCESS_ERR_INDEX(X) \
|
|
((X >> CERT_ACCESS_ERR_INDEX_SHIFT) & CERT_ACCESS_ERR_INDEX_MASK)
|