CONST.BAS
资源名称:MSDN_VC98.zip [点击查看]
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:219k
源码类别:
Windows编程
开发平台:
Visual C++
- Attribute VB_Name = "Const"
- Option Explicit
- '+---------------------------------------------------------------------------
- '
- ' Microsoft Windows
- '
- ' File: wincrypt.h
- '
- ' Contents: Cryptographic API Prototypes and Definitions
- '
- '----------------------------------------------------------------------------
- '
- ' Algorithm IDs and Flags
- '
- ' ALG_ID crackers
- ' Algorithm classes
- Public Const ALG_CLASS_ANY As Long = 0
- ' Algorithm types
- Public Const ALG_TYPE_ANY As Long = 0
- ' Generic sub-ids
- Public Const ALG_SID_ANY As Long = 0
- ' Some RSA sub-ids
- Public Const ALG_SID_RSA_ANY As Long = 0
- Public Const ALG_SID_RSA_PKCS As Long = 1
- Public Const ALG_SID_RSA_MSATWORK As Long = 2
- Public Const ALG_SID_RSA_ENTRUST As Long = 3
- Public Const ALG_SID_RSA_PGP As Long = 4
- ' Some DSS sub-ids
- '
- Public Const ALG_SID_DSS_ANY As Long = 0
- Public Const ALG_SID_DSS_PKCS As Long = 1
- Public Const ALG_SID_DSS_DMS As Long = 2
- ' Block cipher sub ids
- ' DES sub_ids
- Public Const ALG_SID_DES As Long = 1
- Public Const ALG_SID_3DES As Long = 3
- Public Const ALG_SID_DESX As Long = 4
- Public Const ALG_SID_IDEA As Long = 5
- Public Const ALG_SID_CAST As Long = 6
- Public Const ALG_SID_SAFERSK64 As Long = 7
- Public Const ALD_SID_SAFERSK128 As Long = 8
- Public Const ALG_SID_3DES_112 As Long = 9
- Public Const ALG_SID_CYLINK_MEK As Long = 12
- Public Const ALG_SID_RC5 As Long = 13
- ' Fortezza sub-ids
- Public Const ALG_SID_SKIPJACK As Long = 10
- Public Const ALG_SID_TEK As Long = 11
- ' KP_MODE
- Public Const CRYPT_MODE_CBCI As Long = 6
- Public Const CRYPT_MODE_CFBP As Long = 7
- Public Const CRYPT_MODE_OFBP As Long = 8
- Public Const CRYPT_MODE_CBCOFM As Long = 9
- Public Const CRYPT_MODE_CBCOFMI As Long = 10
- ' RC2 sub-ids
- Public Const ALG_SID_RC2 As Long = 2
- ' Stream cipher sub-ids
- Public Const ALG_SID_RC4 As Long = 1
- Public Const ALG_SID_SEAL As Long = 2
- ' Diffie-Hellman sub-ids
- Public Const ALG_SID_DH_SANDF As Long = 1
- Public Const ALG_SID_DH_EPHEM As Long = 2
- Public Const ALG_SID_AGREED_KEY_ANY As Long = 3
- Public Const ALG_SID_KEA As Long = 4
- ' Hash sub ids
- Public Const ALG_SID_MD2 As Long = 1
- Public Const ALG_SID_MD4 As Long = 2
- Public Const ALG_SID_MD5 As Long = 3
- Public Const ALG_SID_SHA As Long = 4
- Public Const ALG_SID_SHA1 As Long = 4
- Public Const ALG_SID_MAC As Long = 5
- Public Const ALG_SID_RIPEMD As Long = 6
- Public Const ALG_SID_RIPEMD160 As Long = 7
- Public Const ALG_SID_SSL3SHAMD5 As Long = 8
- Public Const ALG_SID_HMAC As Long = 9
- ' secure channel sub ids
- Public Const ALG_SID_SSL3_MASTER As Long = 1
- Public Const ALG_SID_SCHANNEL_MASTER_HASH As Long = 2
- Public Const ALG_SID_SCHANNEL_MAC_KEY As Long = 3
- Public Const ALG_SID_PCT1_MASTER As Long = 4
- Public Const ALG_SID_SSL2_MASTER As Long = 5
- Public Const ALG_SID_TLS1_MASTER As Long = 6
- Public Const ALG_SID_SCHANNEL_ENC_KEY As Long = 7
- ' Our silly example sub-id
- Public Const ALG_SID_EXAMPLE As Long = 80
- ' algorithm identifier definitions
- ' dwFlags definitions for CryptAcquireContext
- Public Const CRYPT_VERIFYCONTEXT As Long = &HF0000000
- Public Const CRYPT_NEWKEYSET As Long = &H00000008
- Public Const CRYPT_DELETEKEYSET As Long = &H00000010
- Public Const CRYPT_MACHINE_KEYSET As Long = &H00000020
- ' dwFlag definitions for CryptGenKey
- Public Const CRYPT_EXPORTABLE As Long = &H00000001
- Public Const CRYPT_USER_PROTECTED As Long = &H00000002
- Public Const CRYPT_CREATE_SALT As Long = &H00000004
- Public Const CRYPT_UPDATE_KEY As Long = &H00000008
- Public Const CRYPT_NO_SALT As Long = &H00000010
- Public Const CRYPT_PREGEN As Long = &H00000040
- Public Const CRYPT_RECIPIENT As Long = &H00000010
- Public Const CRYPT_INITIATOR As Long = &H00000040
- Public Const CRYPT_ONLINE As Long = &H00000080
- Public Const CRYPT_SF As Long = &H00000100
- Public Const CRYPT_CREATE_IV As Long = &H00000200
- Public Const CRYPT_KEK As Long = &H00000400
- Public Const CRYPT_DATA_KEY As Long = &H00000800
- ' dwFlags definitions for CryptDeriveKey
- Public Const CRYPT_SERVER As Long = &H00000400
- Public Const KEY_LENGTH_MASK As Long = &HFFFF0000
- ' dwFlag definitions for CryptExportKey
- Public Const CRYPT_Y_ONLY As Long = &H00000001
- Public Const CRYPT_SSL2_SLUMMING As Long = &H00000002
- ' dwFlags definitions for CryptHashSessionKey
- Public Const CRYPT_LITTLE_ENDIAN As Long = &H00000001
- ' dwFlag definitions for CryptSetProviderEx and CryptGetDefaultProvider
- Public Const CRYPT_MACHINE_DEFAULT As Long = &H00000001
- Public Const CRYPT_USER_DEFAULT As Long = &H00000002
- Public Const CRYPT_DELETE_DEFAULT As Long = &H00000004
- ' exported key blob definitions
- Public Const SIMPLEBLOB As Long = &H1
- Public Const PUBLICKEYBLOB As Long = &H6
- Public Const PRIVATEKEYBLOB As Long = &H7
- Public Const PLAINTEXTKEYBLOB As Long = &H8
- Public Const AT_KEYEXCHANGE As Long = 1
- Public Const AT_SIGNATURE As Long = 2
- Public Const CRYPT_USERDATA As Long = 1
- ' dwParam
- Public Const KP_IV As Long = 1
- Public Const KP_SALT As Long = 2
- Public Const KP_PADDING As Long = 3
- Public Const KP_MODE As Long = 4
- Public Const KP_MODE_BITS As Long = 5
- Public Const KP_PERMISSIONS As Long = 6
- Public Const KP_ALGID As Long = 7
- Public Const KP_BLOCKLEN As Long = 8
- Public Const KP_KEYLEN As Long = 9
- Public Const KP_SALT_EX As Long = 10
- Public Const KP_P As Long = 11
- Public Const KP_G As Long = 12
- Public Const KP_Q As Long = 13
- Public Const KP_X As Long = 14
- Public Const KP_Y As Long = 15
- Public Const KP_RA As Long = 16
- Public Const KP_RB As Long = 17
- Public Const KP_INFO As Long = 18
- Public Const KP_EFFECTIVE_KEYLEN As Long = 19
- Public Const KP_SCHANNEL_ALG As Long = 20
- Public Const KP_CLIENT_RANDOM As Long = 21
- Public Const KP_SERVER_RANDOM As Long = 22
- Public Const KP_RP As Long = 23
- Public Const KP_PRECOMP_MD5 As Long = 24
- Public Const KP_PRECOMP_SHA As Long = 25
- Public Const KP_CERTIFICATE As Long = 26
- Public Const KP_CLEAR_KEY As Long = 27
- Public Const KP_PUB_EX_LEN As Long = 28
- Public Const KP_PUB_EX_VAL As Long = 29
- ' KP_PADDING
- Public Const PKCS5_PADDING As Long = 1
- Public Const RANDOM_PADDING As Long = 2
- Public Const ZERO_PADDING As Long = 3
- ' KP_MODE
- Public Const CRYPT_MODE_CBC As Long = 1
- Public Const CRYPT_MODE_ECB As Long = 2
- Public Const CRYPT_MODE_OFB As Long = 3
- Public Const CRYPT_MODE_CFB As Long = 4
- Public Const CRYPT_MODE_CTS As Long = 5
- ' KP_PERMISSIONS
- Public Const CRYPT_ENCRYPT As Long = &H0001
- Public Const CRYPT_DECRYPT As Long = &H0002
- Public Const CRYPT_EXPORT As Long = &H0004
- Public Const CRYPT_READ As Long = &H0008
- Public Const CRYPT_WRITE As Long = &H0010
- Public Const CRYPT_MAC As Long = &H0020
- Public Const CRYPT_EXPORT_KEY As Long = &H0040
- Public Const CRYPT_IMPORT_KEY As Long = &H0080
- Public Const HP_ALGID As Long = &H0001
- Public Const HP_HASHVAL As Long = &H0002
- Public Const HP_HASHSIZE As Long = &H0004
- Public Const HP_HMAC_INFO As Long = &H0005
- '
- ' CryptGetProvParam
- '
- Public Const PP_ENUMALGS As Long = 1
- Public Const PP_ENUMCONTAINERS As Long = 2
- Public Const PP_IMPTYPE As Long = 3
- Public Const PP_NAME As Long = 4
- Public Const PP_VERSION As Long = 5
- Public Const PP_CONTAINER As Long = 6
- Public Const PP_CHANGE_PASSWORD As Long = 7
- Public Const PP_KEYSET_SEC_DESCR As Long = 8
- Public Const PP_CERTCHAIN As Long = 9
- Public Const PP_KEY_TYPE_SUBTYPE As Long = 10
- Public Const PP_PROVTYPE As Long = 16
- Public Const PP_KEYSTORAGE As Long = 17
- Public Const PP_APPLI_CERT As Long = 18
- Public Const PP_SYM_KEYSIZE As Long = 19
- Public Const PP_SESSION_KEYSIZE As Long = 20
- Public Const PP_UI_PROMPT As Long = 21
- Public Const PP_ENUMALGS_EX As Long = 22
- Public Const CRYPT_FIRST As Long = 1
- Public Const CRYPT_NEXT As Long = 2
- Public Const CRYPT_IMPL_HARDWARE As Long = 1
- Public Const CRYPT_IMPL_SOFTWARE As Long = 2
- Public Const CRYPT_IMPL_MIXED As Long = 3
- Public Const CRYPT_IMPL_UNKNOWN As Long = 4
- ' key storage flags
- Public Const CRYPT_SEC_DESCR As Long = &H00000001
- Public Const CRYPT_PSTORE As Long = &H00000002
- Public Const CRYPT_UI_PROMPT As Long = &H00000004
- ' protocol flags
- Public Const CRYPT_FLAG_PCT1 As Long = &H0001
- Public Const CRYPT_FLAG_SSL2 As Long = &H0002
- Public Const CRYPT_FLAG_SSL3 As Long = &H0004
- Public Const CRYPT_FLAG_TLS1 As Long = &H0008
- '
- ' CryptSetProvParam
- '
- Public Const PP_CLIENT_HWND As Long = 1
- Public Const PP_CONTEXT_INFO As Long = 11
- Public Const PP_KEYEXCHANGE_KEYSIZE As Long = 12
- Public Const PP_SIGNATURE_KEYSIZE As Long = 13
- Public Const PP_KEYEXCHANGE_ALG As Long = 14
- Public Const PP_SIGNATURE_ALG As Long = 15
- Public Const PROV_RSA_FULL As Long = 1
- Public Const PROV_RSA_SIG As Long = 2
- Public Const PROV_DSS As Long = 3
- Public Const PROV_FORTEZZA As Long = 4
- Public Const PROV_MS_EXCHANGE As Long = 5
- Public Const PROV_SSL As Long = 6
- Public Const PROV_RSA_SCHANNEL As Long = 12
- Public Const PROV_DSS_DH As Long = 13
- Public Const PROV_EC_ECDSA As Long = 14
- Public Const PROV_EC_ECNR As Long = 15
- Public Const PROV_EC_ECDSA_FULL As Long = 16
- Public Const PROV_EC_ECNR_FULL As Long = 17
- Public Const PROV_SPYRUS_LYNKS As Long = 20
- '
- ' STT defined Providers
- '
- Public Const PROV_STT_MER As Long = 7
- Public Const PROV_STT_ACQ As Long = 8
- Public Const PROV_STT_BRND As Long = 9
- Public Const PROV_STT_ROOT As Long = 10
- Public Const PROV_STT_ISS As Long = 11
- '
- ' Provider friendly names
- '
- Public Const MS_DEF_PROV_A As String = "Microsoft Base Cryptographic Provider v1.0"
- Public Const MS_DEF_PROV_W As String = "Microsoft Base Cryptographic Provider v1.0"
- Public Const MS_ENHANCED_PROV_A As String = "Microsoft Enhanced Cryptographic Provider v1.0"
- Public Const MS_ENHANCED_PROV_W As String = "Microsoft Enhanced Cryptographic Provider v1.0"
- Public Const MS_DEF_DSS_PROV_A As String = "Microsoft Base DSS Cryptographic Provider"
- Public Const MS_DEF_DSS_PROV_W As String = "Microsoft Base DSS Cryptographic Provider"
- Public Const MAXUIDLEN As Long = 64
- Public Const CUR_BLOB_VERSION As Long = 2
- ' structure for use with CryptSetHashParam with CALG_HMAC
- ' structure for use with CryptSetKeyParam with KP_SCHANNEL_ALG
- ' uses of algortihms for SCHANNEL_ALG structure
- Public Const SCHANNEL_MAC_KEY As Long = &H00000000
- Public Const SCHANNEL_ENC_KEY As Long = &H00000001
- '+-------------------------------------------------------------------------
- ' CRYPTOAPI BLOB definitions
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' In a CRYPT_BIT_BLOB the last byte may contain 0-7 unused bits. Therefore, the
- ' overall bit length is cbData * 8 - cUnusedBits.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Type used for any algorithm
- '
- ' Where the Parameters CRYPT_OBJID_BLOB is in its encoded representation. For most
- '--------------------------------------------------------------------------
- ' Following are the definitions of various algorithm object identifiers
- ' RSA
- Public Const szOID_RSA As String = "1.2.840.113549"
- Public Const szOID_PKCS As String = "1.2.840.113549.1"
- Public Const szOID_RSA_HASH As String = "1.2.840.113549.2"
- Public Const szOID_RSA_ENCRYPT As String = "1.2.840.113549.3"
- Public Const szOID_PKCS_1 As String = "1.2.840.113549.1.1"
- Public Const szOID_PKCS_2 As String = "1.2.840.113549.1.2"
- Public Const szOID_PKCS_3 As String = "1.2.840.113549.1.3"
- Public Const szOID_PKCS_4 As String = "1.2.840.113549.1.4"
- Public Const szOID_PKCS_5 As String = "1.2.840.113549.1.5"
- Public Const szOID_PKCS_6 As String = "1.2.840.113549.1.6"
- Public Const szOID_PKCS_7 As String = "1.2.840.113549.1.7"
- Public Const szOID_PKCS_8 As String = "1.2.840.113549.1.8"
- Public Const szOID_PKCS_9 As String = "1.2.840.113549.1.9"
- Public Const szOID_PKCS_10 As String = "1.2.840.113549.1.10"
- Public Const szOID_RSA_RSA As String = "1.2.840.113549.1.1.1"
- Public Const szOID_RSA_MD2RSA As String = "1.2.840.113549.1.1.2"
- Public Const szOID_RSA_MD4RSA As String = "1.2.840.113549.1.1.3"
- Public Const szOID_RSA_MD5RSA As String = "1.2.840.113549.1.1.4"
- Public Const szOID_RSA_SHA1RSA As String = "1.2.840.113549.1.1.5"
- Public Const szOID_RSA_SETOAEP_RSA As String = "1.2.840.113549.1.1.6"
- Public Const szOID_RSA_data As String = "1.2.840.113549.1.7.1"
- Public Const szOID_RSA_signedData As String = "1.2.840.113549.1.7.2"
- Public Const szOID_RSA_envelopedData As String = "1.2.840.113549.1.7.3"
- Public Const szOID_RSA_signEnvData As String = "1.2.840.113549.1.7.4"
- Public Const szOID_RSA_digestedData As String = "1.2.840.113549.1.7.5"
- Public Const szOID_RSA_hashedData As String = "1.2.840.113549.1.7.5"
- Public Const szOID_RSA_encryptedData As String = "1.2.840.113549.1.7.6"
- Public Const szOID_RSA_emailAddr As String = "1.2.840.113549.1.9.1"
- Public Const szOID_RSA_unstructName As String = "1.2.840.113549.1.9.2"
- Public Const szOID_RSA_contentType As String = "1.2.840.113549.1.9.3"
- Public Const szOID_RSA_messageDigest As String = "1.2.840.113549.1.9.4"
- Public Const szOID_RSA_signingTime As String = "1.2.840.113549.1.9.5"
- Public Const szOID_RSA_counterSign As String = "1.2.840.113549.1.9.6"
- Public Const szOID_RSA_challengePwd As String = "1.2.840.113549.1.9.7"
- Public Const szOID_RSA_unstructAddr As String = "1.2.840.113549.1.9.8"
- Public Const szOID_RSA_extCertAttrs As String = "1.2.840.113549.1.9.9"
- Public Const szOID_RSA_MD2 As String = "1.2.840.113549.2.2"
- Public Const szOID_RSA_MD4 As String = "1.2.840.113549.2.4"
- Public Const szOID_RSA_MD5 As String = "1.2.840.113549.2.5"
- Public Const szOID_RSA_RC2CBC As String = "1.2.840.113549.3.2"
- Public Const szOID_RSA_RC4 As String = "1.2.840.113549.3.4"
- ' ITU-T UsefulDefinitions
- Public Const szOID_DS As String = "2.5"
- Public Const szOID_DSALG As String = "2.5.8"
- Public Const szOID_DSALG_CRPT As String = "2.5.8.1"
- Public Const szOID_DSALG_HASH As String = "2.5.8.2"
- Public Const szOID_DSALG_SIGN As String = "2.5.8.3"
- Public Const szOID_DSALG_RSA As String = "2.5.8.1.1"
- ' http:
- ' http:
- Public Const szOID_OIW As String = "1.3.14"
- Public Const szOID_OIWSEC As String = "1.3.14.3.2"
- Public Const szOID_OIWSEC_md4RSA As String = "1.3.14.3.2.2"
- Public Const szOID_OIWSEC_md5RSA As String = "1.3.14.3.2.3"
- Public Const szOID_OIWSEC_md4RSA2 As String = "1.3.14.3.2.4"
- Public Const szOID_OIWSEC_desECB As String = "1.3.14.3.2.6"
- Public Const szOID_OIWSEC_desCBC As String = "1.3.14.3.2.7"
- Public Const szOID_OIWSEC_desOFB As String = "1.3.14.3.2.8"
- Public Const szOID_OIWSEC_desCFB As String = "1.3.14.3.2.9"
- Public Const szOID_OIWSEC_desMAC As String = "1.3.14.3.2.10"
- Public Const szOID_OIWSEC_rsaSign As String = "1.3.14.3.2.11"
- Public Const szOID_OIWSEC_dsa As String = "1.3.14.3.2.12"
- Public Const szOID_OIWSEC_shaDSA As String = "1.3.14.3.2.13"
- Public Const szOID_OIWSEC_mdc2RSA As String = "1.3.14.3.2.14"
- Public Const szOID_OIWSEC_shaRSA As String = "1.3.14.3.2.15"
- Public Const szOID_OIWSEC_dhCommMod As String = "1.3.14.3.2.16"
- Public Const szOID_OIWSEC_desEDE As String = "1.3.14.3.2.17"
- Public Const szOID_OIWSEC_sha As String = "1.3.14.3.2.18"
- Public Const szOID_OIWSEC_mdc2 As String = "1.3.14.3.2.19"
- Public Const szOID_OIWSEC_dsaComm As String = "1.3.14.3.2.20"
- Public Const szOID_OIWSEC_dsaCommSHA As String = "1.3.14.3.2.21"
- Public Const szOID_OIWSEC_rsaXchg As String = "1.3.14.3.2.22"
- Public Const szOID_OIWSEC_keyHashSeal As String = "1.3.14.3.2.23"
- Public Const szOID_OIWSEC_md2RSASign As String = "1.3.14.3.2.24"
- Public Const szOID_OIWSEC_md5RSASign As String = "1.3.14.3.2.25"
- Public Const szOID_OIWSEC_sha1 As String = "1.3.14.3.2.26"
- Public Const szOID_OIWSEC_dsaSHA1 As String = "1.3.14.3.2.27"
- Public Const szOID_OIWSEC_dsaCommSHA1 As String = "1.3.14.3.2.28"
- Public Const szOID_OIWSEC_sha1RSASign As String = "1.3.14.3.2.29"
- Public Const szOID_OIWDIR As String = "1.3.14.7.2"
- Public Const szOID_OIWDIR_CRPT As String = "1.3.14.7.2.1"
- Public Const szOID_OIWDIR_HASH As String = "1.3.14.7.2.2"
- Public Const szOID_OIWDIR_SIGN As String = "1.3.14.7.2.3"
- Public Const szOID_OIWDIR_md2 As String = "1.3.14.7.2.2.1"
- Public Const szOID_OIWDIR_md2RSA As String = "1.3.14.7.2.3.1"
- ' INFOSEC Algorithms
- Public Const szOID_INFOSEC As String = "2.16.840.1.101.2.1"
- Public Const szOID_INFOSEC_sdnsSignature As String = "2.16.840.1.101.2.1.1.1"
- Public Const szOID_INFOSEC_mosaicSignature As String = "2.16.840.1.101.2.1.1.2"
- Public Const szOID_INFOSEC_sdnsConfidentiality As String = "2.16.840.1.101.2.1.1.3"
- Public Const szOID_INFOSEC_mosaicConfidentiality As String = "2.16.840.1.101.2.1.1.4"
- Public Const szOID_INFOSEC_sdnsIntegrity As String = "2.16.840.1.101.2.1.1.5"
- Public Const szOID_INFOSEC_mosaicIntegrity As String = "2.16.840.1.101.2.1.1.6"
- Public Const szOID_INFOSEC_sdnsTokenProtection As String = "2.16.840.1.101.2.1.1.7"
- Public Const szOID_INFOSEC_mosaicTokenProtection As String = "2.16.840.1.101.2.1.1.8"
- Public Const szOID_INFOSEC_sdnsKeyManagement As String = "2.16.840.1.101.2.1.1.9"
- Public Const szOID_INFOSEC_mosaicKeyManagement As String = "2.16.840.1.101.2.1.1.10"
- Public Const szOID_INFOSEC_sdnsKMandSig As String = "2.16.840.1.101.2.1.1.11"
- Public Const szOID_INFOSEC_mosaicKMandSig As String = "2.16.840.1.101.2.1.1.12"
- Public Const szOID_INFOSEC_SuiteASignature As String = "2.16.840.1.101.2.1.1.13"
- Public Const szOID_INFOSEC_SuiteAConfidentiality As String = "2.16.840.1.101.2.1.1.14"
- Public Const szOID_INFOSEC_SuiteAIntegrity As String = "2.16.840.1.101.2.1.1.15"
- Public Const szOID_INFOSEC_SuiteATokenProtection As String = "2.16.840.1.101.2.1.1.16"
- Public Const szOID_INFOSEC_SuiteAKeyManagement As String = "2.16.840.1.101.2.1.1.17"
- Public Const szOID_INFOSEC_SuiteAKMandSig As String = "2.16.840.1.101.2.1.1.18"
- Public Const szOID_INFOSEC_mosaicUpdatedSig As String = "2.16.840.1.101.2.1.1.19"
- Public Const szOID_INFOSEC_mosaicKMandUpdSig As String = "2.16.840.1.101.2.1.1.20"
- Public Const szOID_INFOSEC_mosaicUpdatedInteg As String = "2.16.840.1.101.2.1.1.21"
- '+-------------------------------------------------------------------------
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Type used for an extension to an encoded content
- '
- ' Where the Value's CRYPT_OBJID_BLOB is in its encoded representation.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' AttributeTypeValue
- '
- ' Where the Value's CRYPT_OBJID_BLOB is in its encoded representation.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Attributes
- '
- ' Where the Value's PATTR_BLOBs are in their encoded representation.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- '
- ' The interpretation of the Value depends on the dwValueType.
- ' See below for a list of the types.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' CERT_RDN attribute Object Identifiers
- '--------------------------------------------------------------------------
- ' Labeling attribute types:
- Public Const szOID_COMMON_NAME As String = "2.5.4.3"
- Public Const szOID_SUR_NAME As String = "2.5.4.4"
- Public Const szOID_DEVICE_SERIAL_NUMBER As String = "2.5.4.5"
- ' Geographic attribute types:
- Public Const szOID_COUNTRY_NAME As String = "2.5.4.6"
- Public Const szOID_LOCALITY_NAME As String = "2.5.4.7"
- Public Const szOID_STATE_OR_PROVINCE_NAME As String = "2.5.4.8"
- Public Const szOID_STREET_ADDRESS As String = "2.5.4.9"
- ' Organizational attribute types:
- Public Const szOID_ORGANIZATION_NAME As String = "2.5.4.10"
- Public Const szOID_ORGANIZATIONAL_UNIT_NAME As String = "2.5.4.11"
- Public Const szOID_TITLE As String = "2.5.4.12"
- ' Explanatory attribute types:
- Public Const szOID_DESCRIPTION As String = "2.5.4.13"
- Public Const szOID_SEARCH_GUIDE As String = "2.5.4.14"
- Public Const szOID_BUSINESS_CATEGORY As String = "2.5.4.15"
- ' Postal addressing attribute types:
- Public Const szOID_POSTAL_ADDRESS As String = "2.5.4.16"
- Public Const szOID_POSTAL_CODE As String = "2.5.4.17"
- Public Const szOID_POST_OFFICE_BOX As String = "2.5.4.18"
- Public Const szOID_PHYSICAL_DELIVERY_OFFICE_NAME As String = "2.5.4.19"
- ' Telecommunications addressing attribute types:
- Public Const szOID_TELEPHONE_NUMBER As String = "2.5.4.20"
- Public Const szOID_TELEX_NUMBER As String = "2.5.4.21"
- Public Const szOID_TELETEXT_TERMINAL_IDENTIFIER As String = "2.5.4.22"
- Public Const szOID_FACSIMILE_TELEPHONE_NUMBER As String = "2.5.4.23"
- Public Const szOID_X21_ADDRESS As String = "2.5.4.24"
- Public Const szOID_INTERNATIONAL_ISDN_NUMBER As String = "2.5.4.25"
- Public Const szOID_REGISTERED_ADDRESS As String = "2.5.4.26"
- Public Const szOID_DESTINATION_INDICATOR As String = "2.5.4.27"
- ' Preference attribute types:
- Public Const szOID_PREFERRED_DELIVERY_METHOD As String = "2.5.4.28"
- ' OSI application attribute types:
- Public Const szOID_PRESENTATION_ADDRESS As String = "2.5.4.29"
- Public Const szOID_SUPPORTED_APPLICATION_CONTEXT As String = "2.5.4.30"
- ' Relational application attribute types:
- Public Const szOID_MEMBER As String = "2.5.4.31"
- Public Const szOID_OWNER As String = "2.5.4.32"
- Public Const szOID_ROLE_OCCUPANT As String = "2.5.4.33"
- Public Const szOID_SEE_ALSO As String = "2.5.4.34"
- ' Security attribute types:
- Public Const szOID_USER_PASSWORD As String = "2.5.4.35"
- Public Const szOID_USER_CERTIFICATE As String = "2.5.4.36"
- Public Const szOID_CA_CERTIFICATE As String = "2.5.4.37"
- Public Const szOID_AUTHORITY_REVOCATION_LIST As String = "2.5.4.38"
- Public Const szOID_CERTIFICATE_REVOCATION_LIST As String = "2.5.4.39"
- Public Const szOID_CROSS_CERTIFICATE_PAIR As String = "2.5.4.40"
- ' Undocumented attribute types???
- '#define szOID_??? "2.5.4.41"
- Public Const szOID_GIVEN_NAME As String = "2.5.4.42"
- Public Const szOID_INITIALS As String = "2.5.4.43"
- ' Pilot user attribute types:
- Public Const szOID_DOMAIN_COMPONENT As String = "0.9.2342.19200300.100.1.25"
- '+-------------------------------------------------------------------------
- ' CERT_RDN Attribute Value Types
- '
- ' For RDN_ENCODED_BLOB, the Value's CERT_RDN_VALUE_BLOB is in its encoded
- ' representation. Otherwise, its an array of bytes.
- '
- ' For all CERT_RDN types, Value.cbData is always the number of bytes, not
- ' necessarily the number of elements in the string. For instance,
- '
- ' For CertDecodeName, two 0 bytes are always appended to the end of the
- ' These added 0 bytes are't included in the BLOB.cbData.
- '--------------------------------------------------------------------------
- Public Const CERT_RDN_ANY_TYPE As Long = 0
- Public Const CERT_RDN_ENCODED_BLOB As Long = 1
- Public Const CERT_RDN_OCTET_STRING As Long = 2
- Public Const CERT_RDN_NUMERIC_STRING As Long = 3
- Public Const CERT_RDN_PRINTABLE_STRING As Long = 4
- Public Const CERT_RDN_TELETEX_STRING As Long = 5
- Public Const CERT_RDN_T61_STRING As Long = 5
- Public Const CERT_RDN_VIDEOTEX_STRING As Long = 6
- Public Const CERT_RDN_IA5_STRING As Long = 7
- Public Const CERT_RDN_GRAPHIC_STRING As Long = 8
- Public Const CERT_RDN_VISIBLE_STRING As Long = 9
- Public Const CERT_RDN_ISO646_STRING As Long = 9
- Public Const CERT_RDN_GENERAL_STRING As Long = 10
- Public Const CERT_RDN_UNIVERSAL_STRING As Long = 11
- Public Const CERT_RDN_INT4_STRING As Long = 11
- Public Const CERT_RDN_BMP_STRING As Long = 12
- Public Const CERT_RDN_UNICODE_STRING As Long = 12
- ' Macro to check that the dwValueType is a character string and not an
- ' encoded blob or octet string
- '+-------------------------------------------------------------------------
- ' A CERT_RDN consists of an array of the above attributes
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Information stored in a subject's or issuer's name. The information
- ' is represented as an array of the above RDNs.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Name attribute value without the Object Identifier
- '
- ' The interpretation of the Value depends on the dwValueType.
- ' See above for a list of the types.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Public Key Info
- '
- ' The PublicKey is the encoded representation of the information as it is
- ' stored in the bit string
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Information stored in a certificate
- '
- ' The Issuer, Subject, Algorithm, PublicKey and Extension BLOBs are the
- ' encoded representation of the information.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Certificate versions
- '--------------------------------------------------------------------------
- Public Const CERT_V1 As Long = 0
- Public Const CERT_V2 As Long = 1
- Public Const CERT_V3 As Long = 2
- '+-------------------------------------------------------------------------
- ' Certificate Information Flags
- '--------------------------------------------------------------------------
- Public Const CERT_INFO_VERSION_FLAG As Long = 1
- Public Const CERT_INFO_SERIAL_NUMBER_FLAG As Long = 2
- Public Const CERT_INFO_SIGNATURE_ALGORITHM_FLAG As Long = 3
- Public Const CERT_INFO_ISSUER_FLAG As Long = 4
- Public Const CERT_INFO_NOT_BEFORE_FLAG As Long = 5
- Public Const CERT_INFO_NOT_AFTER_FLAG As Long = 6
- Public Const CERT_INFO_SUBJECT_FLAG As Long = 7
- Public Const CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG As Long = 8
- Public Const CERT_INFO_ISSUER_UNIQUE_ID_FLAG As Long = 9
- Public Const CERT_INFO_SUBJECT_UNIQUE_ID_FLAG As Long = 10
- Public Const CERT_INFO_EXTENSION_FLAG As Long = 11
- '+-------------------------------------------------------------------------
- ' An entry in a CRL
- '
- ' The Extension BLOBs are the encoded representation of the information.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Information stored in a CRL
- '
- ' The Issuer, Algorithm and Extension BLOBs are the encoded
- ' representation of the information.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' CRL versions
- '--------------------------------------------------------------------------
- Public Const CRL_V1 As Long = 0
- Public Const CRL_V2 As Long = 1
- '+-------------------------------------------------------------------------
- ' Information stored in a certificate request
- '
- ' The Subject, Algorithm, PublicKey and Attribute BLOBs are the encoded
- ' representation of the information.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Certificate Request versions
- '--------------------------------------------------------------------------
- Public Const CERT_REQUEST_V1 As Long = 0
- '+-------------------------------------------------------------------------
- ' Information stored in Netscape's Keygen request
- '--------------------------------------------------------------------------
- Public Const CERT_KEYGEN_REQUEST_V1 As Long = 0
- '+-------------------------------------------------------------------------
- ' Certificate, CRL, Certificate Request or Keygen Request Signed Content
- '
- ' The "to be signed" encoded content plus its signature. The ToBeSigned
- ' is the encoded CERT_INFO, CRL_INFO, CERT_REQUEST_INFO or
- ' CERT_KEYGEN_REQUEST_INFO.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' CTL Usage. Also used for EnhancedKeyUsage extension.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' An entry in a CTL
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Information stored in a CTL
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' CTL versions
- '--------------------------------------------------------------------------
- Public Const CTL_V1 As Long = 0
- '+-------------------------------------------------------------------------
- ' TimeStamp Request
- '
- ' The pszTimeStamp is the OID for the Time type requested
- ' The pszContentType is the Content Type OID for the content, usually DATA
- ' The Content is a un-decoded blob
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Certificate and Message encoding types
- '
- ' The encoding type is a DWORD containing both the certificate and message
- ' encoding types. The certificate encoding type is stored in the LOWORD.
- ' The message encoding type is stored in the HIWORD. Some functions or
- ' structure fields require only one of the encoding types. The following
- ' required:
- '
- ' Its always acceptable to specify both.
- '--------------------------------------------------------------------------
- Public Const CERT_ENCODING_TYPE_MASK As Long = &H0000FFFF
- Public Const CMSG_ENCODING_TYPE_MASK As Long = &HFFFF0000
- Public Const CRYPT_ASN_ENCODING As Long = &H00000001
- Public Const CRYPT_NDR_ENCODING As Long = &H00000002
- Public Const X509_ASN_ENCODING As Long = &H00000001
- Public Const X509_NDR_ENCODING As Long = &H00000002
- Public Const PKCS_7_ASN_ENCODING As Long = &H00010000
- Public Const PKCS_7_NDR_ENCODING As Long = &H00020000
- '+-------------------------------------------------------------------------
- ' format the specified data structure according to the certificate
- ' encoding type.
- '
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Encode / decode the specified data structure according to the certificate
- ' encoding type.
- '
- ' See below for a list of the predefined data structures.
- '--------------------------------------------------------------------------
- ' When the following flag is set the nocopy optimization is enabled.
- ' This optimization where appropriate, updates the pvStructInfo fields
- ' to point to content residing within pbEncoded instead of making a copy
- ' of and appending to pvStructInfo.
- '
- ' Note, when set, pbEncoded can't be freed until pvStructInfo is freed.
- Public Const CRYPT_DECODE_NOCOPY_FLAG As Long = &H1
- '+-------------------------------------------------------------------------
- ' Predefined X509 certificate data structures that can be encoded / decoded.
- '--------------------------------------------------------------------------
- Public Const CRYPT_ENCODE_DECODE_NONE As Long = 0
- '+-------------------------------------------------------------------------
- ' Predefined X509 certificate extension data structures that can be
- ' encoded / decoded.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Additional predefined data structures that can be encoded / decoded.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Predefined primitive data structures that can be encoded / decoded.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' More predefined X509 certificate extension data structures that can be
- ' encoded / decoded.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Predefined PKCS #7 data structures that can be encoded / decoded.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' can be encoded / decoded.
- '
- ' Predefined values: 2000 .. 2999
- '
- ' See spc.h for value and data structure definitions.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Extension Object Identifiers
- '--------------------------------------------------------------------------
- Public Const szOID_AUTHORITY_KEY_IDENTIFIER As String = "2.5.29.1"
- Public Const szOID_KEY_ATTRIBUTES As String = "2.5.29.2"
- Public Const szOID_KEY_USAGE_RESTRICTION As String = "2.5.29.4"
- Public Const szOID_SUBJECT_ALT_NAME As String = "2.5.29.7"
- Public Const szOID_ISSUER_ALT_NAME As String = "2.5.29.8"
- Public Const szOID_BASIC_CONSTRAINTS As String = "2.5.29.10"
- Public Const szOID_KEY_USAGE As String = "2.5.29.15"
- Public Const szOID_BASIC_CONSTRAINTS2 As String = "2.5.29.19"
- Public Const szOID_CERT_POLICIES As String = "2.5.29.32"
- Public Const szOID_AUTHORITY_KEY_IDENTIFIER2 As String = "2.5.29.35"
- Public Const szOID_SUBJECT_KEY_IDENTIFIER As String = "2.5.29.14"
- Public Const szOID_SUBJECT_ALT_NAME2 As String = "2.5.29.17"
- Public Const szOID_ISSUER_ALT_NAME2 As String = "2.5.29.18"
- Public Const szOID_CRL_REASON_CODE As String = "2.5.29.21"
- Public Const szOID_CRL_DIST_POINTS As String = "2.5.29.31"
- Public Const szOID_ENHANCED_KEY_USAGE As String = "2.5.29.37"
- ' Internet Public Key Infrastructure
- Public Const szOID_PKIX As String = "1.3.6.1.5.5.7"
- Public Const szOID_AUTHORITY_INFO_ACCESS As String = "1.3.6.1.5.5.7.2"
- ' Microsoft extensions or attributes
- Public Const szOID_CERT_EXTENSIONS As String = "1.3.6.1.4.1.311.2.1.14"
- Public Const szOID_NEXT_UPDATE_LOCATION As String = "1.3.6.1.4.1.311.10.2"
- ' Microsoft PKCS #7 ContentType Object Identifiers
- Public Const szOID_CTL As String = "1.3.6.1.4.1.311.10.1"
- '+-------------------------------------------------------------------------
- '--------------------------------------------------------------------------
- Public Const szOID_POLICY_MAPPINGS As String = "2.5.29.5"
- Public Const szOID_SUBJECT_DIR_ATTRS As String = "2.5.29.9"
- '+-------------------------------------------------------------------------
- '--------------------------------------------------------------------------
- Public Const szOID_PKIX_KP As String = "1.3.6.1.5.5.7.3"
- ' Consistent key usage bits: DIGITAL_SIGNATURE, KEY_ENCIPHERMENT
- ' or KEY_AGREEMENT
- Public Const szOID_PKIX_KP_SERVER_AUTH As String = "1.3.6.1.5.5.7.3.1"
- ' Consistent key usage bits: DIGITAL_SIGNATURE
- Public Const szOID_PKIX_KP_CLIENT_AUTH As String = "1.3.6.1.5.5.7.3.2"
- ' Consistent key usage bits: DIGITAL_SIGNATURE
- Public Const szOID_PKIX_KP_CODE_SIGNING As String = "1.3.6.1.5.5.7.3.3"
- ' Consistent key usage bits: DIGITAL_SIGNATURE, NON_REPUDIATION and/or
- Public Const szOID_PKIX_KP_EMAIL_PROTECTION As String = "1.3.6.1.5.5.7.3.4"
- '+-------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Signer of CTLs
- Public Const szOID_KP_CTL_USAGE_SIGNING As String = "1.3.6.1.4.1.311.10.3.1"
- '+-------------------------------------------------------------------------
- ' Microsoft Attribute Object Identifiers
- '+-------------------------------------------------------------------------
- Public Const szOID_YESNO_TRUST_ATTR As String = "1.3.6.1.4.1.311.10.4.1"
- '+-------------------------------------------------------------------------
- ' X509_CERT
- '
- ' The "to be signed" encoded content plus its signature. The ToBeSigned
- ' X509_CERT_TO_BE_SIGNED, X509_CERT_CRL_TO_BE_SIGNED or
- ' X509_CERT_REQUEST_TO_BE_SIGNED.
- '
- ' pvStructInfo points to CERT_SIGNED_CONTENT_INFO.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_CERT_TO_BE_SIGNED
- '
- ' pvStructInfo points to CERT_INFO.
- '
- '
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_CERT_CRL_TO_BE_SIGNED
- '
- ' pvStructInfo points to CRL_INFO.
- '
- '
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_CERT_REQUEST_TO_BE_SIGNED
- '
- ' pvStructInfo points to CERT_REQUEST_INFO.
- '
- '
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_EXTENSIONS
- ' szOID_CERT_EXTENSIONS
- '
- ' pvStructInfo points to following CERT_EXTENSIONS.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_NAME_VALUE
- ' X509_ANY_STRING
- '
- ' pvStructInfo points to CERT_NAME_VALUE.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_UNICODE_NAME_VALUE
- ' X509_UNICODE_ANY_STRING
- '
- ' pvStructInfo points to CERT_NAME_VALUE.
- '
- ' The name values are unicode strings.
- '
- ' For CryptEncodeObject:
- ' Value.pbData points to the unicode string.
- ' If Value.cbData = 0, then, the unicode string is NULL terminated.
- ' Otherwise, Value.cbData is the unicode string byte count. The byte count
- ' is twice the character count.
- '
- ' If the unicode string contains an invalid character for the specified
- ' dwValueType, then, *pcbEncoded is updated with the unicode character
- ' index of the first invalid character. LastError is set to:
- ' CRYPT_E_INVALID_NUMERIC_STRING, CRYPT_E_INVALID_PRINTABLE_STRING or
- ' CRYPT_E_INVALID_IA5_STRING.
- '
- ' The unicode string is converted before being encoded according to
- ' the specified dwValueType. If dwValueType is set to 0, LastError
- ' is set to E_INVALIDARG.
- '
- ' CERT_RDN_ENCODED_BLOB or CERT_RDN_OCTET_STRING), then, CryptEncodeObject
- ' will return FALSE with LastError set to CRYPT_E_NOT_CHAR_STRING.
- '
- ' For CryptDecodeObject:
- ' Value.pbData points to a NULL terminated unicode string. Value.cbData
- ' contains the byte count of the unicode string excluding the NULL
- ' terminator. dwValueType contains the type used in the encoded object.
- ' Its not forced to CERT_RDN_UNICODE_STRING. The encoded value is
- ' converted to the unicode string according to the dwValueType.
- '
- ' If the encoded object isn't one of the character string types, then,
- ' CryptDecodeObject will return FALSE with LastError set to
- ' CRYPT_E_NOT_CHAR_STRING. For a non character string, decode using
- ' X509_NAME_VALUE or X509_ANY_STRING.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_NAME
- '
- ' pvStructInfo points to CERT_NAME_INFO.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_UNICODE_NAME
- '
- ' pvStructInfo points to CERT_NAME_INFO.
- '
- ' The RDN attribute values are unicode strings except for the dwValueTypes of
- ' CERT_RDN_ENCODED_BLOB or CERT_RDN_OCTET_STRING. These dwValueTypes are
- ' the same as for a X509_NAME. Their values aren't converted to/from unicode.
- '
- ' For CryptEncodeObject:
- ' Value.pbData points to the unicode string.
- ' If Value.cbData = 0, then, the unicode string is NULL terminated.
- ' Otherwise, Value.cbData is the unicode string byte count. The byte count
- ' is twice the character count.
- '
- ' an acceptable dwValueType. If the unicode string contains an
- ' invalid character for the found or specified dwValueType, then,
- ' *pcbEncoded is updated with the error location of the invalid character.
- ' See below for details. LastError is set to:
- ' CRYPT_E_INVALID_NUMERIC_STRING, CRYPT_E_INVALID_PRINTABLE_STRING or
- ' CRYPT_E_INVALID_IA5_STRING.
- '
- ' The unicode string is converted before being encoded according to
- ' the specified or ObjId matching dwValueType.
- '
- ' For CryptDecodeObject:
- ' Value.pbData points to a NULL terminated unicode string. Value.cbData
- ' contains the byte count of the unicode string excluding the NULL
- ' terminator. dwValueType contains the type used in the encoded object.
- ' Its not forced to CERT_RDN_UNICODE_STRING. The encoded value is
- ' converted to the unicode string according to the dwValueType.
- '
- ' If the dwValueType of the encoded value isn't a character string
- ' type, then, it isn't converted to UNICODE. Use the
- ' that Value.pbData points to a converted unicode string.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Unicode Name Value Error Location Definitions
- '
- ' Error location is returned in *pcbEncoded by
- '
- ' Error location consists of:
- ' RDN_INDEX - 10 bits << 22
- ' ATTR_INDEX - 6 bits << 16
- '--------------------------------------------------------------------------
- Public Const CERT_UNICODE_RDN_ERR_INDEX_MASK As Long = &H3FF
- Public Const CERT_UNICODE_RDN_ERR_INDEX_SHIFT As Long = 22
- Public Const CERT_UNICODE_ATTR_ERR_INDEX_MASK As Long = &H003F
- Public Const CERT_UNICODE_ATTR_ERR_INDEX_SHIFT As Long = 16
- Public Const CERT_UNICODE_VALUE_ERR_INDEX_MASK As Long = &H0000FFFF
- Public Const CERT_UNICODE_VALUE_ERR_INDEX_SHIFT As Long = 0
- '+-------------------------------------------------------------------------
- ' X509_PUBLIC_KEY_INFO
- '
- ' pvStructInfo points to CERT_PUBLIC_KEY_INFO.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_AUTHORITY_KEY_ID
- ' szOID_AUTHORITY_KEY_IDENTIFIER
- '
- ' pvStructInfo points to following CERT_AUTHORITY_KEY_ID_INFO.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_KEY_ATTRIBUTES
- ' szOID_KEY_ATTRIBUTES
- '
- ' pvStructInfo points to following CERT_KEY_ATTRIBUTES_INFO.
- '--------------------------------------------------------------------------
- Public Const CERT_DIGITAL_SIGNATURE_KEY_USAGE As Long = &H80
- Public Const CERT_NON_REPUDIATION_KEY_USAGE As Long = &H40
- Public Const CERT_KEY_ENCIPHERMENT_KEY_USAGE As Long = &H20
- Public Const CERT_DATA_ENCIPHERMENT_KEY_USAGE As Long = &H10
- Public Const CERT_KEY_AGREEMENT_KEY_USAGE As Long = &H08
- Public Const CERT_KEY_CERT_SIGN_KEY_USAGE As Long = &H04
- Public Const CERT_OFFLINE_CRL_SIGN_KEY_USAGE As Long = &H02
- Public Const CERT_CRL_SIGN_KEY_USAGE As Long = &H02
- '+-------------------------------------------------------------------------
- ' X509_KEY_USAGE_RESTRICTION
- ' szOID_KEY_USAGE_RESTRICTION
- '
- ' pvStructInfo points to following CERT_KEY_USAGE_RESTRICTION_INFO.
- '--------------------------------------------------------------------------
- ' See CERT_KEY_ATTRIBUTES_INFO for definition of the RestrictedKeyUsage bits
- '+-------------------------------------------------------------------------
- ' X509_ALTERNATE_NAME
- ' szOID_SUBJECT_ALT_NAME
- ' szOID_ISSUER_ALT_NAME
- ' szOID_SUBJECT_ALT_NAME2
- ' szOID_ISSUER_ALT_NAME2
- '
- ' pvStructInfo points to following CERT_ALT_NAME_INFO.
- '--------------------------------------------------------------------------
- Public Const CERT_ALT_NAME_OTHER_NAME As Long = 1
- Public Const CERT_ALT_NAME_RFC822_NAME As Long = 2
- Public Const CERT_ALT_NAME_DNS_NAME As Long = 3
- Public Const CERT_ALT_NAME_X400_ADDRESS As Long = 4
- Public Const CERT_ALT_NAME_DIRECTORY_NAME As Long = 5
- Public Const CERT_ALT_NAME_EDI_PARTY_NAME As Long = 6
- Public Const CERT_ALT_NAME_URL As Long = 7
- Public Const CERT_ALT_NAME_IP_ADDRESS As Long = 8
- Public Const CERT_ALT_NAME_REGISTERED_ID As Long = 9
- '+-------------------------------------------------------------------------
- ' Alternate name IA5 Error Location Definitions for
- ' CRYPT_E_INVALID_IA5_STRING.
- '
- ' Error location is returned in *pcbEncoded by
- '
- ' Error location consists of:
- ' ENTRY_INDEX - 8 bits << 16
- '--------------------------------------------------------------------------
- Public Const CERT_ALT_NAME_ENTRY_ERR_INDEX_MASK As Long = &HFF
- Public Const CERT_ALT_NAME_ENTRY_ERR_INDEX_SHIFT As Long = 16
- Public Const CERT_ALT_NAME_VALUE_ERR_INDEX_MASK As Long = &H0000FFFF
- Public Const CERT_ALT_NAME_VALUE_ERR_INDEX_SHIFT As Long = 0
- '+-------------------------------------------------------------------------
- ' X509_BASIC_CONSTRAINTS
- ' szOID_BASIC_CONSTRAINTS
- '
- ' pvStructInfo points to following CERT_BASIC_CONSTRAINTS_INFO.
- '--------------------------------------------------------------------------
- Public Const CERT_CA_SUBJECT_FLAG As Long = &H80
- Public Const CERT_END_ENTITY_SUBJECT_FLAG As Long = &H40
- '+-------------------------------------------------------------------------
- ' X509_BASIC_CONSTRAINTS2
- ' szOID_BASIC_CONSTRAINTS2
- '
- ' pvStructInfo points to following CERT_BASIC_CONSTRAINTS2_INFO.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_KEY_USAGE
- ' szOID_KEY_USAGE
- '
- ' pvStructInfo points to a CRYPT_BIT_BLOB. Has same bit definitions as
- ' CERT_KEY_ATTRIBUTES_INFO's IntendedKeyUsage.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_CERT_POLICIES
- ' szOID_CERT_POLICIES
- '
- ' pvStructInfo points to following CERT_POLICIES_INFO.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' RSA_CSP_PUBLICKEYBLOB
- '
- ' pvStructInfo points to a PUBLICKEYSTRUC immediately followed by a
- ' RSAPUBKEY and the modulus bytes.
- '
- ' CryptExportKey outputs the above StructInfo for a dwBlobType of
- ' PUBLICKEYBLOB. CryptImportKey expects the above StructInfo when
- ' importing a public key.
- '
- ' For dwCertEncodingType = X509_ASN_ENCODING, the RSA_CSP_PUBLICKEYBLOB is
- ' encoded as a PKCS #1 RSAPublicKey consisting of a SEQUENCE of a
- ' modulus INTEGER and a publicExponent INTEGER. The modulus is encoded
- ' as being a unsigned integer. When decoded, if the modulus was encoded
- ' as unsigned integer with a leading 0 byte, the 0 byte is removed before
- ' converting to the CSP modulus bytes.
- '
- ' For decode, the aiKeyAlg field of PUBLICKEYSTRUC is always set to
- ' CALG_RSA_KEYX.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_KEYGEN_REQUEST_TO_BE_SIGNED
- '
- ' pvStructInfo points to CERT_KEYGEN_REQUEST_INFO.
- '
- '
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' PKCS_ATTRIBUTE data structure
- '
- ' pvStructInfo points to a CRYPT_ATTRIBUTE.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' PKCS_CONTENT_INFO_SEQUENCE_OF_ANY data structure
- '
- ' pvStructInfo points to following CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY.
- '
- ' For X509_ASN_ENCODING: encoded as a PKCS#7 ContentInfo structure wrapping
- ' a sequence of ANY. The value of the contentType field is pszObjId,
- ' while the content field is the following structure:
- ' SequenceOfAny ::= SEQUENCE OF ANY
- '
- ' The CRYPT_DER_BLOBs point to the already encoded ANY content.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' PKCS_CONTENT_INFO data structure
- '
- ' pvStructInfo points to following CRYPT_CONTENT_INFO.
- '
- ' For X509_ASN_ENCODING: encoded as a PKCS#7 ContentInfo structure.
- ' The CRYPT_DER_BLOB points to the already encoded ANY content.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_OCTET_STRING data structure
- '
- ' pvStructInfo points to a CRYPT_DATA_BLOB.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_BITS data structure
- '
- ' pvStructInfo points to a CRYPT_BIT_BLOB.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_INTEGER data structure
- '
- ' pvStructInfo points to an int.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_MULTI_BYTE_INTEGER data structure
- '
- ' pvStructInfo points to a CRYPT_INTEGER_BLOB.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_ENUMERATED data structure
- '
- ' pvStructInfo points to an int containing the enumerated value
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_CHOICE_OF_TIME data structure
- '
- ' pvStructInfo points to a FILETIME.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_SEQUENCE_OF_ANY data structure
- '
- ' pvStructInfo points to following CRYPT_SEQUENCE_OF_ANY.
- '
- ' The CRYPT_DER_BLOBs point to the already encoded ANY content.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_AUTHORITY_KEY_ID2
- ' szOID_AUTHORITY_KEY_IDENTIFIER2
- '
- ' pvStructInfo points to following CERT_AUTHORITY_KEY_ID2_INFO.
- '
- ' For CRYPT_E_INVALID_IA5_STRING, the error location is returned in
- '
- ' See X509_ALTERNATE_NAME for error location defines.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' szOID_SUBJECT_KEY_IDENTIFIER
- '
- ' pvStructInfo points to a CRYPT_DATA_BLOB.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' X509_CRL_REASON_CODE
- ' szOID_CRL_REASON_CODE
- '
- ' pvStructInfo points to an int which can be set to one of the following
- ' enumerated values:
- '--------------------------------------------------------------------------
- Public Const CRL_REASON_UNSPECIFIED As Long = 0
- Public Const CRL_REASON_KEY_COMPROMISE As Long = 1
- Public Const CRL_REASON_CA_COMPROMISE As Long = 2
- Public Const CRL_REASON_AFFILIATION_CHANGED As Long = 3
- Public Const CRL_REASON_SUPERSEDED As Long = 4
- Public Const CRL_REASON_CESSATION_OF_OPERATION As Long = 5
- Public Const CRL_REASON_CERTIFICATE_HOLD As Long = 6
- Public Const CRL_REASON_REMOVE_FROM_CRL As Long = 8
- '+-------------------------------------------------------------------------
- ' X509_CRL_DIST_POINTS
- ' szOID_CRL_DIST_POINTS
- '
- ' pvStructInfo points to following CRL_DIST_POINTS_INFO.
- '
- ' For CRYPT_E_INVALID_IA5_STRING, the error location is returned in
- '
- ' Error location consists of:
- ' POINT_INDEX - 7 bits << 24
- ' ENTRY_INDEX - 8 bits << 16
- '
- ' See X509_ALTERNATE_NAME for ENTRY_INDEX and VALUE_INDEX error location
- ' defines.
- '--------------------------------------------------------------------------
- Public Const CRL_DIST_POINT_NO_NAME As Long = 0
- Public Const CRL_DIST_POINT_FULL_NAME As Long = 1
- Public Const CRL_DIST_POINT_ISSUER_RDN_NAME As Long = 2
- Public Const CRL_REASON_UNUSED_FLAG As Long = &H80
- Public Const CRL_REASON_KEY_COMPROMISE_FLAG As Long = &H40
- Public Const CRL_REASON_CA_COMPROMISE_FLAG As Long = &H20
- Public Const CRL_REASON_AFFILIATION_CHANGED_FLAG As Long = &H10
- Public Const CRL_REASON_SUPERSEDED_FLAG As Long = &H08
- Public Const CRL_REASON_CESSATION_OF_OPERATION_FLAG As Long = &H04
- Public Const CRL_REASON_CERTIFICATE_HOLD_FLAG As Long = &H02
- Public Const CRL_DIST_POINT_ERR_INDEX_MASK As Long = &H7F
- Public Const CRL_DIST_POINT_ERR_INDEX_SHIFT As Long = 24
- '+-------------------------------------------------------------------------
- ' X509_ENHANCED_KEY_USAGE
- ' szOID_ENHANCED_KEY_USAGE
- '
- ' pvStructInfo points to a CERT_ENHKEY_USAGE, CTL_USAGE.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' szOID_NEXT_UPDATE_LOCATION
- '
- ' pvStructInfo points to a CERT_ALT_NAME_INFO.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' PKCS_CTL
- ' szOID_CTL
- '
- ' pvStructInfo points to a CTL_INFO.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' PKCS7_SIGNER_INFO
- '
- ' pvStructInfo points to CMSG_SIGNER_INFO.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Netscape Certificate Extension Object Identifiers
- '--------------------------------------------------------------------------
- Public Const szOID_NETSCAPE As String = "2.16.840.1.113730"
- Public Const szOID_NETSCAPE_CERT_EXTENSION As String = "2.16.840.1.113730.1"
- Public Const szOID_NETSCAPE_CERT_TYPE As String = "2.16.840.1.113730.1.1"
- Public Const szOID_NETSCAPE_BASE_URL As String = "2.16.840.1.113730.1.2"
- Public Const szOID_NETSCAPE_REVOCATION_URL As String = "2.16.840.1.113730.1.3"
- Public Const szOID_NETSCAPE_CA_REVOCATION_URL As String = "2.16.840.1.113730.1.4"
- Public Const szOID_NETSCAPE_CERT_RENEWAL_URL As String = "2.16.840.1.113730.1.7"
- Public Const szOID_NETSCAPE_CA_POLICY_URL As String = "2.16.840.1.113730.1.8"
- Public Const szOID_NETSCAPE_SSL_SERVER_NAME As String = "2.16.840.1.113730.1.12"
- Public Const szOID_NETSCAPE_COMMENT As String = "2.16.840.1.113730.1.13"
- '+-------------------------------------------------------------------------
- ' Netscape Certificate Data Type Object Identifiers
- '--------------------------------------------------------------------------
- Public Const szOID_NETSCAPE_DATA_TYPE As String = "2.16.840.1.113730.2"
- Public Const szOID_NETSCAPE_CERT_SEQUENCE As String = "2.16.840.1.113730.2.5"
- '+-------------------------------------------------------------------------
- ' szOID_NETSCAPE_CERT_TYPE extension
- '
- ' Its value is a bit string. CryptDecodeObject/CryptEncodeObject using
- ' X509_BITS.
- '
- ' The following bits are defined:
- '--------------------------------------------------------------------------
- Public Const NETSCAPE_SSL_CLIENT_AUTH_CERT_TYPE As Long = &H80
- Public Const NETSCAPE_SSL_SERVER_AUTH_CERT_TYPE As Long = &H40
- Public Const NETSCAPE_SSL_CA_CERT_TYPE As Long = &H04
- '+-------------------------------------------------------------------------
- ' szOID_NETSCAPE_BASE_URL extension
- '
- ' Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
- ' X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
- ' dwValueType = CERT_RDN_IA5_STRING.
- '
- ' When present this string is added to the beginning of all relative URLs
- ' in the certificate. This extension can be considered an optimization
- ' to reduce the size of the URL extensions.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' szOID_NETSCAPE_REVOCATION_URL extension
- '
- ' Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
- ' X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
- ' dwValueType = CERT_RDN_IA5_STRING.
- '
- ' It is a relative or absolute URL that can be used to check the
- ' revocation status of a certificate. The revocation check will be
- ' performed as an HTTP GET method using a url that is the concatenation of
- ' revocation-url and certificate-serial-number.
- ' Where the certificate-serial-number is encoded as a string of
- ' ascii hexadecimal digits. For example, if the netscape-base-url is
- ' https:
- ' cgi-bin/check-rev.cgi?, and the certificate serial number is 173420,
- ' the resulting URL would be:
- ' https:
- '
- ' The server should return a document with a Content-Type of
- ' application/x-netscape-revocation. The document should contain
- ' a single ascii digit, '1' if the certificate is not curently valid,
- ' and '0' if it is curently valid.
- '
- ' Note: for all of the URLs that include the certificate serial number,
- ' the serial number will be encoded as a string which consists of an even
- ' number of hexadecimal digits. If the number of significant digits is odd,
- ' the string will have a single leading zero to ensure an even number of
- ' digits is generated.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' szOID_NETSCAPE_CA_REVOCATION_URL extension
- '
- ' Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
- ' X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
- ' dwValueType = CERT_RDN_IA5_STRING.
- '
- ' It is a relative or absolute URL that can be used to check the
- ' revocation status of any certificates that are signed by the CA that
- ' this certificate belongs to. This extension is only valid in CA
- ' certificates. The use of this extension is the same as the above
- ' szOID_NETSCAPE_REVOCATION_URL extension.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' szOID_NETSCAPE_CERT_RENEWAL_URL extension
- '
- ' Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
- ' X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
- ' dwValueType = CERT_RDN_IA5_STRING.
- '
- ' It is a relative or absolute URL that points to a certificate renewal
- ' form. The renewal form will be accessed with an HTTP GET method using a
- ' url that is the concatenation of renewal-url and
- ' certificate-serial-number. Where the certificate-serial-number is
- ' encoded as a string of ascii hexadecimal digits. For example, if the
- ' netscape-base-url is https:
- ' netscape-cert-renewal-url is cgi-bin/check-renew.cgi?, and the
- ' certificate serial number is 173420, the resulting URL would be:
- ' https:
- ' The document returned should be an HTML form that will allow the user
- ' to request a renewal of their certificate.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' szOID_NETSCAPE_CA_POLICY_URL extension
- '
- ' Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
- ' X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
- ' dwValueType = CERT_RDN_IA5_STRING.
- '
- ' It is a relative or absolute URL that points to a web page that
- ' describes the policies under which the certificate was issued.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' szOID_NETSCAPE_SSL_SERVER_NAME extension
- '
- ' Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
- ' X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
- ' dwValueType = CERT_RDN_IA5_STRING.
- '
- ' It is a "shell expression" that can be used to match the hostname of the
- ' SSL server that is using this certificate. It is recommended that if
- ' the server's hostname does not match this pattern the user be notified
- ' and given the option to terminate the SSL connection. If this extension
- ' is not present then the CommonName in the certificate subject's
- ' distinguished name is used for the same purpose.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' szOID_NETSCAPE_COMMENT extension
- '
- ' Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
- ' X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
- ' dwValueType = CERT_RDN_IA5_STRING.
- '
- ' It is a comment that may be displayed to the user when the certificate
- ' is viewed.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' szOID_NETSCAPE_CERT_SEQUENCE
- '
- ' Its value is a PKCS#7 ContentInfo structure wrapping a sequence of
- ' certificates. The value of the contentType field is
- ' szOID_NETSCAPE_CERT_SEQUENCE, while the content field is the following
- ' structure:
- ' CertificateSequence ::= SEQUENCE OF Certificate.
- '
- ' CryptDecodeObject/CryptEncodeObject using
- ' PKCS_CONTENT_INFO_SEQUENCE_OF_ANY, where,
- ' pszObjId = szOID_NETSCAPE_CERT_SEQUENCE and the CRYPT_DER_BLOBs point
- ' to encoded X509 certificates.
- '--------------------------------------------------------------------------
- '+=========================================================================
- '==========================================================================
- ' Predefined OID Function Names
- Public Const CRYPT_OID_ENCODE_OBJECT_FUNC As String = "CryptDllEncodeObject"
- Public Const CRYPT_OID_DECODE_OBJECT_FUNC As String = "CryptDllDecodeObject"
- Public Const CRYPT_OID_CREATE_COM_OBJECT_FUNC As String = "CryptDllCreateCOMObject"
- Public Const CRYPT_OID_VERIFY_REVOCATION_FUNC As String = "CertDllVerifyRevocation"
- Public Const CRYPT_OID_VERIFY_CTL_USAGE_FUNC As String = "CertDllVerifyCTLUsage"
- Public Const CRYPT_OID_FORMAT_OBJECT_FUNC As String = "CryptDllFormatObject"
- ' CryptDllEncodeObject has same function signature as CryptEncodeObject.
- ' CryptDllDecodeObject has same function signature as CryptDecodeObject.
- ' CryptDllCreateCOMObject has the following signature:
- ' IN DWORD dwEncodingType,
- ' IN LPCSTR pszOID,
- ' IN PCRYPT_DATA_BLOB pEncodedContent,
- ' IN DWORD dwFlags,
- ' IN REFIID riid,
- ' OUT void **ppvObj);
- ' CertDllVerifyRevocation has the same signature as CertVerifyRevocation
- ' CertDllVerifyCTLUsage has the same signature as CertVerifyCTLUsage
- ' Example of a complete OID Function Registry Name:
- ' HKEY_LOCAL_MACHINESoftwareMicrosoftCryptographyOID
- ' Encoding Type 1CryptDllEncodeObject1.2.3
- '
- ' The key's "Dll" value contains the name of the Dll.
- ' The key's "FuncName" value overrides the default function name
- Public Const CRYPT_OID_REGPATH As String = "Software\Microsoft\Cryptography\OID"
- Public Const CRYPT_OID_REG_ENCODING_TYPE_PREFIX As String = "EncodingType "
- Public Const CRYPT_OID_REG_DLL_VALUE_NAME As String = "Dll"
- Public Const CRYPT_OID_REG_FUNC_NAME_VALUE_NAME As String = "FuncName"
- Public Const CRYPT_OID_REG_FUNC_NAME_VALUE_NAME_A As String = "FuncName"
- ' OID used for Default OID functions
- Public Const CRYPT_DEFAULT_OID As String = "DEFAULT"
- Public Const CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG As Long = 1
- '+-------------------------------------------------------------------------
- ' Install a set of callable OID function addresses.
- '
- ' By default the functions are installed at end of the list.
- ' Set CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG to install at beginning of list.
- '
- ' hModule should be updated with the hModule passed to DllMain to prevent
- ' the Dll containing the function addresses from being unloaded by
- ' CryptGetOIDFuncAddress/CryptFreeOIDFunctionAddress. This would be the
- ' case when the Dll has also regsvr32'ed OID functions via
- ' CryptRegisterOIDFunction.
- '
- ' DEFAULT functions are installed by setting rgFuncEntry[].pszOID =
- ' CRYPT_DEFAULT_OID.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Initialize and return handle to the OID function set identified by its
- ' function name.
- '
- ' If the set already exists, a handle to the existing set is returned.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Search the list of installed functions for an encoding type and OID match.
- ' If not found, search the registry.
- '
- ' For success, returns TRUE with *ppvFuncAddr updated with the function's
- ' address and *phFuncAddr updated with the function address's handle.
- ' The function's handle is AddRef'ed. CryptFreeOIDFunctionAddress needs to
- ' be called to release it.
- '
- ' For a registry match, the Dll containing the function is loaded.
- '--------------------------------------------------------------------------
- '+-------------------------------------------------------------------------
- ' Get the list of registered default Dll entries for the specified
- ' function set and encoding type.
- '
- ' The returned list consists of none, one or more null terminated Dll file
- ' For example: "first.dll" L"