1 // Copyright © 2015, Peter Atashian 2 // Licensed under the MIT License <LICENSE.md> 3 //! Cryptographic API Prototypes and Definitions 4 //108 5 pub const ALG_CLASS_ANY: ALG_ID = 0; 6 pub const ALG_CLASS_SIGNATURE: ALG_ID = 1 << 13; 7 pub const ALG_CLASS_MSG_ENCRYPT: ALG_ID = 2 << 13; 8 pub const ALG_CLASS_DATA_ENCRYPT: ALG_ID = 3 << 13; 9 pub const ALG_CLASS_HASH: ALG_ID = 4 << 13; 10 pub const ALG_CLASS_KEY_EXCHANGE: ALG_ID = 5 << 13; 11 pub const ALG_CLASS_ALL: ALG_ID = 7 << 13; 12 pub const ALG_TYPE_ANY: ALG_ID = 0; 13 pub const ALG_TYPE_DSS: ALG_ID = 1 << 9; 14 pub const ALG_TYPE_RSA: ALG_ID = 2 << 9; 15 pub const ALG_TYPE_BLOCK: ALG_ID = 3 << 9; 16 pub const ALG_TYPE_STREAM: ALG_ID = 4 << 9; 17 pub const ALG_TYPE_DH: ALG_ID = 5 << 9; 18 pub const ALG_TYPE_SECURECHANNEL: ALG_ID = 6 << 9; 19 pub const ALG_SID_ANY: ALG_ID = 0; 20 pub const ALG_SID_RSA_ANY: ALG_ID = 0; 21 pub const ALG_SID_RSA_PKCS: ALG_ID = 1; 22 pub const ALG_SID_RSA_MSATWORK: ALG_ID = 2; 23 pub const ALG_SID_RSA_ENTRUST: ALG_ID = 3; 24 pub const ALG_SID_RSA_PGP: ALG_ID = 4; 25 pub const ALG_SID_DSS_ANY: ALG_ID = 0; 26 pub const ALG_SID_DSS_PKCS: ALG_ID = 1; 27 pub const ALG_SID_DSS_DMS: ALG_ID = 2; 28 pub const ALG_SID_ECDSA: ALG_ID = 3; 29 pub const ALG_SID_DES: ALG_ID = 1; 30 pub const ALG_SID_3DES: ALG_ID = 3; 31 pub const ALG_SID_DESX: ALG_ID = 4; 32 pub const ALG_SID_IDEA: ALG_ID = 5; 33 pub const ALG_SID_CAST: ALG_ID = 6; 34 pub const ALG_SID_SAFERSK64: ALG_ID = 7; 35 pub const ALG_SID_SAFERSK128: ALG_ID = 8; 36 pub const ALG_SID_3DES_112: ALG_ID = 9; 37 pub const ALG_SID_CYLINK_MEK: ALG_ID = 12; 38 pub const ALG_SID_RC5: ALG_ID = 13; 39 pub const ALG_SID_AES_128: ALG_ID = 14; 40 pub const ALG_SID_AES_192: ALG_ID = 15; 41 pub const ALG_SID_AES_256: ALG_ID = 16; 42 pub const ALG_SID_AES: ALG_ID = 17; 43 pub const ALG_SID_SKIPJACK: ALG_ID = 10; 44 pub const ALG_SID_TEK: ALG_ID = 11; 45 pub const CRYPT_MODE_CBCI: ALG_ID = 6; 46 pub const CRYPT_MODE_CFBP: ALG_ID = 7; 47 pub const CRYPT_MODE_OFBP: ALG_ID = 8; 48 pub const CRYPT_MODE_CBCOFM: ALG_ID = 9; 49 pub const CRYPT_MODE_CBCOFMI: ALG_ID = 10; 50 pub const ALG_SID_RC2: ALG_ID = 2; 51 pub const ALG_SID_RC4: ALG_ID = 1; 52 pub const ALG_SID_SEAL: ALG_ID = 2; 53 pub const ALG_SID_DH_SANDF: ALG_ID = 1; 54 pub const ALG_SID_DH_EPHEM: ALG_ID = 2; 55 pub const ALG_SID_AGREED_KEY_ANY: ALG_ID = 3; 56 pub const ALG_SID_KEA: ALG_ID = 4; 57 pub const ALG_SID_ECDH: ALG_ID = 5; 58 pub const ALG_SID_MD2: ALG_ID = 1; 59 pub const ALG_SID_MD4: ALG_ID = 2; 60 pub const ALG_SID_MD5: ALG_ID = 3; 61 pub const ALG_SID_SHA: ALG_ID = 4; 62 pub const ALG_SID_SHA1: ALG_ID = 4; 63 pub const ALG_SID_MAC: ALG_ID = 5; 64 pub const ALG_SID_RIPEMD: ALG_ID = 6; 65 pub const ALG_SID_RIPEMD160: ALG_ID = 7; 66 pub const ALG_SID_SSL3SHAMD5: ALG_ID = 8; 67 pub const ALG_SID_HMAC: ALG_ID = 9; 68 pub const ALG_SID_TLS1PRF: ALG_ID = 10; 69 pub const ALG_SID_HASH_REPLACE_OWF: ALG_ID = 11; 70 pub const ALG_SID_SHA_256: ALG_ID = 12; 71 pub const ALG_SID_SHA_384: ALG_ID = 13; 72 pub const ALG_SID_SHA_512: ALG_ID = 14; 73 pub const ALG_SID_SSL3_MASTER: ALG_ID = 1; 74 pub const ALG_SID_SCHANNEL_MASTER_HASH: ALG_ID = 2; 75 pub const ALG_SID_SCHANNEL_MAC_KEY: ALG_ID = 3; 76 pub const ALG_SID_PCT1_MASTER: ALG_ID = 4; 77 pub const ALG_SID_SSL2_MASTER: ALG_ID = 5; 78 pub const ALG_SID_TLS1_MASTER: ALG_ID = 6; 79 pub const ALG_SID_SCHANNEL_ENC_KEY: ALG_ID = 7; 80 pub const ALG_SID_ECMQV: ALG_ID = 1; 81 pub const ALG_SID_EXAMPLE: ALG_ID = 80; 82 pub type ALG_ID = ::c_uint; 83 pub const CALG_MD2: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD2; 84 pub const CALG_MD4: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD4; 85 pub const CALG_MD5: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD5; 86 pub const CALG_SHA: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA; 87 pub const CALG_SHA1: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA1; 88 pub const CALG_MAC: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MAC; 89 pub const CALG_RSA_SIGN: ALG_ID = ALG_CLASS_SIGNATURE | ALG_TYPE_RSA | ALG_SID_RSA_ANY; 90 pub const CALG_DSS_SIGN: ALG_ID = ALG_CLASS_SIGNATURE | ALG_TYPE_DSS | ALG_SID_DSS_ANY; 91 pub const CALG_NO_SIGN: ALG_ID = ALG_CLASS_SIGNATURE | ALG_TYPE_ANY | ALG_SID_ANY; 92 pub const CALG_RSA_KEYX: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_RSA | ALG_SID_RSA_ANY; 93 pub const CALG_DES: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_DES; 94 pub const CALG_3DES_112: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_3DES_112; 95 pub const CALG_3DES: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_3DES; 96 pub const CALG_DESX: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_DESX; 97 pub const CALG_RC2: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_RC2; 98 pub const CALG_RC4: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_STREAM | ALG_SID_RC4; 99 pub const CALG_SEAL: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_STREAM | ALG_SID_SEAL; 100 pub const CALG_DH_SF: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_DH_SANDF; 101 pub const CALG_DH_EPHEM: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_DH_EPHEM; 102 pub const CALG_AGREEDKEY_ANY: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH 103 | ALG_SID_AGREED_KEY_ANY; 104 pub const CALG_KEA_KEYX: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_KEA; 105 pub const CALG_HUGHES_MD5: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_ANY | ALG_SID_MD5; 106 pub const CALG_SKIPJACK: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_SKIPJACK; 107 pub const CALG_TEK: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_TEK; 108 pub const CALG_CYLINK_MEK: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_CYLINK_MEK; 109 pub const CALG_SSL3_SHAMD5: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SSL3SHAMD5; 110 pub const CALG_SSL3_MASTER: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL 111 | ALG_SID_SSL3_MASTER; 112 pub const CALG_SCHANNEL_MASTER_HASH: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL 113 | ALG_SID_SCHANNEL_MASTER_HASH; 114 pub const CALG_SCHANNEL_MAC_KEY: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL 115 | ALG_SID_SCHANNEL_MAC_KEY; 116 pub const CALG_SCHANNEL_ENC_KEY: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL 117 | ALG_SID_SCHANNEL_ENC_KEY; 118 pub const CALG_PCT1_MASTER: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL 119 | ALG_SID_PCT1_MASTER; 120 pub const CALG_SSL2_MASTER: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL 121 | ALG_SID_SSL2_MASTER; 122 pub const CALG_TLS1_MASTER: ALG_ID = ALG_CLASS_MSG_ENCRYPT | ALG_TYPE_SECURECHANNEL 123 | ALG_SID_TLS1_MASTER; 124 pub const CALG_RC5: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_RC5; 125 pub const CALG_HMAC: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_HMAC; 126 pub const CALG_TLS1PRF: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_TLS1PRF; 127 pub const CALG_HASH_REPLACE_OWF: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_HASH_REPLACE_OWF; 128 pub const CALG_AES_128: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES_128; 129 pub const CALG_AES_192: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES_192; 130 pub const CALG_AES_256: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES_256; 131 pub const CALG_AES: ALG_ID = ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_AES; 132 pub const CALG_SHA_256: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_256; 133 pub const CALG_SHA_384: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_384; 134 pub const CALG_SHA_512: ALG_ID = ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA_512; 135 pub const CALG_ECDH: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_DH | ALG_SID_ECDH; 136 pub const CALG_ECMQV: ALG_ID = ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_ANY | ALG_SID_ECMQV; 137 pub const CALG_ECDSA: ALG_ID = ALG_CLASS_SIGNATURE | ALG_TYPE_DSS | ALG_SID_ECDSA; 138 pub type HCRYPTPROV = ::ULONG_PTR; 139 pub type HCRYPTKEY = ::ULONG_PTR; 140 pub type HCRYPTHASH = ::ULONG_PTR; 141 pub const CRYPT_VERIFYCONTEXT: ::DWORD = 0xF0000000; 142 pub const CRYPT_NEWKEYSET: ::DWORD = 0x00000008; 143 pub const CRYPT_DELETEKEYSET: ::DWORD = 0x00000010; 144 pub const CRYPT_MACHINE_KEYSET: ::DWORD = 0x00000020; 145 pub const CRYPT_SILENT: ::DWORD = 0x00000040; 146 pub const CRYPT_DEFAULT_CONTAINER_OPTIONAL: ::DWORD = 0x00000080; 147 pub const CRYPT_EXPORTABLE: ::DWORD = 0x00000001; 148 pub const CRYPT_USER_PROTECTED: ::DWORD = 0x00000002; 149 pub const CRYPT_CREATE_SALT: ::DWORD = 0x00000004; 150 pub const CRYPT_UPDATE_KEY: ::DWORD = 0x00000008; 151 pub const CRYPT_NO_SALT: ::DWORD = 0x00000010; 152 pub const CRYPT_PREGEN: ::DWORD = 0x00000040; 153 pub const CRYPT_RECIPIENT: ::DWORD = 0x00000010; 154 pub const CRYPT_INITIATOR: ::DWORD = 0x00000040; 155 pub const CRYPT_ONLINE: ::DWORD = 0x00000080; 156 pub const CRYPT_SF: ::DWORD = 0x00000100; 157 pub const CRYPT_CREATE_IV: ::DWORD = 0x00000200; 158 pub const CRYPT_KEK: ::DWORD = 0x00000400; 159 pub const CRYPT_DATA_KEY: ::DWORD = 0x00000800; 160 pub const CRYPT_VOLATILE: ::DWORD = 0x00001000; 161 pub const CRYPT_SGCKEY: ::DWORD = 0x00002000; 162 pub const CRYPT_USER_PROTECTED_STRONG: ::DWORD = 0x00100000; 163 pub const CRYPT_ARCHIVABLE: ::DWORD = 0x00004000; 164 pub const CRYPT_FORCE_KEY_PROTECTION_HIGH: ::DWORD = 0x00008000; 165 pub const RSA1024BIT_KEY: ::DWORD = 0x04000000; 166 pub const CRYPT_SERVER: ::DWORD = 0x00000400; 167 pub const KEY_LENGTH_MASK: ::DWORD = 0xFFFF0000; 168 pub const CRYPT_Y_ONLY: ::DWORD = 0x00000001; 169 pub const CRYPT_SSL2_FALLBACK: ::DWORD = 0x00000002; 170 pub const CRYPT_DESTROYKEY: ::DWORD = 0x00000004; 171 pub const CRYPT_OAEP: ::DWORD = 0x00000040; 172 pub const CRYPT_BLOB_VER3: ::DWORD = 0x00000080; 173 pub const CRYPT_IPSEC_HMAC_KEY: ::DWORD = 0x00000100; 174 pub const CRYPT_DECRYPT_RSA_NO_PADDING_CHECK: ::DWORD = 0x00000020; 175 pub const CRYPT_SECRETDIGEST: ::DWORD = 0x00000001; 176 pub const CRYPT_OWF_REPL_LM_HASH: ::DWORD = 0x00000001; 177 pub const CRYPT_LITTLE_ENDIAN: ::DWORD = 0x00000001; 178 pub const CRYPT_NOHASHOID: ::DWORD = 0x00000001; 179 pub const CRYPT_TYPE2_FORMAT: ::DWORD = 0x00000002; 180 pub const CRYPT_X931_FORMAT: ::DWORD = 0x00000004; 181 pub const CRYPT_MACHINE_DEFAULT: ::DWORD = 0x00000001; 182 pub const CRYPT_USER_DEFAULT: ::DWORD = 0x00000002; 183 pub const CRYPT_DELETE_DEFAULT: ::DWORD = 0x00000004; 184 pub const SIMPLEBLOB: ::DWORD = 0x1; 185 pub const PUBLICKEYBLOB: ::DWORD = 0x6; 186 pub const PRIVATEKEYBLOB: ::DWORD = 0x7; 187 pub const PLAINTEXTKEYBLOB: ::DWORD = 0x8; 188 pub const OPAQUEKEYBLOB: ::DWORD = 0x9; 189 pub const PUBLICKEYBLOBEX: ::DWORD = 0xA; 190 pub const SYMMETRICWRAPKEYBLOB: ::DWORD = 0xB; 191 pub const KEYSTATEBLOB: ::DWORD = 0xC; 192 pub const AT_KEYEXCHANGE: ::DWORD = 1; 193 pub const AT_SIGNATURE: ::DWORD = 2; 194 pub const CRYPT_USERDATA: ::DWORD = 1; 195 pub const KP_IV: ::DWORD = 1; 196 pub const KP_SALT: ::DWORD = 2; 197 pub const KP_PADDING: ::DWORD = 3; 198 pub const KP_MODE: ::DWORD = 4; 199 pub const KP_MODE_BITS: ::DWORD = 5; 200 pub const KP_PERMISSIONS: ::DWORD = 6; 201 pub const KP_ALGID: ::DWORD = 7; 202 pub const KP_BLOCKLEN: ::DWORD = 8; 203 pub const KP_KEYLEN: ::DWORD = 9; 204 pub const KP_SALT_EX: ::DWORD = 10; 205 pub const KP_P: ::DWORD = 11; 206 pub const KP_G: ::DWORD = 12; 207 pub const KP_Q: ::DWORD = 13; 208 pub const KP_X: ::DWORD = 14; 209 pub const KP_Y: ::DWORD = 15; 210 pub const KP_RA: ::DWORD = 16; 211 pub const KP_RB: ::DWORD = 17; 212 pub const KP_INFO: ::DWORD = 18; 213 pub const KP_EFFECTIVE_KEYLEN: ::DWORD = 19; 214 pub const KP_SCHANNEL_ALG: ::DWORD = 20; 215 pub const KP_CLIENT_RANDOM: ::DWORD = 21; 216 pub const KP_SERVER_RANDOM: ::DWORD = 22; 217 pub const KP_RP: ::DWORD = 23; 218 pub const KP_PRECOMP_MD5: ::DWORD = 24; 219 pub const KP_PRECOMP_SHA: ::DWORD = 25; 220 pub const KP_CERTIFICATE: ::DWORD = 26; 221 pub const KP_CLEAR_KEY: ::DWORD = 27; 222 pub const KP_PUB_EX_LEN: ::DWORD = 28; 223 pub const KP_PUB_EX_VAL: ::DWORD = 29; 224 pub const KP_KEYVAL: ::DWORD = 30; 225 pub const KP_ADMIN_PIN: ::DWORD = 31; 226 pub const KP_KEYEXCHANGE_PIN: ::DWORD = 32; 227 pub const KP_SIGNATURE_PIN: ::DWORD = 33; 228 pub const KP_PREHASH: ::DWORD = 34; 229 pub const KP_ROUNDS: ::DWORD = 35; 230 pub const KP_OAEP_PARAMS: ::DWORD = 36; 231 pub const KP_CMS_KEY_INFO: ::DWORD = 37; 232 pub const KP_CMS_DH_KEY_INFO: ::DWORD = 38; 233 pub const KP_PUB_PARAMS: ::DWORD = 39; 234 pub const KP_VERIFY_PARAMS: ::DWORD = 40; 235 pub const KP_HIGHEST_VERSION: ::DWORD = 41; 236 pub const KP_GET_USE_COUNT: ::DWORD = 42; 237 pub const KP_PIN_ID: ::DWORD = 43; 238 pub const KP_PIN_INFO: ::DWORD = 44; 239 pub const PKCS5_PADDING: ::DWORD = 1; 240 pub const RANDOM_PADDING: ::DWORD = 2; 241 pub const ZERO_PADDING: ::DWORD = 3; 242 pub const CRYPT_MODE_CBC: ::DWORD = 1; 243 pub const CRYPT_MODE_ECB: ::DWORD = 2; 244 pub const CRYPT_MODE_OFB: ::DWORD = 3; 245 pub const CRYPT_MODE_CFB: ::DWORD = 4; 246 pub const CRYPT_MODE_CTS: ::DWORD = 5; 247 pub const CRYPT_ENCRYPT: ::DWORD = 0x0001; 248 pub const CRYPT_DECRYPT: ::DWORD = 0x0002; 249 pub const CRYPT_EXPORT: ::DWORD = 0x0004; 250 pub const CRYPT_READ: ::DWORD = 0x0008; 251 pub const CRYPT_WRITE: ::DWORD = 0x0010; 252 pub const CRYPT_MAC: ::DWORD = 0x0020; 253 pub const CRYPT_EXPORT_KEY: ::DWORD = 0x0040; 254 pub const CRYPT_IMPORT_KEY: ::DWORD = 0x0080; 255 pub const CRYPT_ARCHIVE: ::DWORD = 0x0100; 256 pub const HP_ALGID: ::DWORD = 0x0001; 257 pub const HP_HASHVAL: ::DWORD = 0x0002; 258 pub const HP_HASHSIZE: ::DWORD = 0x0004; 259 pub const HP_HMAC_INFO: ::DWORD = 0x0005; 260 pub const HP_TLS1PRF_LABEL: ::DWORD = 0x0006; 261 pub const HP_TLS1PRF_SEED: ::DWORD = 0x0007; 262 pub const CRYPT_FAILED: ::BOOL = ::FALSE; 263 pub const CRYPT_SUCCEED: ::BOOL = ::TRUE; 264 pub const PP_ENUMALGS: ::DWORD = 1; 265 pub const PP_ENUMCONTAINERS: ::DWORD = 2; 266 pub const PP_IMPTYPE: ::DWORD = 3; 267 pub const PP_NAME: ::DWORD = 4; 268 pub const PP_VERSION: ::DWORD = 5; 269 pub const PP_CONTAINER: ::DWORD = 6; 270 pub const PP_CHANGE_PASSWORD: ::DWORD = 7; 271 pub const PP_KEYSET_SEC_DESCR: ::DWORD = 8; 272 pub const PP_CERTCHAIN: ::DWORD = 9; 273 pub const PP_KEY_TYPE_SUBTYPE: ::DWORD = 10; 274 pub const PP_PROVTYPE: ::DWORD = 16; 275 pub const PP_KEYSTORAGE: ::DWORD = 17; 276 pub const PP_APPLI_CERT: ::DWORD = 18; 277 pub const PP_SYM_KEYSIZE: ::DWORD = 19; 278 pub const PP_SESSION_KEYSIZE: ::DWORD = 20; 279 pub const PP_UI_PROMPT: ::DWORD = 21; 280 pub const PP_ENUMALGS_EX: ::DWORD = 22; 281 pub const PP_ENUMMANDROOTS: ::DWORD = 25; 282 pub const PP_ENUMELECTROOTS: ::DWORD = 26; 283 pub const PP_KEYSET_TYPE: ::DWORD = 27; 284 pub const PP_ADMIN_PIN: ::DWORD = 31; 285 pub const PP_KEYEXCHANGE_PIN: ::DWORD = 32; 286 pub const PP_SIGNATURE_PIN: ::DWORD = 33; 287 pub const PP_SIG_KEYSIZE_INC: ::DWORD = 34; 288 pub const PP_KEYX_KEYSIZE_INC: ::DWORD = 35; 289 pub const PP_UNIQUE_CONTAINER: ::DWORD = 36; 290 pub const PP_SGC_INFO: ::DWORD = 37; 291 pub const PP_USE_HARDWARE_RNG: ::DWORD = 38; 292 pub const PP_KEYSPEC: ::DWORD = 39; 293 pub const PP_ENUMEX_SIGNING_PROT: ::DWORD = 40; 294 pub const PP_CRYPT_COUNT_KEY_USE: ::DWORD = 41; 295 pub const PP_USER_CERTSTORE: ::DWORD = 42; 296 pub const PP_SMARTCARD_READER: ::DWORD = 43; 297 pub const PP_SMARTCARD_GUID: ::DWORD = 45; 298 pub const PP_ROOT_CERTSTORE: ::DWORD = 46; 299 pub const PP_SMARTCARD_READER_ICON: ::DWORD = 47; 300 pub const CRYPT_FIRST: ::DWORD = 1; 301 pub const CRYPT_NEXT: ::DWORD = 2; 302 pub const CRYPT_SGC_ENUM: ::DWORD = 4; 303 pub const CRYPT_IMPL_HARDWARE: ::DWORD = 1; 304 pub const CRYPT_IMPL_SOFTWARE: ::DWORD = 2; 305 pub const CRYPT_IMPL_MIXED: ::DWORD = 3; 306 pub const CRYPT_IMPL_UNKNOWN: ::DWORD = 4; 307 pub const CRYPT_IMPL_REMOVABLE: ::DWORD = 8; 308 pub const CRYPT_SEC_DESCR: ::DWORD = 0x00000001; 309 pub const CRYPT_PSTORE: ::DWORD = 0x00000002; 310 pub const CRYPT_UI_PROMPT: ::DWORD = 0x00000004; 311 pub const CRYPT_FLAG_PCT1: ::DWORD = 0x0001; 312 pub const CRYPT_FLAG_SSL2: ::DWORD = 0x0002; 313 pub const CRYPT_FLAG_SSL3: ::DWORD = 0x0004; 314 pub const CRYPT_FLAG_TLS1: ::DWORD = 0x0008; 315 pub const CRYPT_FLAG_IPSEC: ::DWORD = 0x0010; 316 pub const CRYPT_FLAG_SIGNING: ::DWORD = 0x0020; 317 pub const CRYPT_SGC: ::DWORD = 0x0001; 318 pub const CRYPT_FASTSGC: ::DWORD = 0x0002; 319 pub const PP_CLIENT_HWND: ::DWORD = 1; 320 pub const PP_CONTEXT_INFO: ::DWORD = 11; 321 pub const PP_KEYEXCHANGE_KEYSIZE: ::DWORD = 12; 322 pub const PP_SIGNATURE_KEYSIZE: ::DWORD = 13; 323 pub const PP_KEYEXCHANGE_ALG: ::DWORD = 14; 324 pub const PP_SIGNATURE_ALG: ::DWORD = 15; 325 pub const PP_DELETEKEY: ::DWORD = 24; 326 pub const PP_PIN_PROMPT_STRING: ::DWORD = 44; 327 pub const PP_SECURE_KEYEXCHANGE_PIN: ::DWORD = 47; 328 pub const PP_SECURE_SIGNATURE_PIN: ::DWORD = 48; 329 pub const PROV_RSA_FULL: ::DWORD = 1; 330 pub const PROV_RSA_SIG: ::DWORD = 2; 331 pub const PROV_DSS: ::DWORD = 3; 332 pub const PROV_FORTEZZA: ::DWORD = 4; 333 pub const PROV_MS_EXCHANGE: ::DWORD = 5; 334 pub const PROV_SSL: ::DWORD = 6; 335 pub const PROV_RSA_SCHANNEL: ::DWORD = 12; 336 pub const PROV_DSS_DH: ::DWORD = 13; 337 pub const PROV_EC_ECDSA_SIG: ::DWORD = 14; 338 pub const PROV_EC_ECNRA_SIG: ::DWORD = 15; 339 pub const PROV_EC_ECDSA_FULL: ::DWORD = 16; 340 pub const PROV_EC_ECNRA_FULL: ::DWORD = 17; 341 pub const PROV_DH_SCHANNEL: ::DWORD = 18; 342 pub const PROV_SPYRUS_LYNKS: ::DWORD = 20; 343 pub const PROV_RNG: ::DWORD = 21; 344 pub const PROV_INTEL_SEC: ::DWORD = 22; 345 pub const PROV_REPLACE_OWF: ::DWORD = 23; 346 pub const PROV_RSA_AES: ::DWORD = 24; 347 pub const MS_DEF_PROV: &'static str = "Microsoft Base Cryptographic Provider v1.0"; 348 pub const MS_ENHANCED_PROV: &'static str = "Microsoft Enhanced Cryptographic Provider v1.0"; 349 pub const MS_STRONG_PROV: &'static str = "Microsoft Strong Cryptographic Provider"; 350 pub const MS_DEF_RSA_SIG_PROV: &'static str = "Microsoft RSA Signature Cryptographic Provider"; 351 pub const MS_DEF_RSA_SCHANNEL_PROV: &'static str = "Microsoft RSA SChannel Cryptographic Provider"; 352 pub const MS_DEF_DSS_PROV: &'static str = "Microsoft Base DSS Cryptographic Provider"; 353 pub const MS_DEF_DSS_DH_PROV: &'static str = 354 "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider"; 355 pub const MS_ENH_DSS_DH_PROV: &'static str = 356 "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider"; 357 pub const MS_DEF_DH_SCHANNEL_PROV: &'static str = "Microsoft DH SChannel Cryptographic Provider"; 358 pub const MS_SCARD_PROV: &'static str = "Microsoft Base Smart Card Crypto Provider"; 359 pub const MS_ENH_RSA_AES_PROV: &'static str = 360 "Microsoft Enhanced RSA and AES Cryptographic Provider"; 361 pub const MS_ENH_RSA_AES_PROV_XP: &'static str = 362 "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)"; 363 pub const MAXUIDLEN: usize = 64; 364 pub const EXPO_OFFLOAD_REG_VALUE: &'static str = "ExpoOffload"; 365 pub const EXPO_OFFLOAD_FUNC_NAME: &'static str = "OffloadModExpo"; 366 pub const szKEY_CRYPTOAPI_PRIVATE_KEY_OPTIONS: &'static str = 367 "Software\\Policies\\Microsoft\\Cryptography"; 368 pub const szKEY_CACHE_ENABLED: &'static str = "CachePrivateKeys"; 369 pub const szKEY_CACHE_SECONDS: &'static str = "PrivateKeyLifetimeSeconds"; 370 pub const szPRIV_KEY_CACHE_MAX_ITEMS: &'static str = "PrivKeyCacheMaxItems"; 371 pub const cPRIV_KEY_CACHE_MAX_ITEMS_DEFAULT: ::DWORD = 20; 372 pub const szPRIV_KEY_CACHE_PURGE_INTERVAL_SECONDS: &'static str = 373 "PrivKeyCachePurgeIntervalSeconds"; 374 pub const cPRIV_KEY_CACHE_PURGE_INTERVAL_SECONDS_DEFAULT: ::DWORD = 86400; 375 pub const CUR_BLOB_VERSION: ::DWORD = 2; 376 STRUCT!{struct CMS_KEY_INFO { 377 dwVersion: ::DWORD, 378 Algid: ALG_ID, 379 pbOID: *mut ::BYTE, 380 cbOID: ::DWORD, 381 }} 382 pub type PCMS_KEY_INFO = *mut CMS_KEY_INFO; 383 STRUCT!{struct HMAC_INFO { 384 HashAlgid: ALG_ID, 385 pbInnerString: *mut ::BYTE, 386 cbInnerString: ::DWORD, 387 pbOuterString: *mut ::BYTE, 388 cbOuterString: ::DWORD, 389 }} 390 pub type PHMAC_INFO = *mut HMAC_INFO; 391 STRUCT!{struct SCHANNEL_ALG { 392 dwUse: ::DWORD, 393 Algid: ALG_ID, 394 cBits: ::DWORD, 395 dwFlags: ::DWORD, 396 dwReserved: ::DWORD, 397 }} 398 pub type PSCHANNEL_ALG = *mut SCHANNEL_ALG; 399 pub const SCHANNEL_MAC_KEY: ::DWORD = 0x00000000; 400 pub const SCHANNEL_ENC_KEY: ::DWORD = 0x00000001; 401 pub const INTERNATIONAL_USAGE: ::DWORD = 0x00000001; 402 STRUCT!{struct PROV_ENUMALGS { 403 aiAlgid: ALG_ID, 404 dwBitLen: ::DWORD, 405 dwNameLen: ::DWORD, 406 szName: [::CHAR; 20], 407 }} 408 STRUCT!{nodebug struct PROV_ENUMALGS_EX { 409 aiAlgid: ALG_ID, 410 dwDefaultLen: ::DWORD, 411 dwMinLen: ::DWORD, 412 dwMaxLen: ::DWORD, 413 dwProtocols: ::DWORD, 414 dwNameLen: ::DWORD, 415 szName: [::CHAR; 20], 416 dwLongNameLen: ::DWORD, 417 szLongName: [::CHAR; 40], 418 }} 419 STRUCT!{struct BLOBHEADER { 420 bType: ::BYTE, 421 bVersion: ::BYTE, 422 reserved: ::WORD, 423 aiKeyAlg: ::ALG_ID, 424 }} 425 pub type PUBLICKEYSTRUC = BLOBHEADER; 426 STRUCT!{struct RSAPUBKEY { 427 magic: ::DWORD, 428 bitlen: ::DWORD, 429 pubexp: ::DWORD, 430 }} 431 STRUCT!{struct DHPUBKEY { 432 magic: ::DWORD, 433 bitlen: ::DWORD, 434 }} 435 pub type DSSPUBKEY = DHPUBKEY; 436 pub type KEAPUBKEY = DHPUBKEY; 437 pub type TEKPUBKEY = DHPUBKEY; 438 STRUCT!{struct DSSSEED { 439 counter: ::DWORD, 440 seed: [::BYTE; 20], 441 }} 442 STRUCT!{struct DHPUBKEY_VER3 { 443 magic: ::DWORD, 444 bitlenP: ::DWORD, 445 bitlenQ: ::DWORD, 446 bitlenJ: ::DWORD, 447 DSSSeed: DSSSEED, 448 }} 449 pub type DSSPUBKEY_VER3 = DHPUBKEY_VER3; 450 STRUCT!{struct DHPRIVKEY_VER3 { 451 magic: ::DWORD, 452 bitlenP: ::DWORD, 453 bitlenQ: ::DWORD, 454 bitlenJ: ::DWORD, 455 bitlenX: ::DWORD, 456 DSSSeed: DSSSEED, 457 }} 458 pub type DSSPRIVKEY_VER3 = DHPRIVKEY_VER3; 459 STRUCT!{struct KEY_TYPE_SUBTYPE { 460 dwKeySpec: ::DWORD, 461 Type: ::GUID, 462 Subtype: ::GUID, 463 }} 464 pub type PKEY_TYPE_SUBTYPE = *mut KEY_TYPE_SUBTYPE; 465 STRUCT!{nodebug struct CERT_FORTEZZA_DATA_PROP { 466 SerialNumber: [::c_uchar; 8], 467 CertIndex: ::c_int, 468 CertLabel: [::c_uchar; 36], 469 }} 470 STRUCT!{nodebug struct CRYPT_RC4_KEY_STATE { 471 Key: [::c_uchar; 16], 472 SBox: [::c_uchar; 256], 473 i: ::c_uchar, 474 j: ::c_uchar, 475 }} 476 pub type PCRYPT_RC4_KEY_STATE = *mut CRYPT_RC4_KEY_STATE; 477 STRUCT!{struct CRYPT_DES_KEY_STATE { 478 Key: [::c_uchar; 8], 479 IV: [::c_uchar; 8], 480 Feedback: [::c_uchar; 8], 481 }} 482 pub type PCRYPT_DES_KEY_STATE = *mut CRYPT_DES_KEY_STATE; 483 STRUCT!{struct CRYPT_3DES_KEY_STATE { 484 Key: [::c_uchar; 24], 485 IV: [::c_uchar; 8], 486 Feedback: [::c_uchar; 8], 487 }} 488 pub type PCRYPT_3DES_KEY_STATE = *mut CRYPT_3DES_KEY_STATE; 489 STRUCT!{struct CRYPT_AES_128_KEY_STATE { 490 Key: [::c_uchar; 16], 491 IV: [::c_uchar; 16], 492 EncryptionState: [[::c_uchar; 16]; 11], 493 DecryptionState: [[::c_uchar; 16]; 11], 494 Feedback: [::c_uchar; 16], 495 }} 496 pub type PCRYPT_AES_128_KEY_STATE = *mut CRYPT_AES_128_KEY_STATE; 497 STRUCT!{struct CRYPT_AES_256_KEY_STATE { 498 Key: [::c_uchar; 32], 499 IV: [::c_uchar; 16], 500 EncryptionState: [[::c_uchar; 16]; 15], 501 DecryptionState: [[::c_uchar; 16]; 15], 502 Feedback: [::c_uchar; 16], 503 }} 504 pub type PCRYPT_AES_256_KEY_STATE = *mut CRYPT_AES_256_KEY_STATE; 505 STRUCT!{struct CRYPTOAPI_BLOB { 506 cbData: ::DWORD, 507 pbData: *mut ::BYTE, 508 }} 509 pub type CRYPT_INTEGER_BLOB = CRYPTOAPI_BLOB; 510 pub type PCRYPT_INTEGER_BLOB = *mut CRYPTOAPI_BLOB; 511 pub type CRYPT_UINT_BLOB = CRYPTOAPI_BLOB; 512 pub type PCRYPT_UINT_BLOB = *mut CRYPTOAPI_BLOB; 513 pub type CRYPT_OBJID_BLOB = CRYPTOAPI_BLOB; 514 pub type PCRYPT_OBJID_BLOB = *mut CRYPTOAPI_BLOB; 515 pub type CERT_NAME_BLOB = CRYPTOAPI_BLOB; 516 pub type PCERT_NAME_BLOB = *mut CRYPTOAPI_BLOB; 517 pub type CERT_RDN_VALUE_BLOB = CRYPTOAPI_BLOB; 518 pub type PCERT_RDN_VALUE_BLOB = *mut CRYPTOAPI_BLOB; 519 pub type CERT_BLOB = CRYPTOAPI_BLOB; 520 pub type PCERT_BLOB = *mut CRYPTOAPI_BLOB; 521 pub type CRL_BLOB = CRYPTOAPI_BLOB; 522 pub type PCRL_BLOB = *mut CRYPTOAPI_BLOB; 523 pub type DATA_BLOB = CRYPTOAPI_BLOB; 524 pub type PDATA_BLOB = *mut CRYPTOAPI_BLOB; 525 pub type CRYPT_DATA_BLOB = CRYPTOAPI_BLOB; 526 pub type PCRYPT_DATA_BLOB = *mut CRYPTOAPI_BLOB; 527 pub type CRYPT_HASH_BLOB = CRYPTOAPI_BLOB; 528 pub type PCRYPT_HASH_BLOB = *mut CRYPTOAPI_BLOB; 529 pub type CRYPT_DIGEST_BLOB = CRYPTOAPI_BLOB; 530 pub type PCRYPT_DIGEST_BLOB = *mut CRYPTOAPI_BLOB; 531 pub type CRYPT_DER_BLOB = CRYPTOAPI_BLOB; 532 pub type PCRYPT_DER_BLOB = *mut CRYPTOAPI_BLOB; 533 pub type CRYPT_ATTR_BLOB = CRYPTOAPI_BLOB; 534 pub type PCRYPT_ATTR_BLOB = *mut CRYPTOAPI_BLOB; 535 STRUCT!{struct CMS_DH_KEY_INFO { 536 dwVersion: ::DWORD, 537 Algid: ALG_ID, 538 pszContentEncObjId: ::LPSTR, 539 PubInfo: CRYPT_DATA_BLOB, 540 pReserved: *mut ::c_void, 541 }} 542 pub type PCMS_DH_KEY_INFO = *mut CMS_DH_KEY_INFO; 543 pub type HCRYPTPROV_OR_NCRYPT_KEY_HANDLE = ::ULONG_PTR; 544 pub type HCRYPTPROV_LEGACY = ::ULONG_PTR; 545 STRUCT!{struct CRYPT_BIT_BLOB { 546 cbData: ::DWORD, 547 pbData: *mut ::BYTE, 548 cUnusedBits: ::DWORD, 549 }} 550 pub type PCRYPT_BIT_BLOB = *mut CRYPT_BIT_BLOB; 551 STRUCT!{struct CRYPT_ALGORITHM_IDENTIFIER { 552 pszObjId: ::LPSTR, 553 Parameters: CRYPT_OBJID_BLOB, 554 }} 555 pub type PCRYPT_ALGORITHM_IDENTIFIER = *mut CRYPT_ALGORITHM_IDENTIFIER; 556 pub const szOID_RSA: &'static str = "1.2.840.113549"; 557 pub const szOID_PKCS: &'static str = "1.2.840.113549.1"; 558 pub const szOID_RSA_HASH: &'static str = "1.2.840.113549.2"; 559 pub const szOID_RSA_ENCRYPT: &'static str = "1.2.840.113549.3"; 560 pub const szOID_PKCS_1: &'static str = "1.2.840.113549.1.1"; 561 pub const szOID_PKCS_2: &'static str = "1.2.840.113549.1.2"; 562 pub const szOID_PKCS_3: &'static str = "1.2.840.113549.1.3"; 563 pub const szOID_PKCS_4: &'static str = "1.2.840.113549.1.4"; 564 pub const szOID_PKCS_5: &'static str = "1.2.840.113549.1.5"; 565 pub const szOID_PKCS_6: &'static str = "1.2.840.113549.1.6"; 566 pub const szOID_PKCS_7: &'static str = "1.2.840.113549.1.7"; 567 pub const szOID_PKCS_8: &'static str = "1.2.840.113549.1.8"; 568 pub const szOID_PKCS_9: &'static str = "1.2.840.113549.1.9"; 569 pub const szOID_PKCS_10: &'static str = "1.2.840.113549.1.10"; 570 pub const szOID_PKCS_12: &'static str = "1.2.840.113549.1.12"; 571 pub const szOID_RSA_RSA: &'static str = "1.2.840.113549.1.1.1"; 572 pub const szOID_RSA_MD2RSA: &'static str = "1.2.840.113549.1.1.2"; 573 pub const szOID_RSA_MD4RSA: &'static str = "1.2.840.113549.1.1.3"; 574 pub const szOID_RSA_MD5RSA: &'static str = "1.2.840.113549.1.1.4"; 575 pub const szOID_RSA_SHA1RSA: &'static str = "1.2.840.113549.1.1.5"; 576 pub const szOID_RSA_SETOAEP_RSA: &'static str = "1.2.840.113549.1.1.6"; 577 pub const szOID_RSAES_OAEP: &'static str = "1.2.840.113549.1.1.7"; 578 pub const szOID_RSA_MGF1: &'static str = "1.2.840.113549.1.1.8"; 579 pub const szOID_RSA_PSPECIFIED: &'static str = "1.2.840.113549.1.1.9"; 580 pub const szOID_RSA_SSA_PSS: &'static str = "1.2.840.113549.1.1.10"; 581 pub const szOID_RSA_SHA256RSA: &'static str = "1.2.840.113549.1.1.11"; 582 pub const szOID_RSA_SHA384RSA: &'static str = "1.2.840.113549.1.1.12"; 583 pub const szOID_RSA_SHA512RSA: &'static str = "1.2.840.113549.1.1.13"; 584 pub const szOID_RSA_DH: &'static str = "1.2.840.113549.1.3.1"; 585 pub const szOID_RSA_data: &'static str = "1.2.840.113549.1.7.1"; 586 pub const szOID_RSA_signedData: &'static str = "1.2.840.113549.1.7.2"; 587 pub const szOID_RSA_envelopedData: &'static str = "1.2.840.113549.1.7.3"; 588 pub const szOID_RSA_signEnvData: &'static str = "1.2.840.113549.1.7.4"; 589 pub const szOID_RSA_digestedData: &'static str = "1.2.840.113549.1.7.5"; 590 pub const szOID_RSA_hashedData: &'static str = "1.2.840.113549.1.7.5"; 591 pub const szOID_RSA_encryptedData: &'static str = "1.2.840.113549.1.7.6"; 592 pub const szOID_RSA_emailAddr: &'static str = "1.2.840.113549.1.9.1"; 593 pub const szOID_RSA_unstructName: &'static str = "1.2.840.113549.1.9.2"; 594 pub const szOID_RSA_contentType: &'static str = "1.2.840.113549.1.9.3"; 595 pub const szOID_RSA_messageDigest: &'static str = "1.2.840.113549.1.9.4"; 596 pub const szOID_RSA_signingTime: &'static str = "1.2.840.113549.1.9.5"; 597 pub const szOID_RSA_counterSign: &'static str = "1.2.840.113549.1.9.6"; 598 pub const szOID_RSA_challengePwd: &'static str = "1.2.840.113549.1.9.7"; 599 pub const szOID_RSA_unstructAddr: &'static str = "1.2.840.113549.1.9.8"; 600 pub const szOID_RSA_extCertAttrs: &'static str = "1.2.840.113549.1.9.9"; 601 pub const szOID_RSA_certExtensions: &'static str = "1.2.840.113549.1.9.14"; 602 pub const szOID_RSA_SMIMECapabilities: &'static str = "1.2.840.113549.1.9.15"; 603 pub const szOID_RSA_preferSignedData: &'static str = "1.2.840.113549.1.9.15.1"; 604 pub const szOID_TIMESTAMP_TOKEN: &'static str = "1.2.840.113549.1.9.16.1.4"; 605 pub const szOID_RFC3161_counterSign: &'static str = "1.3.6.1.4.1.311.3.3.1"; 606 pub const szOID_RSA_SMIMEalg: &'static str = "1.2.840.113549.1.9.16.3"; 607 pub const szOID_RSA_SMIMEalgESDH: &'static str = "1.2.840.113549.1.9.16.3.5"; 608 pub const szOID_RSA_SMIMEalgCMS3DESwrap: &'static str = "1.2.840.113549.1.9.16.3.6"; 609 pub const szOID_RSA_SMIMEalgCMSRC2wrap: &'static str = "1.2.840.113549.1.9.16.3.7"; 610 pub const szOID_RSA_MD2: &'static str = "1.2.840.113549.2.2"; 611 pub const szOID_RSA_MD4: &'static str = "1.2.840.113549.2.4"; 612 pub const szOID_RSA_MD5: &'static str = "1.2.840.113549.2.5"; 613 pub const szOID_RSA_RC2CBC: &'static str = "1.2.840.113549.3.2"; 614 pub const szOID_RSA_RC4: &'static str = "1.2.840.113549.3.4"; 615 pub const szOID_RSA_DES_EDE3_CBC: &'static str = "1.2.840.113549.3.7"; 616 pub const szOID_RSA_RC5_CBCPad: &'static str = "1.2.840.113549.3.9"; 617 pub const szOID_ANSI_X942: &'static str = "1.2.840.10046"; 618 pub const szOID_ANSI_X942_DH: &'static str = "1.2.840.10046.2.1"; 619 pub const szOID_X957: &'static str = "1.2.840.10040"; 620 pub const szOID_X957_DSA: &'static str = "1.2.840.10040.4.1"; 621 pub const szOID_X957_SHA1DSA: &'static str = "1.2.840.10040.4.3"; 622 pub const szOID_ECC_PUBLIC_KEY: &'static str = "1.2.840.10045.2.1"; 623 pub const szOID_ECC_CURVE_P256: &'static str = "1.2.840.10045.3.1.7"; 624 pub const szOID_ECC_CURVE_P384: &'static str = "1.3.132.0.34"; 625 pub const szOID_ECC_CURVE_P521: &'static str = "1.3.132.0.35"; 626 pub const szOID_ECDSA_SHA1: &'static str = "1.2.840.10045.4.1"; 627 pub const szOID_ECDSA_SPECIFIED: &'static str = "1.2.840.10045.4.3"; 628 pub const szOID_ECDSA_SHA256: &'static str = "1.2.840.10045.4.3.2"; 629 pub const szOID_ECDSA_SHA384: &'static str = "1.2.840.10045.4.3.3"; 630 pub const szOID_ECDSA_SHA512: &'static str = "1.2.840.10045.4.3.4"; 631 pub const szOID_NIST_AES128_CBC: &'static str = "2.16.840.1.101.3.4.1.2"; 632 pub const szOID_NIST_AES192_CBC: &'static str = "2.16.840.1.101.3.4.1.22"; 633 pub const szOID_NIST_AES256_CBC: &'static str = "2.16.840.1.101.3.4.1.42"; 634 pub const szOID_NIST_AES128_WRAP: &'static str = "2.16.840.1.101.3.4.1.5"; 635 pub const szOID_NIST_AES192_WRAP: &'static str = "2.16.840.1.101.3.4.1.25"; 636 pub const szOID_NIST_AES256_WRAP: &'static str = "2.16.840.1.101.3.4.1.45"; 637 pub const szOID_DH_SINGLE_PASS_STDDH_SHA1_KDF: &'static str = "1.3.133.16.840.63.0.2"; 638 pub const szOID_DH_SINGLE_PASS_STDDH_SHA256_KDF: &'static str = "1.3.132.1.11.1"; 639 pub const szOID_DH_SINGLE_PASS_STDDH_SHA384_KDF: &'static str = "1.3.132.1.11.2"; 640 pub const szOID_DS: &'static str = "2.5"; 641 pub const szOID_DSALG: &'static str = "2.5.8"; 642 pub const szOID_DSALG_CRPT: &'static str = "2.5.8.1"; 643 pub const szOID_DSALG_HASH: &'static str = "2.5.8.2"; 644 pub const szOID_DSALG_SIGN: &'static str = "2.5.8.3"; 645 pub const szOID_DSALG_RSA: &'static str = "2.5.8.1.1"; 646 pub const szOID_OIW: &'static str = "1.3.14"; 647 pub const szOID_OIWSEC: &'static str = "1.3.14.3.2"; 648 pub const szOID_OIWSEC_md4RSA: &'static str = "1.3.14.3.2.2"; 649 pub const szOID_OIWSEC_md5RSA: &'static str = "1.3.14.3.2.3"; 650 pub const szOID_OIWSEC_md4RSA2: &'static str = "1.3.14.3.2.4"; 651 pub const szOID_OIWSEC_desECB: &'static str = "1.3.14.3.2.6"; 652 pub const szOID_OIWSEC_desCBC: &'static str = "1.3.14.3.2.7"; 653 pub const szOID_OIWSEC_desOFB: &'static str = "1.3.14.3.2.8"; 654 pub const szOID_OIWSEC_desCFB: &'static str = "1.3.14.3.2.9"; 655 pub const szOID_OIWSEC_desMAC: &'static str = "1.3.14.3.2.10"; 656 pub const szOID_OIWSEC_rsaSign: &'static str = "1.3.14.3.2.11"; 657 pub const szOID_OIWSEC_dsa: &'static str = "1.3.14.3.2.12"; 658 pub const szOID_OIWSEC_shaDSA: &'static str = "1.3.14.3.2.13"; 659 pub const szOID_OIWSEC_mdc2RSA: &'static str = "1.3.14.3.2.14"; 660 pub const szOID_OIWSEC_shaRSA: &'static str = "1.3.14.3.2.15"; 661 pub const szOID_OIWSEC_dhCommMod: &'static str = "1.3.14.3.2.16"; 662 pub const szOID_OIWSEC_desEDE: &'static str = "1.3.14.3.2.17"; 663 pub const szOID_OIWSEC_sha: &'static str = "1.3.14.3.2.18"; 664 pub const szOID_OIWSEC_mdc2: &'static str = "1.3.14.3.2.19"; 665 pub const szOID_OIWSEC_dsaComm: &'static str = "1.3.14.3.2.20"; 666 pub const szOID_OIWSEC_dsaCommSHA: &'static str = "1.3.14.3.2.21"; 667 pub const szOID_OIWSEC_rsaXchg: &'static str = "1.3.14.3.2.22"; 668 pub const szOID_OIWSEC_keyHashSeal: &'static str = "1.3.14.3.2.23"; 669 pub const szOID_OIWSEC_md2RSASign: &'static str = "1.3.14.3.2.24"; 670 pub const szOID_OIWSEC_md5RSASign: &'static str = "1.3.14.3.2.25"; 671 pub const szOID_OIWSEC_sha1: &'static str = "1.3.14.3.2.26"; 672 pub const szOID_OIWSEC_dsaSHA1: &'static str = "1.3.14.3.2.27"; 673 pub const szOID_OIWSEC_dsaCommSHA1: &'static str = "1.3.14.3.2.28"; 674 pub const szOID_OIWSEC_sha1RSASign: &'static str = "1.3.14.3.2.29"; 675 pub const szOID_OIWDIR: &'static str = "1.3.14.7.2"; 676 pub const szOID_OIWDIR_CRPT: &'static str = "1.3.14.7.2.1"; 677 pub const szOID_OIWDIR_HASH: &'static str = "1.3.14.7.2.2"; 678 pub const szOID_OIWDIR_SIGN: &'static str = "1.3.14.7.2.3"; 679 pub const szOID_OIWDIR_md2: &'static str = "1.3.14.7.2.2.1"; 680 pub const szOID_OIWDIR_md2RSA: &'static str = "1.3.14.7.2.3.1"; 681 pub const szOID_INFOSEC: &'static str = "2.16.840.1.101.2.1"; 682 pub const szOID_INFOSEC_sdnsSignature: &'static str = "2.16.840.1.101.2.1.1.1"; 683 pub const szOID_INFOSEC_mosaicSignature: &'static str = "2.16.840.1.101.2.1.1.2"; 684 pub const szOID_INFOSEC_sdnsConfidentiality: &'static str = "2.16.840.1.101.2.1.1.3"; 685 pub const szOID_INFOSEC_mosaicConfidentiality: &'static str = "2.16.840.1.101.2.1.1.4"; 686 pub const szOID_INFOSEC_sdnsIntegrity: &'static str = "2.16.840.1.101.2.1.1.5"; 687 pub const szOID_INFOSEC_mosaicIntegrity: &'static str = "2.16.840.1.101.2.1.1.6"; 688 pub const szOID_INFOSEC_sdnsTokenProtection: &'static str = "2.16.840.1.101.2.1.1.7"; 689 pub const szOID_INFOSEC_mosaicTokenProtection: &'static str = "2.16.840.1.101.2.1.1.8"; 690 pub const szOID_INFOSEC_sdnsKeyManagement: &'static str = "2.16.840.1.101.2.1.1.9"; 691 pub const szOID_INFOSEC_mosaicKeyManagement: &'static str = "2.16.840.1.101.2.1.1.10"; 692 pub const szOID_INFOSEC_sdnsKMandSig: &'static str = "2.16.840.1.101.2.1.1.11"; 693 pub const szOID_INFOSEC_mosaicKMandSig: &'static str = "2.16.840.1.101.2.1.1.12"; 694 pub const szOID_INFOSEC_SuiteASignature: &'static str = "2.16.840.1.101.2.1.1.13"; 695 pub const szOID_INFOSEC_SuiteAConfidentiality: &'static str = "2.16.840.1.101.2.1.1.14"; 696 pub const szOID_INFOSEC_SuiteAIntegrity: &'static str = "2.16.840.1.101.2.1.1.15"; 697 pub const szOID_INFOSEC_SuiteATokenProtection: &'static str = "2.16.840.1.101.2.1.1.16"; 698 pub const szOID_INFOSEC_SuiteAKeyManagement: &'static str = "2.16.840.1.101.2.1.1.17"; 699 pub const szOID_INFOSEC_SuiteAKMandSig: &'static str = "2.16.840.1.101.2.1.1.18"; 700 pub const szOID_INFOSEC_mosaicUpdatedSig: &'static str = "2.16.840.1.101.2.1.1.19"; 701 pub const szOID_INFOSEC_mosaicKMandUpdSig: &'static str = "2.16.840.1.101.2.1.1.20"; 702 pub const szOID_INFOSEC_mosaicUpdatedInteg: &'static str = "2.16.840.1.101.2.1.1.21"; 703 pub const szOID_NIST_sha256: &'static str = "2.16.840.1.101.3.4.2.1"; 704 pub const szOID_NIST_sha384: &'static str = "2.16.840.1.101.3.4.2.2"; 705 pub const szOID_NIST_sha512: &'static str = "2.16.840.1.101.3.4.2.3"; 706 STRUCT!{struct CRYPT_OBJID_TABLE { 707 dwAlgId: ::DWORD, 708 pszObjId: ::LPCSTR, 709 }} 710 pub type PCRYPT_OBJID_TABLE = *mut CRYPT_OBJID_TABLE; 711 STRUCT!{struct CRYPT_HASH_INFO { 712 HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, 713 Hash: CRYPT_HASH_BLOB, 714 }} 715 pub type PCRYPT_HASH_INFO = *mut CRYPT_HASH_INFO; 716 STRUCT!{struct CERT_EXTENSION { 717 pszObjId: ::LPSTR, 718 fCritical: ::BOOL, 719 Value: CRYPT_OBJID_BLOB, 720 }} 721 pub type PCERT_EXTENSION = *mut CERT_EXTENSION; 722 pub type PCCERT_EXTENSION = *const CERT_EXTENSION; 723 STRUCT!{struct CRYPT_ATTRIBUTE_TYPE_VALUE { 724 pszObjId: ::LPSTR, 725 Value: CRYPT_OBJID_BLOB, 726 }} 727 pub type PCRYPT_ATTRIBUTE_TYPE_VALUE = *mut CRYPT_ATTRIBUTE_TYPE_VALUE; 728 STRUCT!{struct CRYPT_ATTRIBUTE { 729 pszObjId: ::LPSTR, 730 cValue: ::DWORD, 731 rgValue: PCRYPT_ATTR_BLOB, 732 }} 733 pub type PCRYPT_ATTRIBUTE = *mut CRYPT_ATTRIBUTE; 734 STRUCT!{struct CRYPT_ATTRIBUTES { 735 cAttr: ::DWORD, 736 rgAttr: PCRYPT_ATTRIBUTE, 737 }} 738 pub type PCRYPT_ATTRIBUTES = *mut CRYPT_ATTRIBUTES; 739 STRUCT!{struct CERT_RDN_ATTR { 740 pszObjId: ::LPSTR, 741 dwValueType: ::DWORD, 742 Value: CERT_RDN_VALUE_BLOB, 743 }} 744 pub type PCERT_RDN_ATTR = *mut CERT_RDN_ATTR; 745 pub const szOID_COMMON_NAME: &'static str = "2.5.4.3"; 746 pub const szOID_SUR_NAME: &'static str = "2.5.4.4"; 747 pub const szOID_DEVICE_SERIAL_NUMBER: &'static str = "2.5.4.5"; 748 pub const szOID_COUNTRY_NAME: &'static str = "2.5.4.6"; 749 pub const szOID_LOCALITY_NAME: &'static str = "2.5.4.7"; 750 pub const szOID_STATE_OR_PROVINCE_NAME: &'static str = "2.5.4.8"; 751 pub const szOID_STREET_ADDRESS: &'static str = "2.5.4.9"; 752 pub const szOID_ORGANIZATION_NAME: &'static str = "2.5.4.10"; 753 pub const szOID_ORGANIZATIONAL_UNIT_NAME: &'static str = "2.5.4.11"; 754 pub const szOID_TITLE: &'static str = "2.5.4.12"; 755 pub const szOID_DESCRIPTION: &'static str = "2.5.4.13"; 756 pub const szOID_SEARCH_GUIDE: &'static str = "2.5.4.14"; 757 pub const szOID_BUSINESS_CATEGORY: &'static str = "2.5.4.15"; 758 pub const szOID_POSTAL_ADDRESS: &'static str = "2.5.4.16"; 759 pub const szOID_POSTAL_CODE: &'static str = "2.5.4.17"; 760 pub const szOID_POST_OFFICE_BOX: &'static str = "2.5.4.18"; 761 pub const szOID_PHYSICAL_DELIVERY_OFFICE_NAME: &'static str = "2.5.4.19"; 762 pub const szOID_TELEPHONE_NUMBER: &'static str = "2.5.4.20"; 763 pub const szOID_TELEX_NUMBER: &'static str = "2.5.4.21"; 764 pub const szOID_TELETEXT_TERMINAL_IDENTIFIER: &'static str = "2.5.4.22"; 765 pub const szOID_FACSIMILE_TELEPHONE_NUMBER: &'static str = "2.5.4.23"; 766 pub const szOID_X21_ADDRESS: &'static str = "2.5.4.24"; 767 pub const szOID_INTERNATIONAL_ISDN_NUMBER: &'static str = "2.5.4.25"; 768 pub const szOID_REGISTERED_ADDRESS: &'static str = "2.5.4.26"; 769 pub const szOID_DESTINATION_INDICATOR: &'static str = "2.5.4.27"; 770 pub const szOID_PREFERRED_DELIVERY_METHOD: &'static str = "2.5.4.28"; 771 pub const szOID_PRESENTATION_ADDRESS: &'static str = "2.5.4.29"; 772 pub const szOID_SUPPORTED_APPLICATION_CONTEXT: &'static str = "2.5.4.30"; 773 pub const szOID_MEMBER: &'static str = "2.5.4.31"; 774 pub const szOID_OWNER: &'static str = "2.5.4.32"; 775 pub const szOID_ROLE_OCCUPANT: &'static str = "2.5.4.33"; 776 pub const szOID_SEE_ALSO: &'static str = "2.5.4.34"; 777 pub const szOID_USER_PASSWORD: &'static str = "2.5.4.35"; 778 pub const szOID_USER_CERTIFICATE: &'static str = "2.5.4.36"; 779 pub const szOID_CA_CERTIFICATE: &'static str = "2.5.4.37"; 780 pub const szOID_AUTHORITY_REVOCATION_LIST: &'static str = "2.5.4.38"; 781 pub const szOID_CERTIFICATE_REVOCATION_LIST: &'static str = "2.5.4.39"; 782 pub const szOID_CROSS_CERTIFICATE_PAIR: &'static str = "2.5.4.40"; 783 pub const szOID_GIVEN_NAME: &'static str = "2.5.4.42"; 784 pub const szOID_INITIALS: &'static str = "2.5.4.43"; 785 pub const szOID_DN_QUALIFIER: &'static str = "2.5.4.46"; 786 pub const szOID_DOMAIN_COMPONENT: &'static str = "0.9.2342.19200300.100.1.25"; 787 pub const szOID_PKCS_12_FRIENDLY_NAME_ATTR: &'static str = "1.2.840.113549.1.9.20"; 788 pub const szOID_PKCS_12_LOCAL_KEY_ID: &'static str = "1.2.840.113549.1.9.21"; 789 pub const szOID_PKCS_12_KEY_PROVIDER_NAME_ATTR: &'static str = "1.3.6.1.4.1.311.17.1"; 790 pub const szOID_LOCAL_MACHINE_KEYSET: &'static str = "1.3.6.1.4.1.311.17.2"; 791 pub const szOID_PKCS_12_EXTENDED_ATTRIBUTES: &'static str = "1.3.6.1.4.1.311.17.3"; 792 pub const szOID_PKCS_12_PROTECTED_PASSWORD_SECRET_BAG_TYPE_ID: &'static str = 793 "1.3.6.1.4.1.311.17.4"; 794 pub const szOID_KEYID_RDN: &'static str = "1.3.6.1.4.1.311.10.7.1"; 795 pub const szOID_EV_RDN_LOCALE: &'static str = "1.3.6.1.4.1.311.60.2.1.1"; 796 pub const szOID_EV_RDN_STATE_OR_PROVINCE: &'static str = "1.3.6.1.4.1.311.60.2.1.2"; 797 pub const szOID_EV_RDN_COUNTRY: &'static str = "1.3.6.1.4.1.311.60.2.1.3"; 798 pub const CERT_RDN_ANY_TYPE: ::DWORD = 0; 799 pub const CERT_RDN_ENCODED_BLOB: ::DWORD = 1; 800 pub const CERT_RDN_OCTET_STRING: ::DWORD = 2; 801 pub const CERT_RDN_NUMERIC_STRING: ::DWORD = 3; 802 pub const CERT_RDN_PRINTABLE_STRING: ::DWORD = 4; 803 pub const CERT_RDN_TELETEX_STRING: ::DWORD = 5; 804 pub const CERT_RDN_T61_STRING: ::DWORD = 5; 805 pub const CERT_RDN_VIDEOTEX_STRING: ::DWORD = 6; 806 pub const CERT_RDN_IA5_STRING: ::DWORD = 7; 807 pub const CERT_RDN_GRAPHIC_STRING: ::DWORD = 8; 808 pub const CERT_RDN_VISIBLE_STRING: ::DWORD = 9; 809 pub const CERT_RDN_ISO646_STRING: ::DWORD = 9; 810 pub const CERT_RDN_GENERAL_STRING: ::DWORD = 10; 811 pub const CERT_RDN_UNIVERSAL_STRING: ::DWORD = 11; 812 pub const CERT_RDN_INT4_STRING: ::DWORD = 11; 813 pub const CERT_RDN_BMP_STRING: ::DWORD = 12; 814 pub const CERT_RDN_UNICODE_STRING: ::DWORD = 12; 815 pub const CERT_RDN_UTF8_STRING: ::DWORD = 13; 816 pub const CERT_RDN_TYPE_MASK: ::DWORD = 0x000000FF; 817 pub const CERT_RDN_FLAGS_MASK: ::DWORD = 0xFF000000; 818 pub const CERT_RDN_ENABLE_T61_UNICODE_FLAG: ::DWORD = 0x80000000; 819 pub const CERT_RDN_ENABLE_UTF8_UNICODE_FLAG: ::DWORD = 0x20000000; 820 pub const CERT_RDN_FORCE_UTF8_UNICODE_FLAG: ::DWORD = 0x10000000; 821 pub const CERT_RDN_DISABLE_CHECK_TYPE_FLAG: ::DWORD = 0x40000000; 822 pub const CERT_RDN_DISABLE_IE4_UTF8_FLAG: ::DWORD = 0x01000000; 823 pub const CERT_RDN_ENABLE_PUNYCODE_FLAG: ::DWORD = 0x02000000; 824 STRUCT!{struct CERT_RDN { 825 cRDNAttr: ::DWORD, 826 rgRDNAttr: PCERT_RDN_ATTR, 827 }} 828 pub type PCERT_RDN = *mut CERT_RDN; 829 STRUCT!{struct CERT_NAME_INFO { 830 cRDN: ::DWORD, 831 rgRDN: PCERT_RDN, 832 }} 833 pub type PCERT_NAME_INFO = *mut CERT_NAME_INFO; 834 STRUCT!{struct CERT_NAME_VALUE { 835 dwValueType: ::DWORD, 836 Value: CERT_RDN_VALUE_BLOB, 837 }} 838 pub type PCERT_NAME_VALUE = *mut CERT_NAME_VALUE; 839 STRUCT!{struct CERT_PUBLIC_KEY_INFO { 840 Algorithm: CRYPT_ALGORITHM_IDENTIFIER, 841 PublicKey: CRYPT_BIT_BLOB, 842 }} 843 pub type PCERT_PUBLIC_KEY_INFO = *mut CERT_PUBLIC_KEY_INFO; 844 pub const CERT_RSA_PUBLIC_KEY_OBJID: &'static str = szOID_RSA_RSA; 845 pub const CERT_DEFAULT_OID_PUBLIC_KEY_SIGN: &'static str = szOID_RSA_RSA; 846 pub const CERT_DEFAULT_OID_PUBLIC_KEY_XCHG: &'static str = szOID_RSA_RSA; 847 STRUCT!{struct CRYPT_ECC_PRIVATE_KEY_INFO { 848 dwVersion: ::DWORD, 849 PrivateKey: CRYPT_DER_BLOB, 850 szCurveOid: ::LPSTR, 851 PublicKey: CRYPT_BIT_BLOB, 852 }} 853 pub type PCRYPT_ECC_PRIVATE_KEY_INFO = *mut CRYPT_ECC_PRIVATE_KEY_INFO; 854 pub const CRYPT_ECC_PRIVATE_KEY_INFO_v1: ::DWORD = 1; 855 STRUCT!{struct CRYPT_PRIVATE_KEY_INFO { 856 Version: ::DWORD, 857 Algorithm: CRYPT_ALGORITHM_IDENTIFIER, 858 PrivateKey: CRYPT_DER_BLOB, 859 pAttributes: PCRYPT_ATTRIBUTES, 860 }} 861 pub type PCRYPT_PRIVATE_KEY_INFO = *mut CRYPT_PRIVATE_KEY_INFO; 862 STRUCT!{struct CRYPT_ENCRYPTED_PRIVATE_KEY_INFO { 863 EncryptionAlgorithm: ::CRYPT_ALGORITHM_IDENTIFIER, 864 EncryptedPrivateKey: ::CRYPT_DATA_BLOB, 865 }} 866 pub type PCRYPT_ENCRYPTED_PRIVATE_KEY_INFO = *mut CRYPT_ENCRYPTED_PRIVATE_KEY_INFO; 867 pub type PCRYPT_DECRYPT_PRIVATE_KEY_FUNC = Option<unsafe extern "system" fn( 868 Algorithm: CRYPT_ALGORITHM_IDENTIFIER, EncryptedPrivateKey: CRYPT_DATA_BLOB, 869 pbClearTextKey: *mut ::BYTE, pcbClearTextKey: *mut ::DWORD, pVoidDecryptFunc: ::LPVOID, 870 ) -> ::BOOL>; 871 pub type PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC = Option<unsafe extern "system" fn( 872 Algorithm: *mut CRYPT_ALGORITHM_IDENTIFIER, pClearTextPrivateKey: *mut CRYPT_DATA_BLOB, 873 pbEncryptedKey: *mut ::BYTE, pcbEncryptedKey: *mut ::DWORD, pVoidEncryptFunc: ::LPVOID, 874 ) -> ::BOOL>; 875 pub type PCRYPT_RESOLVE_HCRYPTPROV_FUNC = Option<unsafe extern "system" fn( 876 pPrivateKeyInfo: *mut CRYPT_PRIVATE_KEY_INFO, phCryptProv: *mut HCRYPTPROV, 877 pVoidResolveFunc: ::LPVOID, 878 ) -> ::BOOL>; 879 STRUCT!{nodebug struct CRYPT_PKCS8_IMPORT_PARAMS { 880 PrivateKey: CRYPT_DIGEST_BLOB, 881 pResolvehCryptProvFunc: PCRYPT_RESOLVE_HCRYPTPROV_FUNC, 882 pVoidResolveFunc: ::LPVOID, 883 pDecryptPrivateKeyFunc: PCRYPT_DECRYPT_PRIVATE_KEY_FUNC, 884 pVoidDecryptFunc: ::LPVOID, 885 }} 886 pub type PCRYPT_PKCS8_IMPORT_PARAMS = *mut CRYPT_PKCS8_IMPORT_PARAMS; 887 pub type CRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = CRYPT_PKCS8_IMPORT_PARAMS; 888 pub type PPCRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = *mut CRYPT_PKCS8_IMPORT_PARAMS; 889 STRUCT!{nodebug struct CRYPT_PKCS8_EXPORT_PARAMS { 890 hCryptProv: HCRYPTPROV, 891 dwKeySpec: ::DWORD, 892 pszPrivateKeyObjId: ::LPSTR, 893 pEncryptPrivateKeyFunc: PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC, 894 pVoidEncryptFunc: ::LPVOID, 895 }} 896 pub type PCRYPT_PKCS8_EXPORT_PARAMS = *mut CRYPT_PKCS8_EXPORT_PARAMS; 897 STRUCT!{struct CERT_INFO { 898 dwVersion: ::DWORD, 899 SerialNumber: CRYPT_INTEGER_BLOB, 900 SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, 901 Issuer: CERT_NAME_BLOB, 902 NotBefore: ::FILETIME, 903 NotAfter: ::FILETIME, 904 Subject: CERT_NAME_BLOB, 905 SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO, 906 IssuerUniqueId: CRYPT_BIT_BLOB, 907 SubjectUniqueId: CRYPT_BIT_BLOB, 908 cExtension: ::DWORD, 909 rgExtension: PCERT_EXTENSION, 910 }} 911 pub type PCERT_INFO = *mut CERT_INFO; 912 pub const CERT_V1: ::DWORD = 0; 913 pub const CERT_V2: ::DWORD = 1; 914 pub const CERT_V3: ::DWORD = 2; 915 pub const CERT_INFO_VERSION_FLAG: ::DWORD = 1; 916 pub const CERT_INFO_SERIAL_NUMBER_FLAG: ::DWORD = 2; 917 pub const CERT_INFO_SIGNATURE_ALGORITHM_FLAG: ::DWORD = 3; 918 pub const CERT_INFO_ISSUER_FLAG: ::DWORD = 4; 919 pub const CERT_INFO_NOT_BEFORE_FLAG: ::DWORD = 5; 920 pub const CERT_INFO_NOT_AFTER_FLAG: ::DWORD = 6; 921 pub const CERT_INFO_SUBJECT_FLAG: ::DWORD = 7; 922 pub const CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG: ::DWORD = 8; 923 pub const CERT_INFO_ISSUER_UNIQUE_ID_FLAG: ::DWORD = 9; 924 pub const CERT_INFO_SUBJECT_UNIQUE_ID_FLAG: ::DWORD = 10; 925 pub const CERT_INFO_EXTENSION_FLAG: ::DWORD = 11; 926 STRUCT!{struct CRL_ENTRY { 927 SerialNumber: CRYPT_INTEGER_BLOB, 928 RevocationDate: ::FILETIME, 929 cExtension: ::DWORD, 930 rgExtension: PCERT_EXTENSION, 931 }} 932 pub type PCRL_ENTRY = *mut CRL_ENTRY; 933 STRUCT!{struct CRL_INFO { 934 dwVersion: ::DWORD, 935 SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, 936 Issuer: CERT_NAME_BLOB, 937 ThisUpdate: ::FILETIME, 938 NextUpdate: ::FILETIME, 939 cCRLEntry: ::DWORD, 940 rgCRLEntry: PCRL_ENTRY, 941 cExtension: ::DWORD, 942 rgExtension: PCERT_EXTENSION, 943 }} 944 pub type PCRL_INFO = *mut CRL_INFO; 945 pub const CRL_V1: ::DWORD = 0; 946 pub const CRL_V2: ::DWORD = 1; 947 pub const CERT_BUNDLE_CERTIFICATE: ::DWORD = 0; 948 pub const CERT_BUNDLE_CRL: ::DWORD = 1; 949 STRUCT!{struct CERT_OR_CRL_BLOB { 950 dwChoice: ::DWORD, 951 cbEncoded: ::DWORD, 952 pbEncoded: *mut ::BYTE, 953 }} 954 pub type PCERT_OR_CRL_BLOB = *mut CERT_OR_CRL_BLOB; 955 STRUCT!{struct CERT_OR_CRL_BUNDLE { 956 cItem: ::DWORD, 957 rgItem: PCERT_OR_CRL_BLOB, 958 }} 959 pub type PCERT_OR_CRL_BUNDLE = *mut CERT_OR_CRL_BUNDLE; 960 STRUCT!{struct CERT_REQUEST_INFO { 961 dwVersion: ::DWORD, 962 Subject: CERT_NAME_BLOB, 963 SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO, 964 cAttribute: ::DWORD, 965 rgAttribute: PCRYPT_ATTRIBUTE, 966 }} 967 pub type PCERT_REQUEST_INFO = *mut CERT_REQUEST_INFO; 968 pub const CERT_REQUEST_V1: ::DWORD = 0; 969 STRUCT!{struct CERT_KEYGEN_REQUEST_INFO { 970 dwVersion: ::DWORD, 971 SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO, 972 pwszChallengeString: ::LPWSTR, 973 }} 974 pub type PCERT_KEYGEN_REQUEST_INFO = *mut CERT_KEYGEN_REQUEST_INFO; 975 pub const CERT_KEYGEN_REQUEST_V1: ::DWORD = 0; 976 STRUCT!{struct CERT_SIGNED_CONTENT_INFO { 977 ToBeSigned: CRYPT_DER_BLOB, 978 SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, 979 Signature: CRYPT_BIT_BLOB, 980 }} 981 pub type PCERT_SIGNED_CONTENT_INFO = *mut CERT_SIGNED_CONTENT_INFO; 982 STRUCT!{struct CTL_USAGE { 983 cUsageIdentifier: ::DWORD, 984 rgpszUsageIdentifier: *mut ::LPSTR, 985 }} 986 pub type PCTL_USAGE = *mut CTL_USAGE; 987 pub type CERT_ENHKEY_USAGE = CTL_USAGE; 988 pub type PCERT_ENHKEY_USAGE = *mut CERT_ENHKEY_USAGE; 989 pub type PCCTL_USAGE = *const CTL_USAGE; 990 pub type PCCERT_ENHKEY_USAGE = *const CERT_ENHKEY_USAGE; 991 STRUCT!{struct CTL_ENTRY { 992 SubjectIdentifier: CRYPT_DATA_BLOB, 993 cAttribute: ::DWORD, 994 rgAttribute: PCRYPT_ATTRIBUTE, 995 }} 996 pub type PCTL_ENTRY = *mut CTL_ENTRY; 997 STRUCT!{struct CTL_INFO { 998 dwVersion: ::DWORD, 999 SubjectUsage: CTL_USAGE, 1000 ListIdentifier: CRYPT_DATA_BLOB, 1001 SequenceNumber: CRYPT_INTEGER_BLOB, 1002 ThisUpdate: ::FILETIME, 1003 NextUpdate: ::FILETIME, 1004 SubjectAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, 1005 cCTLEntry: ::DWORD, 1006 rgCTLEntry: PCTL_ENTRY, 1007 cExtension: ::DWORD, 1008 rgExtension: PCERT_EXTENSION, 1009 }} 1010 pub type PCTL_INFO = *mut CTL_INFO; 1011 pub const CTL_V1: ::DWORD = 0; 1012 STRUCT!{struct CRYPT_TIME_STAMP_REQUEST_INFO { 1013 pszTimeStampAlgorithm: ::LPSTR, 1014 pszContentType: ::LPSTR, 1015 Content: CRYPT_OBJID_BLOB, 1016 cAttribute: ::DWORD, 1017 rgAttribute: PCRYPT_ATTRIBUTE, 1018 }} 1019 pub type PCRYPT_TIME_STAMP_REQUEST_INFO = *mut CRYPT_TIME_STAMP_REQUEST_INFO; 1020 STRUCT!{struct CRYPT_ENROLLMENT_NAME_VALUE_PAIR { 1021 pwszName: ::LPWSTR, 1022 pwszValue: ::LPWSTR, 1023 }} 1024 pub type PCRYPT_ENROLLMENT_NAME_VALUE_PAIR = *mut CRYPT_ENROLLMENT_NAME_VALUE_PAIR; 1025 STRUCT!{struct CRYPT_CSP_PROVIDER { 1026 dwKeySpec: ::DWORD, 1027 pwszProviderName: ::LPWSTR, 1028 Signature: CRYPT_BIT_BLOB, 1029 }} 1030 pub type PCRYPT_CSP_PROVIDER = *mut CRYPT_CSP_PROVIDER; 1031 pub const CERT_ENCODING_TYPE_MASK: ::DWORD = 0x0000FFFF; 1032 pub const CMSG_ENCODING_TYPE_MASK: ::DWORD = 0xFFFF0000; 1033 pub const CRYPT_ASN_ENCODING: ::DWORD = 0x00000001; 1034 pub const CRYPT_NDR_ENCODING: ::DWORD = 0x00000002; 1035 pub const X509_ASN_ENCODING: ::DWORD = 0x00000001; 1036 pub const X509_NDR_ENCODING: ::DWORD = 0x00000002; 1037 pub const PKCS_7_ASN_ENCODING: ::DWORD = 0x00010000; 1038 pub const PKCS_7_NDR_ENCODING: ::DWORD = 0x00020000; 1039 pub const CRYPT_FORMAT_STR_MULTI_LINE: ::DWORD = 0x0001; 1040 pub const CRYPT_FORMAT_STR_NO_HEX: ::DWORD = 0x0010; 1041 pub const CRYPT_FORMAT_SIMPLE: ::DWORD = 0x0001; 1042 pub const CRYPT_FORMAT_X509: ::DWORD = 0x0002; 1043 pub const CRYPT_FORMAT_OID: ::DWORD = 0x0004; 1044 pub const CRYPT_FORMAT_RDN_SEMICOLON: ::DWORD = 0x0100; 1045 pub const CRYPT_FORMAT_RDN_CRLF: ::DWORD = 0x0200; 1046 pub const CRYPT_FORMAT_RDN_UNQUOTE: ::DWORD = 0x0400; 1047 pub const CRYPT_FORMAT_RDN_REVERSE: ::DWORD = 0x0800; 1048 pub const CRYPT_FORMAT_COMMA: ::DWORD = 0x1000; 1049 pub const CRYPT_FORMAT_SEMICOLON: ::DWORD = CRYPT_FORMAT_RDN_SEMICOLON; 1050 pub const CRYPT_FORMAT_CRLF: ::DWORD = CRYPT_FORMAT_RDN_CRLF; 1051 pub type PFN_CRYPT_ALLOC = Option<unsafe extern "system" fn(cbSize: ::size_t)>; 1052 pub type PFN_CRYPT_FREE = Option<unsafe extern "system" fn(pv: ::LPVOID)>; 1053 STRUCT!{nodebug struct CRYPT_ENCODE_PARA { 1054 cbSize: ::DWORD, 1055 pfnAlloc: PFN_CRYPT_ALLOC, 1056 pfnFree: PFN_CRYPT_FREE, 1057 }} 1058 pub type PCRYPT_ENCODE_PARA = *mut CRYPT_ENCODE_PARA; 1059 pub const CRYPT_ENCODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG: ::DWORD = 0x8; 1060 pub const CRYPT_ENCODE_ALLOC_FLAG: ::DWORD = 0x8000; 1061 pub const CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG: ::DWORD = 1062 CERT_RDN_ENABLE_T61_UNICODE_FLAG; 1063 pub const CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG: ::DWORD = 1064 CERT_RDN_ENABLE_UTF8_UNICODE_FLAG; 1065 pub const CRYPT_UNICODE_NAME_ENCODE_FORCE_UTF8_UNICODE_FLAG: ::DWORD = 1066 CERT_RDN_FORCE_UTF8_UNICODE_FLAG; 1067 pub const CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG: ::DWORD = 1068 CERT_RDN_DISABLE_CHECK_TYPE_FLAG; 1069 pub const CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG: ::DWORD = 0x10000; 1070 pub const CRYPT_ENCODE_ENABLE_PUNYCODE_FLAG: ::DWORD = 0x20000; 1071 pub const CRYPT_ENCODE_ENABLE_UTF8PERCENT_FLAG: ::DWORD = 0x40000; 1072 pub const CRYPT_ENCODE_ENABLE_IA5CONVERSION_FLAG: ::DWORD = CRYPT_ENCODE_ENABLE_PUNYCODE_FLAG 1073 | CRYPT_ENCODE_ENABLE_UTF8PERCENT_FLAG; 1074 STRUCT!{nodebug struct CRYPT_DECODE_PARA { 1075 cbSize: ::DWORD, 1076 pfnAlloc: PFN_CRYPT_ALLOC, 1077 pfnFree: PFN_CRYPT_FREE, 1078 }} 1079 pub type PCRYPT_DECODE_PARA = *mut CRYPT_DECODE_PARA; 1080 pub const CRYPT_DECODE_NOCOPY_FLAG: ::DWORD = 0x1; 1081 pub const CRYPT_DECODE_TO_BE_SIGNED_FLAG: ::DWORD = 0x2; 1082 pub const CRYPT_DECODE_SHARE_OID_STRING_FLAG: ::DWORD = 0x4; 1083 pub const CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG: ::DWORD = 0x8; 1084 pub const CRYPT_DECODE_ALLOC_FLAG: ::DWORD = 0x8000; 1085 pub const CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG: ::DWORD = 1086 CERT_RDN_DISABLE_IE4_UTF8_FLAG; 1087 pub const CRYPT_DECODE_ENABLE_PUNYCODE_FLAG: ::DWORD = 0x02000000; 1088 pub const CRYPT_DECODE_ENABLE_UTF8PERCENT_FLAG: ::DWORD = 0x04000000; 1089 pub const CRYPT_DECODE_ENABLE_IA5CONVERSION_FLAG: ::DWORD = CRYPT_DECODE_ENABLE_PUNYCODE_FLAG 1090 | CRYPT_DECODE_ENABLE_UTF8PERCENT_FLAG; 1091 pub const CRYPT_ENCODE_DECODE_NONE: ::LPCSTR = 0 as ::LPCSTR; 1092 pub const X509_CERT: ::LPCSTR = 1 as ::LPCSTR; 1093 pub const X509_CERT_TO_BE_SIGNED: ::LPCSTR = 2 as ::LPCSTR; 1094 pub const X509_CERT_CRL_TO_BE_SIGNED: ::LPCSTR = 3 as ::LPCSTR; 1095 pub const X509_CERT_REQUEST_TO_BE_SIGNED: ::LPCSTR = 4 as ::LPCSTR; 1096 pub const X509_EXTENSIONS: ::LPCSTR = 5 as ::LPCSTR; 1097 pub const X509_NAME_VALUE: ::LPCSTR = 6 as ::LPCSTR; 1098 pub const X509_NAME: ::LPCSTR = 7 as ::LPCSTR; 1099 pub const X509_PUBLIC_KEY_INFO: ::LPCSTR = 8 as ::LPCSTR; 1100 pub const X509_AUTHORITY_KEY_ID: ::LPCSTR = 9 as ::LPCSTR; 1101 pub const X509_KEY_ATTRIBUTES: ::LPCSTR = 10 as ::LPCSTR; 1102 pub const X509_KEY_USAGE_RESTRICTION: ::LPCSTR = 11 as ::LPCSTR; 1103 pub const X509_ALTERNATE_NAME: ::LPCSTR = 12 as ::LPCSTR; 1104 pub const X509_BASIC_CONSTRAINTS: ::LPCSTR = 13 as ::LPCSTR; 1105 pub const X509_KEY_USAGE: ::LPCSTR = 14 as ::LPCSTR; 1106 pub const X509_BASIC_CONSTRAINTS2: ::LPCSTR = 15 as ::LPCSTR; 1107 pub const X509_CERT_POLICIES: ::LPCSTR = 16 as ::LPCSTR; 1108 pub const PKCS_UTC_TIME: ::LPCSTR = 17 as ::LPCSTR; 1109 pub const PKCS_TIME_REQUEST: ::LPCSTR = 18 as ::LPCSTR; 1110 pub const RSA_CSP_PUBLICKEYBLOB: ::LPCSTR = 19 as ::LPCSTR; 1111 pub const X509_UNICODE_NAME: ::LPCSTR = 20 as ::LPCSTR; 1112 pub const X509_KEYGEN_REQUEST_TO_BE_SIGNED: ::LPCSTR = 21 as ::LPCSTR; 1113 pub const PKCS_ATTRIBUTE: ::LPCSTR = 22 as ::LPCSTR; 1114 pub const PKCS_CONTENT_INFO_SEQUENCE_OF_ANY: ::LPCSTR = 23 as ::LPCSTR; 1115 pub const X509_UNICODE_NAME_VALUE: ::LPCSTR = 24 as ::LPCSTR; 1116 pub const X509_ANY_STRING: ::LPCSTR = X509_NAME_VALUE; 1117 pub const X509_UNICODE_ANY_STRING: ::LPCSTR = X509_UNICODE_NAME_VALUE; 1118 pub const X509_OCTET_STRING: ::LPCSTR = 25 as ::LPCSTR; 1119 pub const X509_BITS: ::LPCSTR = 26 as ::LPCSTR; 1120 pub const X509_INTEGER: ::LPCSTR = 27 as ::LPCSTR; 1121 pub const X509_MULTI_BYTE_INTEGER: ::LPCSTR = 28 as ::LPCSTR; 1122 pub const X509_ENUMERATED: ::LPCSTR = 29 as ::LPCSTR; 1123 pub const X509_CHOICE_OF_TIME: ::LPCSTR = 30 as ::LPCSTR; 1124 pub const X509_AUTHORITY_KEY_ID2: ::LPCSTR = 31 as ::LPCSTR; 1125 pub const X509_AUTHORITY_INFO_ACCESS: ::LPCSTR = 32 as ::LPCSTR; 1126 pub const X509_SUBJECT_INFO_ACCESS: ::LPCSTR = X509_AUTHORITY_INFO_ACCESS; 1127 pub const X509_CRL_REASON_CODE: ::LPCSTR = X509_ENUMERATED; 1128 pub const PKCS_CONTENT_INFO: ::LPCSTR = 33 as ::LPCSTR; 1129 pub const X509_SEQUENCE_OF_ANY: ::LPCSTR = 34 as ::LPCSTR; 1130 pub const X509_CRL_DIST_POINTS: ::LPCSTR = 35 as ::LPCSTR; 1131 pub const X509_ENHANCED_KEY_USAGE: ::LPCSTR = 36 as ::LPCSTR; 1132 pub const PKCS_CTL: ::LPCSTR = 37 as ::LPCSTR; 1133 pub const X509_MULTI_BYTE_UINT: ::LPCSTR = 38 as ::LPCSTR; 1134 pub const X509_DSS_PUBLICKEY: ::LPCSTR = X509_MULTI_BYTE_UINT; 1135 pub const X509_DSS_PARAMETERS: ::LPCSTR = 39 as ::LPCSTR; 1136 pub const X509_DSS_SIGNATURE: ::LPCSTR = 40 as ::LPCSTR; 1137 pub const PKCS_RC2_CBC_PARAMETERS: ::LPCSTR = 41 as ::LPCSTR; 1138 pub const PKCS_SMIME_CAPABILITIES: ::LPCSTR = 42 as ::LPCSTR; 1139 pub const X509_QC_STATEMENTS_EXT: ::LPCSTR = 42 as ::LPCSTR; 1140 pub const PKCS_RSA_PRIVATE_KEY: ::LPCSTR = 43 as ::LPCSTR; 1141 pub const PKCS_PRIVATE_KEY_INFO: ::LPCSTR = 44 as ::LPCSTR; 1142 pub const PKCS_ENCRYPTED_PRIVATE_KEY_INFO: ::LPCSTR = 45 as ::LPCSTR; 1143 pub const X509_PKIX_POLICY_QUALIFIER_USERNOTICE: ::LPCSTR = 46 as ::LPCSTR; 1144 pub const X509_DH_PUBLICKEY: ::LPCSTR = X509_MULTI_BYTE_UINT; 1145 pub const X509_DH_PARAMETERS: ::LPCSTR = 47 as ::LPCSTR; 1146 pub const PKCS_ATTRIBUTES: ::LPCSTR = 48 as ::LPCSTR; 1147 pub const PKCS_SORTED_CTL: ::LPCSTR = 49 as ::LPCSTR; 1148 pub const X509_ECC_SIGNATURE: ::LPCSTR = 47 as ::LPCSTR; 1149 pub const X942_DH_PARAMETERS: ::LPCSTR = 50 as ::LPCSTR; 1150 pub const X509_BITS_WITHOUT_TRAILING_ZEROES: ::LPCSTR = 51 as ::LPCSTR; 1151 pub const X942_OTHER_INFO: ::LPCSTR = 52 as ::LPCSTR; 1152 pub const X509_CERT_PAIR: ::LPCSTR = 53 as ::LPCSTR; 1153 pub const X509_ISSUING_DIST_POINT: ::LPCSTR = 54 as ::LPCSTR; 1154 pub const X509_NAME_CONSTRAINTS: ::LPCSTR = 55 as ::LPCSTR; 1155 pub const X509_POLICY_MAPPINGS: ::LPCSTR = 56 as ::LPCSTR; 1156 pub const X509_POLICY_CONSTRAINTS: ::LPCSTR = 57 as ::LPCSTR; 1157 pub const X509_CROSS_CERT_DIST_POINTS: ::LPCSTR = 58 as ::LPCSTR; 1158 pub const CMC_DATA: ::LPCSTR = 59 as ::LPCSTR; 1159 pub const CMC_RESPONSE: ::LPCSTR = 60 as ::LPCSTR; 1160 pub const CMC_STATUS: ::LPCSTR = 61 as ::LPCSTR; 1161 pub const CMC_ADD_EXTENSIONS: ::LPCSTR = 62 as ::LPCSTR; 1162 pub const CMC_ADD_ATTRIBUTES: ::LPCSTR = 63 as ::LPCSTR; 1163 pub const X509_CERTIFICATE_TEMPLATE: ::LPCSTR = 64 as ::LPCSTR; 1164 pub const OCSP_SIGNED_REQUEST: ::LPCSTR = 65 as ::LPCSTR; 1165 pub const OCSP_REQUEST: ::LPCSTR = 66 as ::LPCSTR; 1166 pub const OCSP_RESPONSE: ::LPCSTR = 67 as ::LPCSTR; 1167 pub const OCSP_BASIC_SIGNED_RESPONSE: ::LPCSTR = 68 as ::LPCSTR; 1168 pub const OCSP_BASIC_RESPONSE: ::LPCSTR = 69 as ::LPCSTR; 1169 pub const X509_LOGOTYPE_EXT: ::LPCSTR = 70 as ::LPCSTR; 1170 pub const X509_BIOMETRIC_EXT: ::LPCSTR = 71 as ::LPCSTR; 1171 pub const CNG_RSA_PUBLIC_KEY_BLOB: ::LPCSTR = 72 as ::LPCSTR; 1172 pub const X509_OBJECT_IDENTIFIER: ::LPCSTR = 73 as ::LPCSTR; 1173 pub const X509_ALGORITHM_IDENTIFIER: ::LPCSTR = 74 as ::LPCSTR; 1174 pub const PKCS_RSA_SSA_PSS_PARAMETERS: ::LPCSTR = 75 as ::LPCSTR; 1175 pub const PKCS_RSAES_OAEP_PARAMETERS: ::LPCSTR = 76 as ::LPCSTR; 1176 pub const ECC_CMS_SHARED_INFO: ::LPCSTR = 77 as ::LPCSTR; 1177 pub const TIMESTAMP_REQUEST: ::LPCSTR = 78 as ::LPCSTR; 1178 pub const TIMESTAMP_RESPONSE: ::LPCSTR = 79 as ::LPCSTR; 1179 pub const TIMESTAMP_INFO: ::LPCSTR = 80 as ::LPCSTR; 1180 pub const X509_CERT_BUNDLE: ::LPCSTR = 81 as ::LPCSTR; 1181 pub const X509_ECC_PRIVATE_KEY: ::LPCSTR = 82 as ::LPCSTR; 1182 pub const CNG_RSA_PRIVATE_KEY_BLOB: ::LPCSTR = 83 as ::LPCSTR; 1183 pub const X509_SUBJECT_DIR_ATTRS: ::LPCSTR = 84 as ::LPCSTR; 1184 pub const PKCS7_SIGNER_INFO: ::LPCSTR = 500 as ::LPCSTR; 1185 pub const CMS_SIGNER_INFO: ::LPCSTR = 501 as ::LPCSTR; 1186 pub const szOID_AUTHORITY_KEY_IDENTIFIER: &'static str = "2.5.29.1"; 1187 pub const szOID_KEY_ATTRIBUTES: &'static str = "2.5.29.2"; 1188 pub const szOID_CERT_POLICIES_95: &'static str = "2.5.29.3"; 1189 pub const szOID_KEY_USAGE_RESTRICTION: &'static str = "2.5.29.4"; 1190 pub const szOID_SUBJECT_ALT_NAME: &'static str = "2.5.29.7"; 1191 pub const szOID_ISSUER_ALT_NAME: &'static str = "2.5.29.8"; 1192 pub const szOID_BASIC_CONSTRAINTS: &'static str = "2.5.29.10"; 1193 pub const szOID_KEY_USAGE: &'static str = "2.5.29.15"; 1194 pub const szOID_PRIVATEKEY_USAGE_PERIOD: &'static str = "2.5.29.16"; 1195 pub const szOID_BASIC_CONSTRAINTS2: &'static str = "2.5.29.19"; 1196 pub const szOID_CERT_POLICIES: &'static str = "2.5.29.32"; 1197 pub const szOID_ANY_CERT_POLICY: &'static str = "2.5.29.32.0"; 1198 pub const szOID_INHIBIT_ANY_POLICY: &'static str = "2.5.29.54"; 1199 pub const szOID_AUTHORITY_KEY_IDENTIFIER2: &'static str = "2.5.29.35"; 1200 pub const szOID_SUBJECT_KEY_IDENTIFIER: &'static str = "2.5.29.14"; 1201 pub const szOID_SUBJECT_ALT_NAME2: &'static str = "2.5.29.17"; 1202 pub const szOID_ISSUER_ALT_NAME2: &'static str = "2.5.29.18"; 1203 pub const szOID_CRL_REASON_CODE: &'static str = "2.5.29.21"; 1204 pub const szOID_REASON_CODE_HOLD: &'static str = "2.5.29.23"; 1205 pub const szOID_CRL_DIST_POINTS: &'static str = "2.5.29.31"; 1206 pub const szOID_ENHANCED_KEY_USAGE: &'static str = "2.5.29.37"; 1207 pub const szOID_ANY_ENHANCED_KEY_USAGE: &'static str = "2.5.29.37.0"; 1208 pub const szOID_CRL_NUMBER: &'static str = "2.5.29.20"; 1209 pub const szOID_DELTA_CRL_INDICATOR: &'static str = "2.5.29.27"; 1210 pub const szOID_ISSUING_DIST_POINT: &'static str = "2.5.29.28"; 1211 pub const szOID_FRESHEST_CRL: &'static str = "2.5.29.46"; 1212 pub const szOID_NAME_CONSTRAINTS: &'static str = "2.5.29.30"; 1213 pub const szOID_POLICY_MAPPINGS: &'static str = "2.5.29.33"; 1214 pub const szOID_LEGACY_POLICY_MAPPINGS: &'static str = "2.5.29.5"; 1215 pub const szOID_POLICY_CONSTRAINTS: &'static str = "2.5.29.36"; 1216 pub const szOID_RENEWAL_CERTIFICATE: &'static str = "1.3.6.1.4.1.311.13.1"; 1217 pub const szOID_ENROLLMENT_NAME_VALUE_PAIR: &'static str = "1.3.6.1.4.1.311.13.2.1"; 1218 pub const szOID_ENROLLMENT_CSP_PROVIDER: &'static str = "1.3.6.1.4.1.311.13.2.2"; 1219 pub const szOID_OS_VERSION: &'static str = "1.3.6.1.4.1.311.13.2.3"; 1220 pub const szOID_ENROLLMENT_AGENT: &'static str = "1.3.6.1.4.1.311.20.2.1"; 1221 pub const szOID_PKIX: &'static str = "1.3.6.1.5.5.7"; 1222 pub const szOID_PKIX_PE: &'static str = "1.3.6.1.5.5.7.1"; 1223 pub const szOID_AUTHORITY_INFO_ACCESS: &'static str = "1.3.6.1.5.5.7.1.1"; 1224 pub const szOID_SUBJECT_INFO_ACCESS: &'static str = "1.3.6.1.5.5.7.1.11"; 1225 pub const szOID_BIOMETRIC_EXT: &'static str = "1.3.6.1.5.5.7.1.2"; 1226 pub const szOID_QC_STATEMENTS_EXT: &'static str = "1.3.6.1.5.5.7.1.3"; 1227 pub const szOID_LOGOTYPE_EXT: &'static str = "1.3.6.1.5.5.7.1.12"; 1228 pub const szOID_CERT_EXTENSIONS: &'static str = "1.3.6.1.4.1.311.2.1.14"; 1229 pub const szOID_NEXT_UPDATE_LOCATION: &'static str = "1.3.6.1.4.1.311.10.2"; 1230 pub const szOID_REMOVE_CERTIFICATE: &'static str = "1.3.6.1.4.1.311.10.8.1"; 1231 pub const szOID_CROSS_CERT_DIST_POINTS: &'static str = "1.3.6.1.4.1.311.10.9.1"; 1232 pub const szOID_CTL: &'static str = "1.3.6.1.4.1.311.10.1"; 1233 pub const szOID_SORTED_CTL: &'static str = "1.3.6.1.4.1.311.10.1.1"; 1234 pub const szOID_SERIALIZED: &'static str = "1.3.6.1.4.1.311.10.3.3.1"; 1235 pub const szOID_NT_PRINCIPAL_NAME: &'static str = "1.3.6.1.4.1.311.20.2.3"; 1236 pub const szOID_INTERNATIONALIZED_EMAIL_ADDRESS: &'static str = "1.3.6.1.4.1.311.20.2.4"; 1237 pub const szOID_PRODUCT_UPDATE: &'static str = "1.3.6.1.4.1.311.31.1"; 1238 pub const szOID_ANY_APPLICATION_POLICY: &'static str = "1.3.6.1.4.1.311.10.12.1"; 1239 pub const szOID_AUTO_ENROLL_CTL_USAGE: &'static str = "1.3.6.1.4.1.311.20.1"; 1240 pub const szOID_ENROLL_CERTTYPE_EXTENSION: &'static str = "1.3.6.1.4.1.311.20.2"; 1241 pub const szOID_CERT_MANIFOLD: &'static str = "1.3.6.1.4.1.311.20.3"; 1242 pub const szOID_CERTSRV_CA_VERSION: &'static str = "1.3.6.1.4.1.311.21.1"; 1243 pub const szOID_CERTSRV_PREVIOUS_CERT_HASH: &'static str = "1.3.6.1.4.1.311.21.2"; 1244 pub const szOID_CRL_VIRTUAL_BASE: &'static str = "1.3.6.1.4.1.311.21.3"; 1245 pub const szOID_CRL_NEXT_PUBLISH: &'static str = "1.3.6.1.4.1.311.21.4"; 1246 pub const szOID_KP_CA_EXCHANGE: &'static str = "1.3.6.1.4.1.311.21.5"; 1247 pub const szOID_KP_KEY_RECOVERY_AGENT: &'static str = "1.3.6.1.4.1.311.21.6"; 1248 pub const szOID_CERTIFICATE_TEMPLATE: &'static str = "1.3.6.1.4.1.311.21.7"; 1249 pub const szOID_ENTERPRISE_OID_ROOT: &'static str = "1.3.6.1.4.1.311.21.8"; 1250 pub const szOID_RDN_DUMMY_SIGNER: &'static str = "1.3.6.1.4.1.311.21.9"; 1251 pub const szOID_APPLICATION_CERT_POLICIES: &'static str = "1.3.6.1.4.1.311.21.10"; 1252 pub const szOID_APPLICATION_POLICY_MAPPINGS: &'static str = "1.3.6.1.4.1.311.21.11"; 1253 pub const szOID_APPLICATION_POLICY_CONSTRAINTS: &'static str = "1.3.6.1.4.1.311.21.12"; 1254 pub const szOID_ARCHIVED_KEY_ATTR: &'static str = "1.3.6.1.4.1.311.21.13"; 1255 pub const szOID_CRL_SELF_CDP: &'static str = "1.3.6.1.4.1.311.21.14"; 1256 pub const szOID_REQUIRE_CERT_CHAIN_POLICY: &'static str = "1.3.6.1.4.1.311.21.15"; 1257 pub const szOID_ARCHIVED_KEY_CERT_HASH: &'static str = "1.3.6.1.4.1.311.21.16"; 1258 pub const szOID_ISSUED_CERT_HASH: &'static str = "1.3.6.1.4.1.311.21.17"; 1259 pub const szOID_DS_EMAIL_REPLICATION: &'static str = "1.3.6.1.4.1.311.21.19"; 1260 pub const szOID_REQUEST_CLIENT_INFO: &'static str = "1.3.6.1.4.1.311.21.20"; 1261 pub const szOID_ENCRYPTED_KEY_HASH: &'static str = "1.3.6.1.4.1.311.21.21"; 1262 pub const szOID_CERTSRV_CROSSCA_VERSION: &'static str = "1.3.6.1.4.1.311.21.22"; 1263 pub const szOID_NTDS_REPLICATION: &'static str = "1.3.6.1.4.1.311.25.1"; 1264 pub const szOID_SUBJECT_DIR_ATTRS: &'static str = "2.5.29.9"; 1265 pub const szOID_PKIX_KP: &'static str = "1.3.6.1.5.5.7.3"; 1266 pub const szOID_PKIX_KP_SERVER_AUTH: &'static str = "1.3.6.1.5.5.7.3.1"; 1267 pub const szOID_PKIX_KP_CLIENT_AUTH: &'static str = "1.3.6.1.5.5.7.3.2"; 1268 pub const szOID_PKIX_KP_CODE_SIGNING: &'static str = "1.3.6.1.5.5.7.3.3"; 1269 pub const szOID_PKIX_KP_EMAIL_PROTECTION: &'static str = "1.3.6.1.5.5.7.3.4"; 1270 pub const szOID_PKIX_KP_IPSEC_END_SYSTEM: &'static str = "1.3.6.1.5.5.7.3.5"; 1271 pub const szOID_PKIX_KP_IPSEC_TUNNEL: &'static str = "1.3.6.1.5.5.7.3.6"; 1272 pub const szOID_PKIX_KP_IPSEC_USER: &'static str = "1.3.6.1.5.5.7.3.7"; 1273 pub const szOID_PKIX_KP_TIMESTAMP_SIGNING: &'static str = "1.3.6.1.5.5.7.3.8"; 1274 pub const szOID_PKIX_KP_OCSP_SIGNING: &'static str = "1.3.6.1.5.5.7.3.9"; 1275 pub const szOID_PKIX_OCSP_NOCHECK: &'static str = "1.3.6.1.5.5.7.48.1.5"; 1276 pub const szOID_PKIX_OCSP_NONCE: &'static str = "1.3.6.1.5.5.7.48.1.2"; 1277 pub const szOID_IPSEC_KP_IKE_INTERMEDIATE: &'static str = "1.3.6.1.5.5.8.2.2"; 1278 pub const szOID_PKINIT_KP_KDC: &'static str = "1.3.6.1.5.2.3.5"; 1279 pub const szOID_KP_CTL_USAGE_SIGNING: &'static str = "1.3.6.1.4.1.311.10.3.1"; 1280 pub const szOID_KP_TIME_STAMP_SIGNING: &'static str = "1.3.6.1.4.1.311.10.3.2"; 1281 pub const szOID_SERVER_GATED_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.3"; 1282 pub const szOID_SGC_NETSCAPE: &'static str = "2.16.840.1.113730.4.1"; 1283 pub const szOID_KP_EFS: &'static str = "1.3.6.1.4.1.311.10.3.4"; 1284 pub const szOID_EFS_RECOVERY: &'static str = "1.3.6.1.4.1.311.10.3.4.1"; 1285 pub const szOID_WHQL_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.5"; 1286 pub const szOID_NT5_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.6"; 1287 pub const szOID_OEM_WHQL_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.7"; 1288 pub const szOID_EMBEDDED_NT_CRYPTO: &'static str = "1.3.6.1.4.1.311.10.3.8"; 1289 pub const szOID_ROOT_LIST_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.9"; 1290 pub const szOID_KP_QUALIFIED_SUBORDINATION: &'static str = "1.3.6.1.4.1.311.10.3.10"; 1291 pub const szOID_KP_KEY_RECOVERY: &'static str = "1.3.6.1.4.1.311.10.3.11"; 1292 pub const szOID_KP_DOCUMENT_SIGNING: &'static str = "1.3.6.1.4.1.311.10.3.12"; 1293 pub const szOID_KP_LIFETIME_SIGNING: &'static str = "1.3.6.1.4.1.311.10.3.13"; 1294 pub const szOID_KP_MOBILE_DEVICE_SOFTWARE: &'static str = "1.3.6.1.4.1.311.10.3.14"; 1295 pub const szOID_KP_SMART_DISPLAY: &'static str = "1.3.6.1.4.1.311.10.3.15"; 1296 pub const szOID_KP_CSP_SIGNATURE: &'static str = "1.3.6.1.4.1.311.10.3.16"; 1297 pub const szOID_DRM: &'static str = "1.3.6.1.4.1.311.10.5.1"; 1298 pub const szOID_DRM_INDIVIDUALIZATION: &'static str = "1.3.6.1.4.1.311.10.5.2"; 1299 pub const szOID_LICENSES: &'static str = "1.3.6.1.4.1.311.10.6.1"; 1300 pub const szOID_LICENSE_SERVER: &'static str = "1.3.6.1.4.1.311.10.6.2"; 1301 pub const szOID_KP_SMARTCARD_LOGON: &'static str = "1.3.6.1.4.1.311.20.2.2"; 1302 pub const szOID_KP_KERNEL_MODE_CODE_SIGNING: &'static str = "1.3.6.1.4.1.311.61.1.1"; 1303 pub const szOID_KP_KERNEL_MODE_TRUSTED_BOOT_SIGNING: &'static str = "1.3.6.1.4.1.311.61.4.1"; 1304 pub const szOID_REVOKED_LIST_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.19"; 1305 pub const szOID_WINDOWS_KITS_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.20"; 1306 pub const szOID_WINDOWS_RT_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.21"; 1307 pub const szOID_PROTECTED_PROCESS_LIGHT_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.22"; 1308 pub const szOID_WINDOWS_TCB_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.23"; 1309 pub const szOID_PROTECTED_PROCESS_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.24"; 1310 pub const szOID_WINDOWS_THIRD_PARTY_COMPONENT_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.25"; 1311 pub const szOID_WINDOWS_SOFTWARE_EXTENSION_SIGNER: &'static str = "1.3.6.1.4.1.311.10.3.26"; 1312 pub const szOID_DISALLOWED_LIST: &'static str = "1.3.6.1.4.1.311.10.3.30"; 1313 pub const szOID_SYNC_ROOT_CTL_EXT: &'static str = "1.3.6.1.4.1.311.10.3.50"; 1314 pub const szOID_KP_KERNEL_MODE_HAL_EXTENSION_SIGNING: &'static str = "1.3.6.1.4.1.311.61.5.1"; 1315 pub const szOID_WINDOWS_STORE_SIGNER: &'static str = "1.3.6.1.4.1.311.76.3.1"; 1316 pub const szOID_DYNAMIC_CODE_GEN_SIGNER: &'static str = "1.3.6.1.4.1.311.76.5.1"; 1317 pub const szOID_MICROSOFT_PUBLISHER_SIGNER: &'static str = "1.3.6.1.4.1.311.76.8.1"; 1318 pub const szOID_YESNO_TRUST_ATTR: &'static str = "1.3.6.1.4.1.311.10.4.1"; 1319 pub const szOID_PKIX_POLICY_QUALIFIER_CPS: &'static str = "1.3.6.1.5.5.7.2.1"; 1320 pub const szOID_PKIX_POLICY_QUALIFIER_USERNOTICE: &'static str = "1.3.6.1.5.5.7.2.2"; 1321 pub const szOID_ROOT_PROGRAM_FLAGS: &'static str = "1.3.6.1.4.1.311.60.1.1"; 1322 //6992 1323 pub type HCRYPTMSG = *mut ::c_void; 1324 //9353 1325 pub type HCERTSTORE = *mut ::c_void; 1326 STRUCT!{struct CERT_CONTEXT { 1327 dwCertEncodingType: ::DWORD, 1328 pbCertEncoded: *mut ::BYTE, 1329 cbCertEncoded: ::DWORD, 1330 pCertInfo: ::PCERT_INFO, 1331 hCertStore: HCERTSTORE, 1332 }} 1333 pub type PCERT_CONTEXT = *mut CERT_CONTEXT; 1334 pub type PCCERT_CONTEXT = *const CERT_CONTEXT; 1335 STRUCT!{struct CRL_CONTEXT { 1336 dwCertEncodingType: ::DWORD, 1337 pbCrlEncoded: *mut ::BYTE, 1338 cbCrlEncoded: ::DWORD, 1339 pCrlInfo: ::PCRL_INFO, 1340 hCertStore: HCERTSTORE, 1341 }} 1342 pub type PCRL_CONTEXT = *mut CRL_CONTEXT; 1343 pub type PCCRL_CONTEXT = *const CRL_CONTEXT; 1344 STRUCT!{struct CTL_CONTEXT { 1345 dwMsgAndCertEncodingType: ::DWORD, 1346 pbCtlEncoded: *mut ::BYTE, 1347 cbCtlEncoded: ::DWORD, 1348 pCtlInfo: ::PCTL_INFO, 1349 hCertStore: HCERTSTORE, 1350 hCryptMsg: HCRYPTMSG, 1351 pbCtlContent: *mut ::BYTE, 1352 cbCtlContent: ::DWORD, 1353 }} 1354 pub type PCTL_CONTEXT = *mut CTL_CONTEXT; 1355 pub type PCCTL_CONTEXT = *const CTL_CONTEXT; 1356 pub const CERT_STORE_PROV_MSG: ::DWORD = 1; 1357 pub const CERT_STORE_PROV_MEMORY: ::DWORD = 2; 1358 pub const CERT_STORE_PROV_FILE: ::DWORD = 3; 1359 pub const CERT_STORE_PROV_REG: ::DWORD = 4; 1360 pub const CERT_STORE_PROV_PKCS7: ::DWORD = 5; 1361 pub const CERT_STORE_PROV_SERIALIZED: ::DWORD = 6; 1362 pub const CERT_STORE_PROV_FILENAME_A: ::DWORD = 7; 1363 pub const CERT_STORE_PROV_FILENAME_W: ::DWORD = 8; 1364 pub const CERT_STORE_PROV_FILENAME: ::DWORD = CERT_STORE_PROV_FILENAME_W; 1365 pub const CERT_STORE_PROV_SYSTEM_A: ::DWORD = 9; 1366 pub const CERT_STORE_PROV_SYSTEM_W: ::DWORD = 10; 1367 pub const CERT_STORE_PROV_SYSTEM: ::DWORD = CERT_STORE_PROV_SYSTEM_W; 1368 pub const CERT_STORE_PROV_COLLECTION: ::DWORD = 11; 1369 pub const CERT_STORE_PROV_SYSTEM_REGISTRY_A: ::DWORD = 12; 1370 pub const CERT_STORE_PROV_SYSTEM_REGISTRY_W: ::DWORD = 13; 1371 pub const CERT_STORE_PROV_SYSTEM_REGISTRY: ::DWORD = CERT_STORE_PROV_SYSTEM_REGISTRY_W; 1372 pub const CERT_STORE_PROV_PHYSICAL_W: ::DWORD = 14; 1373 pub const CERT_STORE_PROV_PHYSICAL: ::DWORD = CERT_STORE_PROV_PHYSICAL_W; 1374 pub const CERT_STORE_PROV_SMART_CARD_W: ::DWORD = 15; 1375 pub const CERT_STORE_PROV_SMART_CARD: ::DWORD = CERT_STORE_PROV_SMART_CARD_W; 1376 pub const CERT_STORE_PROV_LDAP_W: ::DWORD = 16; 1377 pub const CERT_STORE_PROV_LDAP: ::DWORD = CERT_STORE_PROV_LDAP_W; 1378 pub const CERT_STORE_NO_CRYPT_RELEASE_FLAG: ::DWORD = 0x00000001; 1379 pub const CERT_STORE_SET_LOCALIZED_NAME_FLAG: ::DWORD = 0x00000002; 1380 pub const CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG: ::DWORD = 0x00000004; 1381 pub const CERT_STORE_DELETE_FLAG: ::DWORD = 0x00000010; 1382 pub const CERT_STORE_SHARE_STORE_FLAG: ::DWORD = 0x00000040; 1383 pub const CERT_STORE_SHARE_CONTEXT_FLAG: ::DWORD = 0x00000080; 1384 pub const CERT_STORE_MANIFOLD_FLAG: ::DWORD = 0x00000100; 1385 pub const CERT_STORE_ENUM_ARCHIVED_FLAG: ::DWORD = 0x00000200; 1386 pub const CERT_STORE_UPDATE_KEYID_FLAG: ::DWORD = 0x00000400; 1387 pub const CERT_STORE_BACKUP_RESTORE_FLAG: ::DWORD = 0x00000800; 1388 pub const CERT_STORE_READONLY_FLAG: ::DWORD = 0x00008000; 1389 pub const CERT_STORE_OPEN_EXISTING_FLAG: ::DWORD = 0x00004000; 1390 pub const CERT_STORE_CREATE_NEW_FLAG: ::DWORD = 0x00002000; 1391 pub const CERT_STORE_MAXIMUM_ALLOWED_FLAG: ::DWORD = 0x00001000; 1392 pub const CERT_SYSTEM_STORE_UNPROTECTED_FLAG: ::DWORD = 0x40000000; 1393 pub const CERT_SYSTEM_STORE_LOCATION_MASK: ::DWORD = 0x00FF0000; 1394 pub const CERT_SYSTEM_STORE_LOCATION_SHIFT: ::DWORD = 16; 1395 pub const CERT_SYSTEM_STORE_CURRENT_USER_ID: ::DWORD = 1; 1396 pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_ID: ::DWORD = 2; 1397 pub const CERT_SYSTEM_STORE_CURRENT_SERVICE_ID: ::DWORD = 4; 1398 pub const CERT_SYSTEM_STORE_SERVICES_ID: ::DWORD = 5; 1399 pub const CERT_SYSTEM_STORE_USERS_ID: ::DWORD = 6; 1400 pub const CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID: ::DWORD = 7; 1401 pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID: ::DWORD = 8; 1402 pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID: ::DWORD = 9; 1403 pub const CERT_SYSTEM_STORE_CURRENT_USER: ::DWORD = CERT_SYSTEM_STORE_CURRENT_USER_ID 1404 << CERT_SYSTEM_STORE_LOCATION_SHIFT; 1405 pub const CERT_SYSTEM_STORE_LOCAL_MACHINE: ::DWORD = CERT_SYSTEM_STORE_LOCAL_MACHINE_ID 1406 << CERT_SYSTEM_STORE_LOCATION_SHIFT; 1407 pub const CERT_SYSTEM_STORE_CURRENT_SERVICE: ::DWORD = CERT_SYSTEM_STORE_CURRENT_SERVICE_ID 1408 << CERT_SYSTEM_STORE_LOCATION_SHIFT; 1409 pub const CERT_SYSTEM_STORE_SERVICES: ::DWORD = CERT_SYSTEM_STORE_SERVICES_ID 1410 << CERT_SYSTEM_STORE_LOCATION_SHIFT; 1411 pub const CERT_SYSTEM_STORE_USERS: ::DWORD = CERT_SYSTEM_STORE_USERS_ID 1412 << CERT_SYSTEM_STORE_LOCATION_SHIFT; 1413 pub const CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY: ::DWORD = 1414 CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID << CERT_SYSTEM_STORE_LOCATION_SHIFT; 1415 pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY: ::DWORD = 1416 CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID << CERT_SYSTEM_STORE_LOCATION_SHIFT; 1417 pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE: ::DWORD = 1418 CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID << CERT_SYSTEM_STORE_LOCATION_SHIFT; 1419 pub const CERT_NAME_EMAIL_TYPE: ::DWORD = 1; 1420 pub const CERT_NAME_RDN_TYPE: ::DWORD = 2; 1421 pub const CERT_NAME_ATTR_TYPE: ::DWORD = 3; 1422 pub const CERT_NAME_SIMPLE_DISPLAY_TYPE: ::DWORD = 4; 1423 pub const CERT_NAME_FRIENDLY_DISPLAY_TYPE: ::DWORD = 5; 1424 pub const CERT_NAME_DNS_TYPE: ::DWORD = 6; 1425 pub const CERT_NAME_URL_TYPE: ::DWORD = 7; 1426 pub const CERT_NAME_UPN_TYPE: ::DWORD = 8; 1427 pub const CERT_SIMPLE_NAME_STR: ::DWORD = 1; 1428 pub const CERT_OID_NAME_STR: ::DWORD = 2; 1429 pub const CERT_X500_NAME_STR: ::DWORD = 3; 1430 1431 pub const CERT_NAME_STR_SEMICOLON_FLAG: ::DWORD = 0x40000000; 1432 pub const CERT_NAME_STR_NO_PLUS_FLAG: ::DWORD = 0x20000000; 1433 pub const CERT_NAME_STR_NO_QUOTING_FLAG: ::DWORD = 0x10000000; 1434 pub const CERT_NAME_STR_CRLF_FLAG: ::DWORD = 0x08000000; 1435 pub const CERT_NAME_STR_COMMA_FLAG: ::DWORD = 0x04000000; 1436 pub const CERT_NAME_STR_REVERSE_FLAG: ::DWORD = 0x02000000; 1437 1438 pub const CERT_NAME_ISSUER_FLAG: ::DWORD = 0x1; 1439 pub const CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG: ::DWORD = 0x00010000; 1440 pub const CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG: ::DWORD = 0x00020000; 1441 pub const CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG: ::DWORD = 0x00040000; 1442 pub const CERT_NAME_STR_FORCE_UTF8_DIR_STR_FLAG: ::DWORD = 0x00080000; 1443 pub const CERT_DELETE_KEYSET_PROP_ID: ::DWORD = 101; 1444 pub const CERT_COMPARE_MASK: ::DWORD = 0xFFFF; 1445 pub const CERT_COMPARE_SHIFT: ::DWORD = 16; 1446 pub const CERT_COMPARE_ANY: ::DWORD = 0; 1447 pub const CERT_COMPARE_SHA1_HASH: ::DWORD = 1; 1448 pub const CERT_COMPARE_NAME: ::DWORD = 2; 1449 pub const CERT_COMPARE_ATTR: ::DWORD = 3; 1450 pub const CERT_COMPARE_MD5_HASH: ::DWORD = 4; 1451 pub const CERT_COMPARE_PROPERTY: ::DWORD = 5; 1452 pub const CERT_COMPARE_PUBLIC_KEY: ::DWORD = 6; 1453 pub const CERT_COMPARE_HASH: ::DWORD = CERT_COMPARE_SHA1_HASH; 1454 pub const CERT_COMPARE_NAME_STR_A: ::DWORD = 7; 1455 pub const CERT_COMPARE_NAME_STR_W: ::DWORD = 8; 1456 pub const CERT_COMPARE_KEY_SPEC: ::DWORD = 9; 1457 pub const CERT_COMPARE_ENHKEY_USAGE: ::DWORD = 10; 1458 pub const CERT_COMPARE_CTL_USAGE: ::DWORD = CERT_COMPARE_ENHKEY_USAGE; 1459 pub const CERT_COMPARE_SUBJECT_CERT: ::DWORD = 11; 1460 pub const CERT_COMPARE_ISSUER_OF: ::DWORD = 12; 1461 pub const CERT_COMPARE_EXISTING: ::DWORD = 13; 1462 pub const CERT_COMPARE_SIGNATURE_HASH: ::DWORD = 14; 1463 pub const CERT_COMPARE_KEY_IDENTIFIER: ::DWORD = 15; 1464 pub const CERT_COMPARE_CERT_ID: ::DWORD = 16; 1465 pub const CERT_COMPARE_CROSS_CERT_DIST_POINTS: ::DWORD = 17; 1466 pub const CERT_COMPARE_PUBKEY_MD5_HASH: ::DWORD = 18; 1467 pub const CERT_FIND_ANY: ::DWORD = CERT_COMPARE_ANY << CERT_COMPARE_SHIFT; 1468 pub const CERT_FIND_SHA1_HASH: ::DWORD = CERT_COMPARE_SHA1_HASH << CERT_COMPARE_SHIFT; 1469 pub const CERT_FIND_MD5_HASH: ::DWORD = CERT_COMPARE_MD5_HASH << CERT_COMPARE_SHIFT; 1470 pub const CERT_FIND_SIGNATURE_HASH: ::DWORD = CERT_COMPARE_SIGNATURE_HASH << CERT_COMPARE_SHIFT; 1471 pub const CERT_FIND_KEY_IDENTIFIER: ::DWORD = CERT_COMPARE_KEY_IDENTIFIER << CERT_COMPARE_SHIFT; 1472 pub const CERT_FIND_HASH: ::DWORD = CERT_FIND_SHA1_HASH; 1473 pub const CERT_FIND_PROPERTY: ::DWORD = CERT_COMPARE_PROPERTY << CERT_COMPARE_SHIFT; 1474 pub const CERT_FIND_PUBLIC_KEY: ::DWORD = CERT_COMPARE_PUBLIC_KEY << CERT_COMPARE_SHIFT; 1475 pub const CERT_FIND_SUBJECT_NAME: ::DWORD = (CERT_COMPARE_NAME << CERT_COMPARE_SHIFT) 1476 | CERT_INFO_SUBJECT_FLAG; 1477 pub const CERT_FIND_SUBJECT_ATTR: ::DWORD = (CERT_COMPARE_ATTR << CERT_COMPARE_SHIFT) 1478 | CERT_INFO_SUBJECT_FLAG; 1479 pub const CERT_FIND_ISSUER_NAME: ::DWORD = (CERT_COMPARE_NAME << CERT_COMPARE_SHIFT) 1480 | CERT_INFO_ISSUER_FLAG; 1481 pub const CERT_FIND_ISSUER_ATTR: ::DWORD = (CERT_COMPARE_ATTR << CERT_COMPARE_SHIFT) 1482 | CERT_INFO_ISSUER_FLAG; 1483 pub const CERT_FIND_SUBJECT_STR_A: ::DWORD = (CERT_COMPARE_NAME_STR_A << CERT_COMPARE_SHIFT) 1484 | CERT_INFO_SUBJECT_FLAG; 1485 pub const CERT_FIND_SUBJECT_STR_W: ::DWORD = (CERT_COMPARE_NAME_STR_W << CERT_COMPARE_SHIFT) 1486 | CERT_INFO_SUBJECT_FLAG; 1487 pub const CERT_FIND_SUBJECT_STR: ::DWORD = CERT_FIND_SUBJECT_STR_W; 1488 pub const CERT_FIND_ISSUER_STR_A: ::DWORD = (CERT_COMPARE_NAME_STR_A << CERT_COMPARE_SHIFT) 1489 | CERT_INFO_ISSUER_FLAG; 1490 pub const CERT_FIND_ISSUER_STR_W: ::DWORD = (CERT_COMPARE_NAME_STR_W << CERT_COMPARE_SHIFT) 1491 | CERT_INFO_ISSUER_FLAG; 1492 pub const CERT_FIND_ISSUER_STR: ::DWORD = CERT_FIND_ISSUER_STR_W; 1493 pub const CERT_FIND_KEY_SPEC: ::DWORD = CERT_COMPARE_KEY_SPEC << CERT_COMPARE_SHIFT; 1494 pub const CERT_FIND_ENHKEY_USAGE: ::DWORD = CERT_COMPARE_ENHKEY_USAGE << CERT_COMPARE_SHIFT; 1495 pub const CERT_FIND_CTL_USAGE: ::DWORD = CERT_FIND_ENHKEY_USAGE; 1496 pub const CERT_FIND_SUBJECT_CERT: ::DWORD = CERT_COMPARE_SUBJECT_CERT << CERT_COMPARE_SHIFT; 1497 pub const CERT_FIND_ISSUER_OF: ::DWORD = CERT_COMPARE_ISSUER_OF << CERT_COMPARE_SHIFT; 1498 pub const CERT_FIND_EXISTING: ::DWORD = CERT_COMPARE_EXISTING << CERT_COMPARE_SHIFT; 1499 pub const CERT_FIND_CERT_ID: ::DWORD = CERT_COMPARE_CERT_ID << CERT_COMPARE_SHIFT; 1500 pub const CERT_FIND_CROSS_CERT_DIST_POINTS: ::DWORD = CERT_COMPARE_CROSS_CERT_DIST_POINTS 1501 << CERT_COMPARE_SHIFT; 1502 pub const CERT_FIND_PUBKEY_MD5_HASH: ::DWORD = CERT_COMPARE_PUBKEY_MD5_HASH << CERT_COMPARE_SHIFT; 1503 pub const CERT_ENCIPHER_ONLY_KEY_USAGE: ::DWORD = 0x0001; 1504 pub const CERT_CRL_SIGN_KEY_USAGE: ::DWORD = 0x0002; 1505 pub const CERT_KEY_CERT_SIGN_KEY_USAGE: ::DWORD = 0x0004; 1506 pub const CERT_KEY_AGREEMENT_KEY_USAGE: ::DWORD = 0x0008; 1507 pub const CERT_DATA_ENCIPHERMENT_KEY_USAGE: ::DWORD = 0x0010; 1508 pub const CERT_KEY_ENCIPHERMENT_KEY_USAGE: ::DWORD = 0x0020; 1509 pub const CERT_NON_REPUDIATION_KEY_USAGE: ::DWORD = 0x0040; 1510 pub const CERT_DIGITAL_SIGNATURE_KEY_USAGE: ::DWORD = 0x0080; 1511 pub const CERT_DECIPHER_ONLY_KEY_USAGE: ::DWORD = 0x8000; 1512 pub const CERT_STORE_ADD_NEW: ::DWORD = 1; 1513 pub const CERT_STORE_ADD_USE_EXISTING: ::DWORD = 2; 1514 pub const CERT_STORE_ADD_REPLACE_EXISTING: ::DWORD = 3; 1515 pub const CERT_STORE_ADD_ALWAYS: ::DWORD = 4; 1516 pub const CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES: ::DWORD = 5; 1517 pub const CERT_STORE_ADD_NEWER: ::DWORD = 6; 1518 pub const CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES: ::DWORD = 7; 1519 pub const CERT_STORE_SAVE_AS_STORE: ::DWORD = 1; 1520 pub const CERT_STORE_SAVE_AS_PKCS7: ::DWORD = 2; 1521 pub const CERT_STORE_SAVE_TO_FILE: ::DWORD = 1; 1522 pub const CERT_STORE_SAVE_TO_MEMORY: ::DWORD = 2; 1523 pub const CERT_STORE_SAVE_TO_FILENAME_A: ::DWORD = 3; 1524 pub const CERT_STORE_SAVE_TO_FILENAME_W: ::DWORD = 4; 1525 pub const CERT_STORE_SAVE_TO_FILENAME: ::DWORD = CERT_STORE_SAVE_TO_FILENAME_W; 1526 pub const CERT_CA_SUBJECT_FLAG: ::DWORD = 0x80; 1527 pub const CERT_END_ENTITY_SUBJECT_FLAG: ::DWORD = 0x40; 1528 pub const CERT_CHAIN_POLICY_BASE: ::DWORD = 1; 1529 pub const CERT_CHAIN_POLICY_AUTHENTICODE: ::DWORD = 2; 1530 pub const CERT_CHAIN_POLICY_AUTHENTICODE_TS: ::DWORD = 3; 1531 pub const CERT_CHAIN_POLICY_SSL: ::DWORD = 4; 1532 pub const CERT_CHAIN_POLICY_BASIC_CONSTRAINTS: ::DWORD = 5; 1533 pub const CERT_CHAIN_POLICY_NT_AUTH: ::DWORD = 6; 1534 pub const CERT_CHAIN_POLICY_MICROSOFT_ROOT: ::DWORD = 7; 1535 pub const CERT_CHAIN_REVOCATION_CHECK_END_CERT: ::DWORD = 0x10000000; 1536 pub const CERT_CHAIN_REVOCATION_CHECK_CHAIN: ::DWORD = 0x20000000; 1537 pub const CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT: ::DWORD = 0x40000000; 1538 pub const CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY: ::DWORD = 0x80000000; 1539 pub const CERT_CHAIN_REVOCATION_ACCUMULATIVE_TIMEOUT: ::DWORD = 0x08000000; 1540 pub const CERT_TRUST_NO_ERROR: ::DWORD = 0x00000000; 1541 pub const CERT_TRUST_IS_NOT_TIME_VALID: ::DWORD = 0x00000001; 1542 pub const CERT_TRUST_IS_NOT_TIME_NESTED: ::DWORD = 0x00000002; 1543 pub const CERT_TRUST_IS_REVOKED: ::DWORD = 0x00000004; 1544 pub const CERT_TRUST_IS_NOT_SIGNATURE_VALID: ::DWORD = 0x00000008; 1545 pub const CERT_TRUST_IS_NOT_VALID_FOR_USAGE: ::DWORD = 0x00000010; 1546 pub const CERT_TRUST_IS_UNTRUSTED_ROOT: ::DWORD = 0x00000020; 1547 pub const CERT_TRUST_REVOCATION_STATUS_UNKNOWN: ::DWORD = 0x00000040; 1548 pub const CERT_TRUST_IS_CYCLIC: ::DWORD = 0x00000080; 1549 1550 pub const CERT_TRUST_INVALID_EXTENSION: ::DWORD = 0x00000100; 1551 pub const CERT_TRUST_INVALID_POLICY_CONSTRAINTS: ::DWORD = 0x00000200; 1552 pub const CERT_TRUST_INVALID_BASIC_CONSTRAINTS: ::DWORD = 0x00000400; 1553 pub const CERT_TRUST_INVALID_NAME_CONSTRAINTS: ::DWORD = 0x00000800; 1554 pub const CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT: ::DWORD = 0x00001000; 1555 pub const CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT: ::DWORD = 0x00002000; 1556 pub const CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT: ::DWORD = 0x00004000; 1557 pub const CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT: ::DWORD = 0x00008000; 1558 1559 pub const CERT_TRUST_IS_OFFLINE_REVOCATION: ::DWORD = 0x01000000; 1560 pub const CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY: ::DWORD = 0x02000000; 1561 pub const CERT_TRUST_IS_PARTIAL_CHAIN: ::DWORD = 0x00010000; 1562 pub const CERT_TRUST_CTL_IS_NOT_TIME_VALID: ::DWORD = 0x00020000; 1563 pub const CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID: ::DWORD = 0x00040000; 1564 pub const CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE: ::DWORD = 0x00080000; 1565 pub const CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG: ::DWORD = 0x00000001; 1566 pub const CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG: ::DWORD = 0x00000002; 1567 pub const CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG: ::DWORD = 0x00000004; 1568 pub const CERT_CHAIN_POLICY_IGNORE_INVALID_BASIC_CONSTRAINTS_FLAG: ::DWORD = 0x00000008; 1569 1570 pub const CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG: ::DWORD = 0x00000010; 1571 pub const CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG: ::DWORD = 0x00000020; 1572 pub const CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAG: ::DWORD = 0x00000040; 1573 pub const CERT_CHAIN_POLICY_IGNORE_INVALID_POLICY_FLAG: ::DWORD = 0x00000080; 1574 1575 pub const CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG: ::DWORD = 0x00000100; 1576 pub const CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG: ::DWORD = 0x00000200; 1577 pub const CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG: ::DWORD = 0x00000400; 1578 pub const CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG: ::DWORD = 0x00000800; 1579 1580 pub const CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS: ::DWORD = 1581 CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG | 1582 CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG | 1583 CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG | 1584 CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG; 1585 pub const CERT_TRUST_HAS_EXACT_MATCH_ISSUER: ::DWORD = 0x00000001; 1586 pub const CERT_TRUST_HAS_KEY_MATCH_ISSUER: ::DWORD = 0x00000002; 1587 pub const CERT_TRUST_HAS_NAME_MATCH_ISSUER: ::DWORD = 0x00000004; 1588 pub const CERT_TRUST_IS_SELF_SIGNED: ::DWORD = 0x00000008; 1589 pub const CERT_TRUST_HAS_PREFERRED_ISSUER: ::DWORD = 0x00000100; 1590 pub const CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY: ::DWORD = 0x00000200; 1591 pub const CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS: ::DWORD = 0x00000400; 1592 pub const CERT_TRUST_IS_COMPLEX_CHAIN: ::DWORD = 0x00010000; 1593 pub const CERT_ALT_NAME_OTHER_NAME: ::DWORD = 1; 1594 pub const CERT_ALT_NAME_RFC822_NAME: ::DWORD = 2; 1595 pub const CERT_ALT_NAME_DNS_NAME: ::DWORD = 3; 1596 pub const CERT_ALT_NAME_X400_ADDRESS: ::DWORD = 4; 1597 pub const CERT_ALT_NAME_DIRECTORY_NAME: ::DWORD = 5; 1598 pub const CERT_ALT_NAME_EDI_PARTY_NAME: ::DWORD = 6; 1599 pub const CERT_ALT_NAME_URL: ::DWORD = 7; 1600 pub const CERT_ALT_NAME_IP_ADDRESS: ::DWORD = 8; 1601 pub const CERT_ALT_NAME_REGISTERED_ID: ::DWORD = 9; 1602 pub const CERT_STORE_CTRL_RESYNC: ::DWORD = 1; 1603 pub const CERT_STORE_CTRL_NOTIFY_CHANGE: ::DWORD = 2; 1604 pub const CERT_STORE_CTRL_COMMIT: ::DWORD = 3; 1605 pub const CERT_STORE_CTRL_AUTO_RESYNC: ::DWORD = 4; 1606 pub const CERT_STORE_CTRL_CANCEL_NOTIFY: ::DWORD = 5; 1607 pub const CERT_ID_ISSUER_SERIAL_NUMBER: ::DWORD = 1; 1608 pub const CERT_ID_KEY_IDENTIFIER: ::DWORD = 2; 1609 pub const CERT_ID_SHA1_HASH: ::DWORD = 3; 1610 pub const CERT_KEY_PROV_HANDLE_PROP_ID: ::DWORD = 1; 1611 pub const CERT_KEY_PROV_INFO_PROP_ID: ::DWORD = 2; 1612 pub const CERT_SHA1_HASH_PROP_ID: ::DWORD = 3; 1613 pub const CERT_MD5_HASH_PROP_ID: ::DWORD = 4; 1614 pub const CERT_HASH_PROP_ID: ::DWORD = CERT_SHA1_HASH_PROP_ID; 1615 pub const CERT_KEY_CONTEXT_PROP_ID: ::DWORD = 5; 1616 pub const CERT_KEY_SPEC_PROP_ID: ::DWORD = 6; 1617 pub const CERT_IE30_RESERVED_PROP_ID: ::DWORD = 7; 1618 pub const CERT_PUBKEY_HASH_RESERVED_PROP_ID: ::DWORD = 8; 1619 pub const CERT_ENHKEY_USAGE_PROP_ID: ::DWORD = 9; 1620 pub const CERT_CTL_USAGE_PROP_ID: ::DWORD = CERT_ENHKEY_USAGE_PROP_ID; 1621 pub const CERT_NEXT_UPDATE_LOCATION_PROP_ID: ::DWORD = 10; 1622 pub const CERT_FRIENDLY_NAME_PROP_ID: ::DWORD = 11; 1623 pub const CERT_PVK_FILE_PROP_ID: ::DWORD = 12; 1624 pub const CERT_DESCRIPTION_PROP_ID: ::DWORD = 13; 1625 pub const CERT_ACCESS_STATE_PROP_ID: ::DWORD = 14; 1626 pub const CERT_SIGNATURE_HASH_PROP_ID: ::DWORD = 15; 1627 pub const CERT_SMART_CARD_DATA_PROP_ID: ::DWORD = 16; 1628 pub const CERT_EFS_PROP_ID: ::DWORD = 17; 1629 pub const CERT_FORTEZZA_DATA_PROP_ID: ::DWORD = 18; 1630 pub const CERT_ARCHIVED_PROP_ID: ::DWORD = 19; 1631 pub const CERT_KEY_IDENTIFIER_PROP_ID: ::DWORD = 20; 1632 pub const CERT_AUTO_ENROLL_PROP_ID: ::DWORD = 21; 1633 pub const CERT_PUBKEY_ALG_PARA_PROP_ID: ::DWORD = 22; 1634 pub const CERT_CROSS_CERT_DIST_POINTS_PROP_ID: ::DWORD = 23; 1635 pub const CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID: ::DWORD = 24; 1636 pub const CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID: ::DWORD = 25; 1637 pub const CERT_ENROLLMENT_PROP_ID: ::DWORD = 26; 1638 pub const CERT_DATE_STAMP_PROP_ID: ::DWORD = 27; 1639 pub const CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID: ::DWORD = 28; 1640 pub const CERT_SUBJECT_NAME_MD5_HASH_PROP_ID: ::DWORD = 29; 1641 pub const CERT_EXTENDED_ERROR_INFO_PROP_ID: ::DWORD = 30; 1642 pub const CERT_RENEWAL_PROP_ID: ::DWORD = 64; 1643 pub const CERT_ARCHIVED_KEY_HASH_PROP_ID: ::DWORD = 65; 1644 pub const CERT_AUTO_ENROLL_RETRY_PROP_ID: ::DWORD = 66; 1645 pub const CERT_AIA_URL_RETRIEVED_PROP_ID: ::DWORD = 67; 1646 pub const CERT_AUTHORITY_INFO_ACCESS_PROP_ID: ::DWORD = 68; 1647 pub const CERT_BACKED_UP_PROP_ID: ::DWORD = 69; 1648 pub const CERT_OCSP_RESPONSE_PROP_ID: ::DWORD = 70; 1649 pub const CERT_REQUEST_ORIGINATOR_PROP_ID: ::DWORD = 71; 1650 pub const CERT_SOURCE_LOCATION_PROP_ID: ::DWORD = 72; 1651 pub const CERT_SOURCE_URL_PROP_ID: ::DWORD = 73; 1652 pub const CERT_NEW_KEY_PROP_ID: ::DWORD = 74; 1653 pub const CERT_OCSP_CACHE_PREFIX_PROP_ID: ::DWORD = 75; 1654 pub const CERT_SMART_CARD_ROOT_INFO_PROP_ID: ::DWORD = 76; 1655 pub const CERT_NO_AUTO_EXPIRE_CHECK_PROP_ID: ::DWORD = 77; 1656 pub const CERT_NCRYPT_KEY_HANDLE_PROP_ID: ::DWORD = 78; 1657 pub const CERT_HCRYPTPROV_OR_NCRYPT_KEY_HANDLE_PROP_ID: ::DWORD = 79; 1658 pub const CERT_SUBJECT_INFO_ACCESS_PROP_ID: ::DWORD = 80; 1659 pub const CERT_CA_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID: ::DWORD = 81; 1660 pub const CERT_CA_DISABLE_CRL_PROP_ID: ::DWORD = 82; 1661 pub const CERT_ROOT_PROGRAM_CERT_POLICIES_PROP_ID: ::DWORD = 83; 1662 pub const CERT_ROOT_PROGRAM_NAME_CONSTRAINTS_PROP_ID: ::DWORD = 84; 1663 pub const CERT_SUBJECT_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID: ::DWORD = 85; 1664 pub const CERT_SUBJECT_DISABLE_CRL_PROP_ID: ::DWORD = 86; 1665 pub const CERT_CEP_PROP_ID: ::DWORD = 87; 1666 pub const CERT_SIGN_HASH_CNG_ALG_PROP_ID: ::DWORD = 89; 1667 pub const CERT_SCARD_PIN_ID_PROP_ID: ::DWORD = 90; 1668 pub const CERT_SCARD_PIN_INFO_PROP_ID: ::DWORD = 91; 1669 pub const CERT_SUBJECT_PUB_KEY_BIT_LENGTH_PROP_ID: ::DWORD = 92; 1670 pub const CERT_PUB_KEY_CNG_ALG_BIT_LENGTH_PROP_ID: ::DWORD = 93; 1671 pub const CERT_ISSUER_PUB_KEY_BIT_LENGTH_PROP_ID: ::DWORD = 94; 1672 pub const CERT_ISSUER_CHAIN_SIGN_HASH_CNG_ALG_PROP_ID: ::DWORD = 95; 1673 pub const CERT_ISSUER_CHAIN_PUB_KEY_CNG_ALG_BIT_LENGTH_PROP_ID: ::DWORD = 96; 1674 pub const CERT_NO_EXPIRE_NOTIFICATION_PROP_ID: ::DWORD = 97; 1675 pub const CERT_AUTH_ROOT_SHA256_HASH_PROP_ID: ::DWORD = 98; 1676 pub const CERT_NCRYPT_KEY_HANDLE_TRANSFER_PROP_ID: ::DWORD = 99; 1677 pub const CERT_HCRYPTPROV_TRANSFER_PROP_ID: ::DWORD = 100; 1678 pub const CERT_SMART_CARD_READER_PROP_ID: ::DWORD = 101; 1679 pub const CERT_SEND_AS_TRUSTED_ISSUER_PROP_ID: ::DWORD = 102; 1680 pub const CERT_KEY_REPAIR_ATTEMPTED_PROP_ID: ::DWORD = 103; 1681 pub const CERT_DISALLOWED_FILETIME_PROP_ID: ::DWORD = 104; 1682 pub const CERT_ROOT_PROGRAM_CHAIN_POLICIES_PROP_ID: ::DWORD = 105; 1683 pub const CERT_SMART_CARD_READER_NON_REMOVABLE_PROP_ID: ::DWORD = 106; 1684 pub const CERT_SHA256_HASH_PROP_ID: ::DWORD = 107; 1685 pub const CERT_SCEP_SERVER_CERTS_PROP_ID: ::DWORD = 108; 1686 pub const CERT_SCEP_RA_SIGNATURE_CERT_PROP_ID: ::DWORD = 109; 1687 pub const CERT_SCEP_RA_ENCRYPTION_CERT_PROP_ID: ::DWORD = 110; 1688 pub const CERT_SCEP_CA_CERT_PROP_ID: ::DWORD = 111; 1689 pub const CERT_SCEP_SIGNER_CERT_PROP_ID: ::DWORD = 112; 1690 pub const CERT_SCEP_NONCE_PROP_ID: ::DWORD = 113; 1691 pub const CERT_SCEP_ENCRYPT_HASH_CNG_ALG_PROP_ID: ::DWORD = 114; 1692 pub const CERT_SCEP_FLAGS_PROP_ID: ::DWORD = 115; 1693 pub const CERT_SCEP_GUID_PROP_ID: ::DWORD = 116; 1694 pub const CERT_SERIALIZABLE_KEY_CONTEXT_PROP_ID: ::DWORD = 117; 1695 pub const CERT_ISOLATED_KEY_PROP_ID: ::DWORD = 118; 1696 pub const CERT_FIRST_RESERVED_PROP_ID: ::DWORD = 119; 1697 pub const CERT_LAST_RESERVED_PROP_ID: ::DWORD = 0x00007FFF; 1698 pub const CERT_FIRST_USER_PROP_ID: ::DWORD = 0x00008000; 1699 pub const CERT_LAST_USER_PROP_ID: ::DWORD = 0x0000FFFF; 1700 pub const szOID_CERT_PROP_ID_PREFIX: &'static str = "1.3.6.1.4.1.311.10.11."; 1701 pub const szOID_CERT_KEY_IDENTIFIER_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.20"; 1702 pub const szOID_CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID: &'static str 1703 = "1.3.6.1.4.1.311.10.11.28"; 1704 pub const szOID_CERT_SUBJECT_NAME_MD5_HASH_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.29"; 1705 pub const szOID_CERT_MD5_HASH_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.4"; 1706 pub const szOID_CERT_SIGNATURE_HASH_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.15"; 1707 pub const szOID_DISALLOWED_HASH: &'static str = szOID_CERT_SIGNATURE_HASH_PROP_ID; 1708 pub const szOID_CERT_DISALLOWED_FILETIME_PROP_ID: &'static str = "1.3.6.1.4.1.311.10.11.104"; 1709 pub const CERT_ACCESS_STATE_WRITE_PERSIST_FLAG: ::DWORD = 0x1; 1710 pub const CERT_ACCESS_STATE_SYSTEM_STORE_FLAG: ::DWORD = 0x2; 1711 pub const CERT_ACCESS_STATE_LM_SYSTEM_STORE_FLAG: ::DWORD = 0x4; 1712 pub const CERT_ACCESS_STATE_GP_SYSTEM_STORE_FLAG: ::DWORD = 0x8; 1713 pub const CERT_ACCESS_STATE_SHARED_USER_FLAG: ::DWORD = 0x10; 1714 pub const szOID_ROOT_PROGRAM_AUTO_UPDATE_CA_REVOCATION: &'static str = "1.3.6.1.4.1.311.60.3.1"; 1715 pub const szOID_ROOT_PROGRAM_AUTO_UPDATE_END_REVOCATION: &'static str = "1.3.6.1.4.1.311.60.3.2"; 1716 pub const szOID_ROOT_PROGRAM_NO_OCSP_FAILOVER_TO_CRL: &'static str = "1.3.6.1.4.1.311.60.3.3"; 1717 STRUCT!{struct CRYPT_KEY_PROV_PARAM { 1718 dwParam: ::DWORD, 1719 pbData: *mut ::BYTE, 1720 cbData: ::DWORD, 1721 dwFlags: ::DWORD, 1722 }} 1723 pub type PCRYPT_KEY_PROV_PARAM = *mut CRYPT_KEY_PROV_PARAM; 1724 STRUCT!{struct CRYPT_KEY_PROV_INFO { 1725 pwszContainerName: ::LPWSTR, 1726 pwszProvName: ::LPWSTR, 1727 dwProvType: ::DWORD, 1728 dwFlags: ::DWORD, 1729 cProvParam: ::DWORD, 1730 rgProvParam: PCRYPT_KEY_PROV_PARAM, 1731 dwKeySpec: ::DWORD, 1732 }} 1733 pub type PCRYPT_KEY_PROV_INFO = *mut CRYPT_KEY_PROV_INFO; 1734 pub const CERT_SET_KEY_PROV_HANDLE_PROP_ID: ::DWORD = 0x00000001; 1735 pub const CERT_SET_KEY_CONTEXT_PROP_ID: ::DWORD = 0x00000001; 1736 pub const CERT_NCRYPT_KEY_SPEC: ::DWORD = 0xFFFFFFFF; 1737 //20213 1738 pub type HCERT_SERVER_OCSP_RESPONSE = *mut ::c_void; 1739 STRUCT!{struct CERT_SERVER_OCSP_RESPONSE_CONTEXT { 1740 cbSize: ::DWORD, 1741 pbEncodedOcspResponse: *mut ::BYTE, 1742 cbEncodedOcspResponse: ::DWORD, 1743 }} 1744 pub type PCERT_SERVER_OCSP_RESPONSE_CONTEXT = *mut CERT_SERVER_OCSP_RESPONSE_CONTEXT; 1745 pub type PCCERT_SERVER_OCSP_RESPONSE_CONTEXT = *const CERT_SERVER_OCSP_RESPONSE_CONTEXT; 1746 1747 pub const CERT_CHAIN_CACHE_END_CERT: ::DWORD = 0x00000001; 1748 pub const CERT_CHAIN_THREAD_STORE_SYNC: ::DWORD = 0x00000002; 1749 pub const CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL: ::DWORD = 0x00000004; 1750 pub const CERT_CHAIN_USE_LOCAL_MACHINE_STORE: ::DWORD = 0x00000008; 1751 pub const CERT_CHAIN_ENABLE_CACHE_AUTO_UPDATE: ::DWORD = 0x00000010; 1752 pub const CERT_CHAIN_ENABLE_SHARE_STORE: ::DWORD = 0x00000020; 1753 1754 STRUCT!{struct CERT_CHAIN_ENGINE_CONFIG { 1755 cbSize: ::DWORD, 1756 hRestrictedRoot: HCERTSTORE, 1757 hRestrictedTrust: HCERTSTORE, 1758 hRestrictedOther: HCERTSTORE, 1759 cAdditionalStore: ::DWORD, 1760 rghAdditionalStore: *mut HCERTSTORE, 1761 dwFlags: ::DWORD, 1762 dwUrlRetrievalTimeout: ::DWORD, 1763 MaximumCachedCertificates: ::DWORD, 1764 CycleDetectionModulus: ::DWORD, 1765 // #if (NTDDI_VERSION >= NTDDI_WIN7) 1766 hExclusiveRoot: HCERTSTORE, 1767 hExclusiveTrustedPeople: HCERTSTORE, 1768 // #if (NTDDI_VERSION >= NTDDI_WIN8) 1769 dwExclusiveFlags: ::DWORD, 1770 }} 1771 pub type PCERT_CHAIN_ENGINE_CONFIG = *mut CERT_CHAIN_ENGINE_CONFIG; 1772 // 18748 1773 pub type HCERTCHAINENGINE = ::HANDLE; 1774 pub type PFN_CERT_CREATE_CONTEXT_SORT_FUNC = Option<unsafe extern "system" fn( 1775 cbTotalEncoded: ::DWORD, cbRemainEncoded: ::DWORD, cEntry: ::DWORD, pvSort: *mut ::c_void 1776 ) -> ::BOOL>; 1777 STRUCT!{nodebug struct CERT_CREATE_CONTEXT_PARA { 1778 cbSize: ::DWORD, 1779 pfnFree: PFN_CRYPT_FREE, 1780 pvFree: *mut ::c_void, 1781 pfnSort: PFN_CERT_CREATE_CONTEXT_SORT_FUNC, 1782 pvSort: *mut ::c_void, 1783 }} 1784 pub type PCERT_CREATE_CONTEXT_PARA = *mut CERT_CREATE_CONTEXT_PARA; 1785 STRUCT!{struct CERT_EXTENSIONS { 1786 cExtension: ::DWORD, 1787 rgExtension: PCERT_EXTENSION, 1788 }} 1789 pub type PCERT_EXTENSIONS = *mut CERT_EXTENSIONS; 1790 STRUCT!{struct CERT_REVOCATION_CRL_INFO { 1791 cbSize: ::DWORD, 1792 pBaseCrlContext: PCCRL_CONTEXT, 1793 pDeltaCrlContext: PCCRL_CONTEXT, 1794 pCrlEntry: PCRL_ENTRY, 1795 fDeltaCrlEntry: ::BOOL, 1796 }} 1797 pub type PCERT_REVOCATION_CRL_INFO = *mut CERT_REVOCATION_CRL_INFO; 1798 STRUCT!{struct CERT_TRUST_STATUS { 1799 dwErrorStatus: ::DWORD, 1800 dwInfoStatus: ::DWORD, 1801 }} 1802 pub type PCERT_TRUST_STATUS = *mut CERT_TRUST_STATUS; 1803 STRUCT!{struct CERT_REVOCATION_INFO { 1804 cbSize: ::DWORD, 1805 dwRevocationResult: ::DWORD, 1806 pszRevocationOid: ::LPCSTR, 1807 pvOidSpecificInfo: ::LPVOID, 1808 fHasFreshnessTime: ::BOOL, 1809 dwFreshnessTime: ::DWORD, 1810 pCrlInfo: PCERT_REVOCATION_CRL_INFO, 1811 }} 1812 pub type PCERT_REVOCATION_INFO = *mut CERT_REVOCATION_INFO; 1813 STRUCT!{struct CERT_TRUST_LIST_INFO { 1814 cbSize: ::DWORD, 1815 pCtlEntry: PCTL_ENTRY, 1816 pCtlContext: PCCTL_CONTEXT, 1817 }} 1818 pub type PCERT_TRUST_LIST_INFO = *mut CERT_TRUST_LIST_INFO; 1819 STRUCT!{struct CERT_CHAIN_ELEMENT { 1820 cbSize: ::DWORD, 1821 pCertContext: PCCERT_CONTEXT, 1822 TrustStatus: CERT_TRUST_STATUS, 1823 pRevocationInfo: PCERT_REVOCATION_INFO, 1824 pIssuanceUsage: PCERT_ENHKEY_USAGE, 1825 pApplicationUsage: PCERT_ENHKEY_USAGE, 1826 pwszExtendedErrorInfo: ::LPWSTR, 1827 }} 1828 pub type PCERT_CHAIN_ELEMENT = *mut CERT_CHAIN_ELEMENT; 1829 pub type PCCERT_CHAIN_ELEMENT = *const CERT_CHAIN_ELEMENT; 1830 STRUCT!{struct CERT_SIMPLE_CHAIN { 1831 cbSize: ::DWORD, 1832 TrustStatus: CERT_TRUST_STATUS, 1833 cElement: ::DWORD, 1834 rgpElement: *mut PCERT_CHAIN_ELEMENT, 1835 pTrustListInfo: PCERT_TRUST_LIST_INFO, 1836 fHasRevocationFreshnessTime: ::BOOL, 1837 dwRevocationFreshnessTime: ::DWORD, 1838 }} 1839 pub type PCERT_SIMPLE_CHAIN = *mut CERT_SIMPLE_CHAIN; 1840 pub type PCCERT_SIMPLE_CHAIN = *const CERT_SIMPLE_CHAIN; 1841 STRUCT!{struct CERT_CHAIN_CONTEXT { 1842 cbSize: ::DWORD, 1843 TrustStatus: CERT_TRUST_STATUS, 1844 cChain: ::DWORD, 1845 rgpChain: *mut PCERT_SIMPLE_CHAIN, 1846 cLowerQualityChainContext: ::DWORD, 1847 rgpLowerQualityChainContext: *mut PCCERT_CHAIN_CONTEXT, 1848 fHasRevocationFreshnessTime: ::BOOL, 1849 dwRevocationFreshnessTime: ::DWORD, 1850 dwCreateFlags: ::DWORD, 1851 ChainId: ::GUID, 1852 }} 1853 pub type PCERT_CHAIN_CONTEXT = *mut CERT_CHAIN_CONTEXT; 1854 pub type PCCERT_CHAIN_CONTEXT = *const CERT_CHAIN_CONTEXT; 1855 STRUCT!{struct CERT_PHYSICAL_STORE_INFO { 1856 cbSize: ::DWORD, 1857 pszOpenStoreProvider: ::LPSTR, 1858 dwOpenEncodingType: ::DWORD, 1859 dwOpenFlags: ::DWORD, 1860 OpenParameters: CRYPT_DATA_BLOB, 1861 dwFlags: ::DWORD, 1862 dwPriority: ::DWORD, 1863 }} 1864 pub type PCERT_PHYSICAL_STORE_INFO = *mut CERT_PHYSICAL_STORE_INFO; 1865 STRUCT!{struct CERT_SYSTEM_STORE_INFO { 1866 cbSize: ::DWORD, 1867 }} 1868 pub type PCERT_SYSTEM_STORE_INFO = *mut CERT_SYSTEM_STORE_INFO; 1869 //13401 1870 pub type PFN_CERT_ENUM_SYSTEM_STORE_LOCATION = Option<unsafe extern "system" fn( 1871 pwszStoreLocation: ::LPCWSTR, dwFlags: ::DWORD, pvReserved: *mut ::c_void, pvArg: *mut ::c_void, 1872 ) -> ::BOOL>; 1873 //13408 1874 pub type PFN_CERT_ENUM_SYSTEM_STORE = Option<unsafe extern "system" fn( 1875 pvSystemStore: *const ::c_void, dwFlags: ::DWORD, pStoreInfo: PCERT_SYSTEM_STORE_INFO, 1876 pvReserved: *mut ::c_void, pvArg: *mut ::c_void, 1877 ) -> ::BOOL>; 1878 //13416 1879 pub type PFN_CERT_ENUM_PHYSICAL_STORE = Option<unsafe extern "system" fn( 1880 pvSystemStore: *const ::c_void, dwFlags: ::DWORD, pwszStoreName: ::LPCWSTR, 1881 pStoreInfo: PCERT_PHYSICAL_STORE_INFO, pvReserved: *mut ::c_void, pvArg: *mut ::c_void, 1882 ) -> ::BOOL>; 1883 STRUCT!{struct CERT_STRONG_SIGN_SERIALIZED_INFO { 1884 dwFlags: ::DWORD, 1885 pwszCNGSignHashAlgids: ::LPWSTR, 1886 pwszCNGPubKeyMinBitLengths: ::LPWSTR, 1887 }} 1888 pub type PCERT_STRONG_SIGN_SERIALIZED_INFO = *mut CERT_STRONG_SIGN_SERIALIZED_INFO; 1889 STRUCT!{struct CERT_STRONG_SIGN_PARA { 1890 cbSize: ::DWORD, 1891 dwInfoChoice: ::DWORD, 1892 pvInfo: *mut ::c_void, 1893 }} 1894 UNION!( 1895 CERT_STRONG_SIGN_PARA, pvInfo, pSerializedInfo, pSerializedInfo_mut, 1896 PCERT_STRONG_SIGN_SERIALIZED_INFO 1897 ); 1898 UNION!(CERT_STRONG_SIGN_PARA, pvInfo, pszOID, pszOID_mut, ::LPSTR); 1899 pub type PCERT_STRONG_SIGN_PARA = *mut CERT_STRONG_SIGN_PARA; 1900 pub type PCCERT_STRONG_SIGN_PARA = *const CERT_STRONG_SIGN_PARA; 1901 pub const USAGE_MATCH_TYPE_AND: ::DWORD = 0x00000000; 1902 pub const USAGE_MATCH_TYPE_OR: ::DWORD = 0x00000001; 1903 STRUCT!{struct CERT_USAGE_MATCH { 1904 dwType: ::DWORD, 1905 Usage: CERT_ENHKEY_USAGE, 1906 }} 1907 pub type PCERT_USAGE_MATCH = *mut CERT_USAGE_MATCH; 1908 STRUCT!{struct CERT_CHAIN_PARA { 1909 cbSize: ::DWORD, 1910 RequestedUsage: CERT_USAGE_MATCH, 1911 RequestedIssuancePolicy: CERT_USAGE_MATCH, 1912 dwUrlRetrievalTimeout: ::DWORD, 1913 fCheckRevocationFreshnessTime: ::BOOL, 1914 dwRevocationFreshnessTime: ::DWORD, 1915 pftCacheResync: ::LPFILETIME, 1916 pStrongSignPara: PCCERT_STRONG_SIGN_PARA, 1917 dwStrongSignFlags: ::DWORD, 1918 }} 1919 pub type PCERT_CHAIN_PARA = *mut CERT_CHAIN_PARA; 1920 STRUCT!{struct CERT_SELECT_CHAIN_PARA { 1921 hChainEngine: HCERTCHAINENGINE, 1922 pTime: ::PFILETIME, 1923 hAdditionalStore: HCERTSTORE, 1924 pChainPara: PCERT_CHAIN_PARA, 1925 dwFlags: ::DWORD, 1926 }} 1927 pub type PCERT_SELECT_CHAIN_PARA = *mut CERT_SELECT_CHAIN_PARA; 1928 pub type PCCERT_SELECT_CHAIN_PARA = *const CERT_SELECT_CHAIN_PARA; 1929 STRUCT!{struct CERT_SELECT_CRITERIA { 1930 dwType: ::DWORD, 1931 cPara: ::DWORD, 1932 ppPara: *mut *mut ::c_void, 1933 }} 1934 pub type PCERT_SELECT_CRITERIA = *mut CERT_SELECT_CRITERIA; 1935 pub type PCCERT_SELECT_CRITERIA = *const CERT_SELECT_CRITERIA; 1936 STRUCT!{struct CTL_VERIFY_USAGE_PARA { 1937 cbSize: ::DWORD, 1938 ListIdentifier: CRYPT_DATA_BLOB, 1939 cCtlStore: ::DWORD, 1940 rghCtlStore: *mut HCERTSTORE, 1941 cSignerStore: ::DWORD, 1942 rghSignerStore: *mut HCERTSTORE, 1943 }} 1944 pub type PCTL_VERIFY_USAGE_PARA = *mut CTL_VERIFY_USAGE_PARA; 1945 STRUCT!{struct CTL_VERIFY_USAGE_STATUS { 1946 cbSize: ::DWORD, 1947 dwError: ::DWORD, 1948 dwFlags: ::DWORD, 1949 ppCtl: *mut PCCTL_CONTEXT, 1950 dwCtlEntryIndex: ::DWORD, 1951 ppSigner: *mut PCCERT_CONTEXT, 1952 dwSignerIndex: ::DWORD, 1953 }} 1954 pub type PCTL_VERIFY_USAGE_STATUS = *mut CTL_VERIFY_USAGE_STATUS; 1955 STRUCT!{struct CERT_CHAIN_POLICY_PARA { 1956 cbSize: ::DWORD, 1957 dwFlags: ::DWORD, 1958 pvExtraPolicyPara: *mut ::c_void, 1959 }} 1960 pub type PCERT_CHAIN_POLICY_PARA = *mut CERT_CHAIN_POLICY_PARA; 1961 STRUCT!{struct CERT_CHAIN_POLICY_STATUS { 1962 cbSize: ::DWORD, 1963 dwError: ::DWORD, 1964 lChainIndex: ::LONG, 1965 lElementIndex: ::LONG, 1966 pvExtraPolicyStatus: *mut ::c_void, 1967 }} 1968 pub type PCERT_CHAIN_POLICY_STATUS = *mut CERT_CHAIN_POLICY_STATUS; 1969 STRUCT!{struct CERT_REVOCATION_CHAIN_PARA { 1970 cbSize: ::DWORD, 1971 hChainEngine: HCERTCHAINENGINE, 1972 hAdditionalStore: HCERTSTORE, 1973 dwChainFlags: ::DWORD, 1974 dwUrlRetrievalTimeout: ::DWORD, 1975 pftCurrentTime: ::LPFILETIME, 1976 pftCacheResync: ::LPFILETIME, 1977 }} 1978 pub type PCERT_REVOCATION_CHAIN_PARA = *mut CERT_REVOCATION_CHAIN_PARA; 1979 STRUCT!{struct CERT_REVOCATION_PARA { 1980 cbSize: ::DWORD, 1981 pIssuerCert: PCCERT_CONTEXT, 1982 cCertStore: ::DWORD, 1983 rgCertStore: *mut HCERTSTORE, 1984 hCrlStore: HCERTSTORE, 1985 pftTimeToUse: ::LPFILETIME, 1986 dwUrlRetrievalTimeout: ::DWORD, 1987 fCheckFreshnessTime: ::BOOL, 1988 dwFreshnessTime: ::DWORD, 1989 pftCurrentTime: ::LPFILETIME, 1990 pCrlInfo: PCERT_REVOCATION_CRL_INFO, 1991 pftCacheResync: ::LPFILETIME, 1992 pChainPara: PCERT_REVOCATION_CHAIN_PARA, 1993 }} 1994 pub type PCERT_REVOCATION_PARA = *mut CERT_REVOCATION_PARA; 1995 STRUCT!{struct CERT_REVOCATION_STATUS { 1996 cbSize: ::DWORD, 1997 dwIndex: ::DWORD, 1998 dwError: ::DWORD, 1999 dwReason: ::DWORD, 2000 fHasFreshnessTime: ::BOOL, 2001 dwFreshnessTime: ::DWORD, 2002 }} 2003 pub type PCERT_REVOCATION_STATUS = *mut CERT_REVOCATION_STATUS; 2004 //16990 2005 pub type HCRYPTASYNC = ::HANDLE; 2006 pub type PHCRYPTASYNC = *mut ::HANDLE; 2007 STRUCT!{struct CRYPT_ENCRYPT_MESSAGE_PARA { 2008 cbSize: ::DWORD, 2009 dwMsgEncodingType: ::DWORD, 2010 hCryptProv: HCRYPTPROV_LEGACY, 2011 ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, 2012 pvEncryptionAuxInfo: *mut ::c_void, 2013 dwFlags: ::DWORD, 2014 dwInnerContentType: ::DWORD, 2015 }} 2016 pub type PCRYPT_ENCRYPT_MESSAGE_PARA = *mut CRYPT_DECRYPT_MESSAGE_PARA; 2017 STRUCT!{struct CRYPT_DECRYPT_MESSAGE_PARA { 2018 cbSize: ::DWORD, 2019 dwMsgAndCertEncodingType: ::DWORD, 2020 cCertStore: ::DWORD, 2021 rghCertStore: *mut HCERTSTORE, 2022 dwFlags: ::DWORD, 2023 }} 2024 pub type PCRYPT_DECRYPT_MESSAGE_PARA = *mut CRYPT_DECRYPT_MESSAGE_PARA; 2025 pub type PFN_CRYPT_GET_SIGNER_CERTIFICATE = Option<unsafe extern "system" fn( 2026 pvGetArg: *mut ::c_void, dwCertEncodingType: ::DWORD, pSignerId: PCERT_INFO, 2027 hMsgCertStore: HCERTSTORE, 2028 ) -> PCCERT_CONTEXT>; 2029 STRUCT!{nodebug struct CRYPT_VERIFY_MESSAGE_PARA { 2030 cbSize: ::DWORD, 2031 dwMsgAndCertEncodingType: ::DWORD, 2032 hCryptProv: HCRYPTPROV_LEGACY, 2033 pfnGetSignerCertificate: PFN_CRYPT_GET_SIGNER_CERTIFICATE, 2034 pvGetArg: *mut ::c_void, 2035 pStrongSignPara: PCCERT_STRONG_SIGN_PARA, 2036 }} 2037 pub type PCRYPT_VERIFY_MESSAGE_PARA = *mut CRYPT_VERIFY_MESSAGE_PARA; 2038 STRUCT!{struct CRYPT_OID_INFO { 2039 cbSize: ::DWORD, 2040 oszOID: ::LPCSTR, 2041 pwszName: ::LPCWSTR, 2042 dwGroupId: ::DWORD, 2043 dwValue: ::DWORD, 2044 ExtraInfo: CRYPT_DATA_BLOB, 2045 pwszCNGAlgid: ::LPCWSTR, 2046 pwszCNGExtraAlgid: ::LPCWSTR, 2047 }} 2048 UNION!(CRYPT_OID_INFO, dwValue, Algid, Algid_mut, ALG_ID); 2049 UNION!(CRYPT_OID_INFO, dwValue, dwLength, dwLength_mut, ::DWORD); 2050 pub type PCRYPT_OID_INFO = *mut CRYPT_OID_INFO; 2051 pub type PCCRYPT_OID_INFO = *const CRYPT_OID_INFO; 2052 //18004 2053 pub type PFN_CRYPT_ENUM_KEYID_PROP = Option<unsafe extern "system" fn( 2054 pKeyIdentifier: *const CRYPT_HASH_BLOB, dwFlags: ::DWORD, pvReserved: *mut ::c_void, 2055 pvArg: *mut ::c_void, cProp: ::DWORD, rgdwPropId: *mut ::DWORD, rgpvData: *mut *mut ::c_void, 2056 rgcbData: *mut ::DWORD, 2057 ) -> ::BOOL>; 2058 //6379 2059 pub type PFN_CRYPT_ENUM_OID_FUNC = Option<unsafe extern "system" fn( 2060 dwEncodingType: ::DWORD, pszFuncName: ::LPCSTR, pszOID: ::LPCSTR, cValue: ::DWORD, 2061 rgdwValueType: *const ::DWORD, rgpwszValueName: *const ::LPCWSTR, 2062 rgpbValueData: *const *const ::BYTE, rgcbValueData: *const ::DWORD, pvArg: *mut ::c_void, 2063 ) -> ::BOOL>; 2064 //6675 2065 pub type PFN_CRYPT_ENUM_OID_INFO = Option<unsafe extern "system" fn( 2066 pInfo: PCCRYPT_OID_INFO, pvArg: *mut ::c_void, 2067 ) -> ::BOOL>; 2068 //6022 2069 pub type HCRYPTOIDFUNCSET = *mut ::c_void; 2070 pub type HCRYPTOIDFUNCADDR = *mut ::c_void; 2071 pub type PFN_CRYPT_ASYNC_PARAM_FREE_FUNC = Option<unsafe extern "system" fn( 2072 pszParamOid: ::LPSTR, pvParam: ::LPVOID, 2073 )>; 2074 STRUCT!{struct CRYPT_HASH_MESSAGE_PARA { 2075 cbSize: ::DWORD, 2076 dwMsgEncodingType: ::DWORD, 2077 hCryptProv: HCRYPTPROV_LEGACY, 2078 HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, 2079 pvHashAuxInfo: *mut ::c_void, 2080 }} 2081 pub type PCRYPT_HASH_MESSAGE_PARA = *mut CRYPT_HASH_MESSAGE_PARA; 2082 //14750 2083 pub type HCRYPTDEFAULTCONTEXT = *mut ::c_void; 2084 STRUCT!{struct CRYPT_OID_FUNC_ENTRY { 2085 pszOID: ::LPCSTR, 2086 pvFuncAddr: *mut ::c_void, 2087 }} 2088 pub type PCRYPT_OID_FUNC_ENTRY = *mut CRYPT_OID_FUNC_ENTRY; 2089 STRUCT!{struct CMSG_SIGNER_ENCODE_INFO { 2090 cbSize: ::DWORD, 2091 pCertInfo: PCERT_INFO, 2092 hCryptProv: HCRYPTPROV, 2093 dwKeySpec: ::DWORD, 2094 HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, 2095 pvHashAuxInfo: *mut ::c_void, 2096 cAuthAttr: ::DWORD, 2097 rgAuthAttr: PCRYPT_ATTRIBUTE, 2098 cUnauthAttr: ::DWORD, 2099 rgUnauthAttr: PCRYPT_ATTRIBUTE, 2100 }} 2101 UNION!(CMSG_SIGNER_ENCODE_INFO, hCryptProv, hNCryptKey, hNCryptKey_mut, ::NCRYPT_KEY_HANDLE); 2102 pub type PCMSG_SIGNER_ENCODE_INFO = *mut CMSG_SIGNER_ENCODE_INFO; 2103 STRUCT!{struct CMSG_SIGNED_ENCODE_INFO { 2104 cbSize: ::DWORD, 2105 cSigners: ::DWORD, 2106 rgSigners: PCMSG_SIGNER_ENCODE_INFO, 2107 cCertEncoded: ::DWORD, 2108 rgCertEncoded: PCERT_BLOB, 2109 cCrlEncoded: ::DWORD, 2110 rgCrlEncoded: PCRL_BLOB, 2111 }} 2112 pub type PCMSG_SIGNED_ENCODE_INFO = *mut CMSG_SIGNED_ENCODE_INFO; 2113 //7393 2114 pub type PFN_CMSG_STREAM_OUTPUT = Option<unsafe extern "system" fn( 2115 pvArg: *const ::c_void, pbData: *mut ::BYTE, cbData: ::DWORD, fFinal: ::BOOL, 2116 ) -> ::BOOL>; 2117 STRUCT!{nodebug struct CMSG_STREAM_INFO { 2118 cbContent: ::DWORD, 2119 pfnStreamOutput: PFN_CMSG_STREAM_OUTPUT, 2120 pvArg: *mut ::c_void, 2121 }} 2122 pub type PCMSG_STREAM_INFO = *mut CMSG_STREAM_INFO; 2123 STRUCT!{struct CRYPT_TIMESTAMP_ACCURACY { 2124 dwSeconds: ::DWORD, 2125 dwMillis: ::DWORD, 2126 dwMicros: ::DWORD, 2127 }} 2128 pub type PCRYPT_TIMESTAMP_ACCURACY = *mut CRYPT_TIMESTAMP_ACCURACY; 2129 STRUCT!{struct CRYPT_TIMESTAMP_INFO { 2130 dwVersion: ::DWORD, 2131 pszTSAPolicyId: ::LPSTR, 2132 HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, 2133 HashedMessage: CRYPT_DER_BLOB, 2134 SerialNumber: CRYPT_INTEGER_BLOB, 2135 ftTime: ::FILETIME, 2136 pvAccuracy: PCRYPT_TIMESTAMP_ACCURACY, 2137 fOrdering: ::BOOL, 2138 Nonce: CRYPT_DER_BLOB, 2139 Tsa: CRYPT_DER_BLOB, 2140 cExtension: ::DWORD, 2141 rgExtension: PCERT_EXTENSION, 2142 }} 2143 pub type PCRYPT_TIMESTAMP_INFO = *mut CRYPT_TIMESTAMP_INFO; 2144 STRUCT!{struct CRYPT_TIMESTAMP_CONTEXT { 2145 cbEncoded: ::DWORD, 2146 pbEncoded: *mut ::BYTE, 2147 pTimeStamp: PCRYPT_TIMESTAMP_INFO, 2148 }} 2149 pub type PCRYPT_TIMESTAMP_CONTEXT = *mut CRYPT_TIMESTAMP_CONTEXT; 2150 STRUCT!{struct CRYPT_TIMESTAMP_PARA { 2151 pszTSAPolicyId: ::LPCSTR, 2152 fRequestCerts: ::BOOL, 2153 Nonce: CRYPT_INTEGER_BLOB, 2154 cExtension: ::DWORD, 2155 rgExtension: PCERT_EXTENSION, 2156 }} 2157 pub type PCRYPT_TIMESTAMP_PARA = *mut CRYPT_TIMESTAMP_PARA; 2158 STRUCT!{struct CRYPT_SIGN_MESSAGE_PARA { 2159 cbSize: ::DWORD, 2160 dwMsgEncodingType: ::DWORD, 2161 pSigningCert: PCCERT_CONTEXT, 2162 HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, 2163 pvHashAuxInfo: *mut ::c_void, 2164 cMsgCert: ::DWORD, 2165 rgpMsgCert: *mut PCCERT_CONTEXT, 2166 cMsgCrl: ::DWORD, 2167 rgpMsgCrl: *mut PCCRL_CONTEXT, 2168 cAuthAttr: ::DWORD, 2169 rgAuthAttr: PCRYPT_ATTRIBUTE, 2170 cUnauthAttr: ::DWORD, 2171 rgUnauthAttr: PCRYPT_ATTRIBUTE, 2172 dwFlags: ::DWORD, 2173 dwInnerContentType: ::DWORD, 2174 }} 2175 pub type PCRYPT_SIGN_MESSAGE_PARA = *mut CRYPT_SIGN_MESSAGE_PARA; 2176 STRUCT!{struct CRYPT_KEY_SIGN_MESSAGE_PARA { 2177 cbSize: ::DWORD, 2178 dwMsgAndCertEncodingType: ::DWORD, 2179 hCryptProv: HCRYPTPROV, 2180 dwKeySpec: ::DWORD, 2181 HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, 2182 pvHashAuxInfo: *mut ::c_void, 2183 PubKeyAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, 2184 }} 2185 UNION!(CRYPT_KEY_SIGN_MESSAGE_PARA, hCryptProv, hNCryptKey, hNCryptKey_mut, ::NCRYPT_KEY_HANDLE); 2186 pub type PCRYPT_KEY_SIGN_MESSAGE_PARA = *mut CRYPT_KEY_SIGN_MESSAGE_PARA; 2187 STRUCT!{struct CRYPT_KEY_VERIFY_MESSAGE_PARA { 2188 cbSize: ::DWORD, 2189 dwMsgEncodingType: ::DWORD, 2190 hCryptProv: HCRYPTPROV_LEGACY, 2191 }} 2192 pub type PCRYPT_KEY_VERIFY_MESSAGE_PARA = *mut CRYPT_KEY_VERIFY_MESSAGE_PARA; 2193 STRUCT!{struct HTTPSPolicyCallbackData { 2194 cbSize: ::DWORD, 2195 dwAuthType: ::DWORD, 2196 fdwChecks: ::DWORD, 2197 pwszServerName: *mut ::WCHAR, 2198 }} 2199 pub type PHTTPSPolicyCallbackData = *mut HTTPSPolicyCallbackData; 2200 pub type SSL_EXTRA_CERT_CHAIN_POLICY_PARA = HTTPSPolicyCallbackData; 2201 pub type PSSL_EXTRA_CERT_CHAIN_POLICY_PARA = *mut HTTPSPolicyCallbackData; 2202 pub const AUTHTYPE_CLIENT: ::DWORD = 1; 2203 pub const AUTHTYPE_SERVER: ::DWORD = 2; 2204 pub const CTL_ENTRY_FROM_PROP_CHAIN_FLAG: ::DWORD = 0x1; 2205 pub const CMSG_ENCODE_SORTED_CTL_FLAG: ::DWORD = 0x1; 2206 pub const CMSG_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG: ::DWORD = 0x2; 2207