/* automatically generated by rust-bindgen 0.65.1 */ #[cfg(target_arch = "x86_64")] pub type ULONG_PTR = ::std::os::raw::c_ulonglong; #[cfg(target_arch = "aarch64")] pub type ULONG_PTR = ::std::os::raw::c_ulonglong; #[cfg(target_arch = "x86")] pub type ULONG_PTR = ::std::os::raw::c_ulong; pub const CRYPT_MODE_CBCI: u32 = 6; pub const CRYPT_MODE_CFBP: u32 = 7; pub const CRYPT_MODE_OFBP: u32 = 8; pub const CRYPT_MODE_CBCOFM: u32 = 9; pub const CRYPT_MODE_CBCOFMI: u32 = 10; pub const CRYPT_VERIFYCONTEXT: u32 = 4026531840; pub const CRYPT_NEWKEYSET: u32 = 8; pub const CRYPT_DELETEKEYSET: u32 = 16; pub const CRYPT_MACHINE_KEYSET: u32 = 32; pub const CRYPT_SILENT: u32 = 64; pub const CRYPT_DEFAULT_CONTAINER_OPTIONAL: u32 = 128; pub const CRYPT_EXPORTABLE: u32 = 1; pub const CRYPT_USER_PROTECTED: u32 = 2; pub const CRYPT_CREATE_SALT: u32 = 4; pub const CRYPT_UPDATE_KEY: u32 = 8; pub const CRYPT_NO_SALT: u32 = 16; pub const CRYPT_PREGEN: u32 = 64; pub const CRYPT_RECIPIENT: u32 = 16; pub const CRYPT_INITIATOR: u32 = 64; pub const CRYPT_ONLINE: u32 = 128; pub const CRYPT_SF: u32 = 256; pub const CRYPT_CREATE_IV: u32 = 512; pub const CRYPT_KEK: u32 = 1024; pub const CRYPT_DATA_KEY: u32 = 2048; pub const CRYPT_VOLATILE: u32 = 4096; pub const CRYPT_SGCKEY: u32 = 8192; pub const CRYPT_ARCHIVABLE: u32 = 16384; pub const CRYPT_FORCE_KEY_PROTECTION_HIGH: u32 = 32768; pub const CRYPT_SERVER: u32 = 1024; pub const CRYPT_Y_ONLY: u32 = 1; pub const CRYPT_SSL2_FALLBACK: u32 = 2; pub const CRYPT_DESTROYKEY: u32 = 4; pub const CRYPT_OAEP: u32 = 64; pub const CRYPT_BLOB_VER3: u32 = 128; pub const CRYPT_DECRYPT_RSA_NO_PADDING_CHECK: u32 = 32; pub const CRYPT_SECRETDIGEST: u32 = 1; pub const CRYPT_LITTLE_ENDIAN: u32 = 1; pub const CRYPT_NOHASHOID: u32 = 1; pub const CRYPT_TYPE2_FORMAT: u32 = 2; pub const CRYPT_X931_FORMAT: u32 = 4; pub const CRYPT_MACHINE_DEFAULT: u32 = 1; pub const CRYPT_USER_DEFAULT: u32 = 2; pub const CRYPT_DELETE_DEFAULT: u32 = 4; pub const CRYPT_USERDATA: u32 = 1; pub const CRYPT_MODE_CBC: u32 = 1; pub const CRYPT_MODE_ECB: u32 = 2; pub const CRYPT_MODE_OFB: u32 = 3; pub const CRYPT_MODE_CFB: u32 = 4; pub const CRYPT_MODE_CTS: u32 = 5; pub const CRYPT_ENCRYPT: u32 = 1; pub const CRYPT_DECRYPT: u32 = 2; pub const CRYPT_EXPORT: u32 = 4; pub const CRYPT_READ: u32 = 8; pub const CRYPT_WRITE: u32 = 16; pub const CRYPT_MAC: u32 = 32; pub const CRYPT_EXPORT_KEY: u32 = 64; pub const CRYPT_IMPORT_KEY: u32 = 128; pub const CRYPT_ARCHIVE: u32 = 256; pub const CRYPT_FAILED: u32 = 0; pub const CRYPT_SUCCEED: u32 = 1; pub const CRYPT_FIRST: u32 = 1; pub const CRYPT_NEXT: u32 = 2; pub const CRYPT_SGC_ENUM: u32 = 4; pub const CRYPT_IMPL_HARDWARE: u32 = 1; pub const CRYPT_IMPL_SOFTWARE: u32 = 2; pub const CRYPT_IMPL_MIXED: u32 = 3; pub const CRYPT_IMPL_UNKNOWN: u32 = 4; pub const CRYPT_IMPL_REMOVABLE: u32 = 8; pub const CRYPT_SEC_DESCR: u32 = 1; pub const CRYPT_PSTORE: u32 = 2; pub const CRYPT_UI_PROMPT: u32 = 4; pub const CRYPT_FLAG_PCT1: u32 = 1; pub const CRYPT_FLAG_SSL2: u32 = 2; pub const CRYPT_FLAG_SSL3: u32 = 4; pub const CRYPT_FLAG_TLS1: u32 = 8; pub const CRYPT_FLAG_IPSEC: u32 = 16; pub const CRYPT_FLAG_SIGNING: u32 = 32; pub const CRYPT_SGC: u32 = 1; pub const CRYPT_FASTSGC: u32 = 2; pub const CRYPT_ASN_ENCODING: u32 = 1; pub const CRYPT_NDR_ENCODING: u32 = 2; pub const CRYPT_FORMAT_STR_MULTI_LINE: u32 = 1; pub const CRYPT_FORMAT_STR_NO_HEX: u32 = 16; pub const CRYPT_ENCODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG: u32 = 8; pub const CRYPT_ENCODE_ALLOC_FLAG: u32 = 32768; pub const CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG: u32 = 65536; pub const CRYPT_DECODE_NOCOPY_FLAG: u32 = 1; pub const CRYPT_DECODE_TO_BE_SIGNED_FLAG: u32 = 2; pub const CRYPT_DECODE_SHARE_OID_STRING_FLAG: u32 = 4; pub const CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG: u32 = 8; pub const CRYPT_DECODE_ALLOC_FLAG: u32 = 32768; pub const CRYPT_ENCODE_DECODE_NONE: u32 = 0; pub const CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_FUNC: &[u8; 30usize] = b"CryptDllExportPublicKeyInfoEx\0"; pub const CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_FUNC: &[u8; 30usize] = b"CryptDllImportPublicKeyInfoEx\0"; pub const CRYPT_ACQUIRE_CACHE_FLAG: u32 = 1; pub const CRYPT_ACQUIRE_USE_PROV_INFO_FLAG: u32 = 2; pub const CRYPT_ACQUIRE_COMPARE_KEY_FLAG: u32 = 4; pub const CRYPT_ACQUIRE_SILENT_FLAG: u32 = 64; pub const CRYPT_ACQUIRE_ONLY_NCRYPT_KEY_FLAG: u32 = 262144; pub const CRYPT_DEFAULT_OID: &[u8; 8usize] = b"DEFAULT\0"; pub const CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG: u32 = 1; pub const CRYPT_HASH_ALG_OID_GROUP_ID: u32 = 1; pub const CRYPT_ENCRYPT_ALG_OID_GROUP_ID: u32 = 2; pub const CRYPT_PUBKEY_ALG_OID_GROUP_ID: u32 = 3; pub const CRYPT_SIGN_ALG_OID_GROUP_ID: u32 = 4; pub const CRYPT_RDN_ATTR_OID_GROUP_ID: u32 = 5; pub const CRYPT_EXT_OR_ATTR_OID_GROUP_ID: u32 = 6; pub const CRYPT_ENHKEY_USAGE_OID_GROUP_ID: u32 = 7; pub const CRYPT_POLICY_OID_GROUP_ID: u32 = 8; pub const CRYPT_TEMPLATE_OID_GROUP_ID: u32 = 9; pub const CRYPT_LAST_OID_GROUP_ID: u32 = 9; pub const CRYPT_FIRST_ALG_OID_GROUP_ID: u32 = 1; pub const CRYPT_LAST_ALG_OID_GROUP_ID: u32 = 4; pub const CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG: u32 = 1; pub const CRYPT_OID_USE_PUBKEY_PARA_FOR_PKCS7_FLAG: u32 = 2; pub const CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG: u32 = 4; pub const CRYPT_OID_INFO_OID_KEY: u32 = 1; pub const CRYPT_OID_INFO_NAME_KEY: u32 = 2; pub const CRYPT_OID_INFO_ALGID_KEY: u32 = 3; pub const CRYPT_OID_INFO_SIGN_KEY: u32 = 4; pub const CRYPT_OID_INFO_PUBKEY_SIGN_KEY_FLAG: u32 = 2147483648; pub const CRYPT_OID_INFO_PUBKEY_ENCRYPT_KEY_FLAG: u32 = 1073741824; pub const CRYPT_INSTALL_OID_INFO_BEFORE_FLAG: u32 = 1; pub const CRYPT_GET_INSTALLED_OID_FUNC_FLAG: u32 = 1; pub const CRYPT_OID_OPEN_STORE_PROV_FUNC: &[u8; 21usize] = b"CertDllOpenStoreProv\0"; pub const CRYPT_OID_SYSTEM_STORE_LOCATION_VALUE_NAME: &[u8; 20usize] = b"SystemStoreLocation\0"; pub const CRYPT_OID_VERIFY_CERTIFICATE_CHAIN_POLICY_FUNC: &[u8; 36usize] = b"CertDllVerifyCertificateChainPolicy\0"; pub const CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB: u32 = 1; pub const CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT: u32 = 2; pub const CRYPT_VERIFY_CERT_SIGN_SUBJECT_CRL: u32 = 3; pub const CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY: u32 = 1; pub const CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT: u32 = 2; pub const CRYPT_VERIFY_CERT_SIGN_ISSUER_CHAIN: u32 = 3; pub const CRYPT_VERIFY_CERT_SIGN_ISSUER_NULL: u32 = 4; pub const CRYPT_VERIFY_CERT_SIGN_DISABLE_MD2_MD4_FLAG: u32 = 1; pub const CRYPT_RETRIEVE_MULTIPLE_OBJECTS: u32 = 1; pub const CRYPT_CACHE_ONLY_RETRIEVAL: u32 = 2; pub const CRYPT_WIRE_ONLY_RETRIEVAL: u32 = 4; pub const CRYPT_DONT_CACHE_RESULT: u32 = 8; pub const CRYPT_ASYNC_RETRIEVAL: u32 = 16; pub const CRYPT_STICKY_CACHE_RETRIEVAL: u32 = 4096; pub const CRYPT_LDAP_SCOPE_BASE_ONLY_RETRIEVAL: u32 = 8192; pub const CRYPT_OFFLINE_CHECK_RETRIEVAL: u32 = 16384; pub const CRYPT_LDAP_INSERT_ENTRY_ATTRIBUTE: u32 = 32768; pub const CRYPT_LDAP_SIGN_RETRIEVAL: u32 = 65536; pub const CRYPT_NO_AUTH_RETRIEVAL: u32 = 131072; pub const CRYPT_LDAP_AREC_EXCLUSIVE_RETRIEVAL: u32 = 262144; pub const CRYPT_AIA_RETRIEVAL: u32 = 524288; pub const CRYPT_VERIFY_CONTEXT_SIGNATURE: u32 = 32; pub const CRYPT_VERIFY_DATA_HASH: u32 = 64; pub const CRYPT_KEEP_TIME_VALID: u32 = 128; pub const CRYPT_DONT_VERIFY_SIGNATURE: u32 = 256; pub const CRYPT_DONT_CHECK_TIME_VALIDITY: u32 = 512; pub const CRYPT_CHECK_FRESHNESS_TIME_VALIDITY: u32 = 1024; pub const CRYPT_ACCUMULATIVE_TIMEOUT: u32 = 2048; pub const CRYPT_MESSAGE_BARE_CONTENT_OUT_FLAG: u32 = 1; pub const CRYPT_MESSAGE_ENCAPSULATED_CONTENT_OUT_FLAG: u32 = 2; pub const CRYPT_MESSAGE_KEYID_SIGNER_FLAG: u32 = 4; pub const CRYPT_MESSAGE_SILENT_KEYSET_FLAG: u32 = 64; pub const CRYPT_MESSAGE_KEYID_RECIPIENT_FLAG: u32 = 4; pub const CRYPT_GET_URL_FROM_PROPERTY: u32 = 1; pub const CRYPT_GET_URL_FROM_EXTENSION: u32 = 2; pub const CRYPT_GET_URL_FROM_UNAUTH_ATTRIBUTE: u32 = 4; pub const CRYPT_GET_URL_FROM_AUTH_ATTRIBUTE: u32 = 8; pub const CRYPT_USER_KEYSET: u32 = 4096; pub const CRYPT_STRING_BASE64HEADER: u32 = 0; pub const CRYPT_STRING_BASE64: u32 = 1; pub const CRYPT_STRING_BINARY: u32 = 2; pub const CRYPT_STRING_BASE64REQUESTHEADER: u32 = 3; pub const CRYPT_STRING_HEX: u32 = 4; pub const CRYPT_STRING_HEXASCII: u32 = 5; pub const CRYPT_STRING_BASE64_ANY: u32 = 6; pub const CRYPT_STRING_ANY: u32 = 7; pub const CRYPT_STRING_HEX_ANY: u32 = 8; pub const CRYPT_STRING_BASE64X509CRLHEADER: u32 = 9; pub const CRYPT_STRING_HEXADDR: u32 = 10; pub const CRYPT_STRING_HEXASCIIADDR: u32 = 11; pub const CRYPT_STRING_BASE64URI: u32 = 13; pub const CRYPT_STRING_ENCODEMASK: u32 = 255; pub const CRYPT_STRING_NOCR: u32 = 2147483648; pub const CRYPT_STRING_NOCRLF: u32 = 1073741824; pub const CRYPT_STRING_STRICT: u32 = 536870912; pub const CRYPT_XER_ENCODING: u32 = 8; pub const CRYPT_GENERAL: u32 = 16384; pub const CRYPT_NOSERIALIZE: u32 = 65536; pub const CRYPT_REBOOT: u32 = 131072; pub const CRYPT_PROMT_INSERT_MEDIA: u32 = 262144; pub const CRYPT_UECDATACONTEXT: u32 = 524288; pub const CRYPT_CMS_HIGHLOAD_NOSERIALIZE: u32 = 1048576; pub const CRYPT_LOCAL_PASSWORD_CACHE: u32 = 2097152; pub const CRYPT_NO_CONTAINER_CACHE: u32 = 4194304; pub const CRYPT_USER_PROTECTED_STRONG: u32 = 1048576; pub const CRYPT_ECCNEGATIVE: u32 = 1024; pub const CRYPT_PUBLICCOMPRESS: u32 = 2048; pub const CRYPT_KEY_PROTECTION_HIGH: u32 = 4194304; pub const CRYPT_RSA_PSS: u32 = 128; pub const CRYPT_RSA_PKCS: u32 = 80; pub const CRYPT_RSA_X_509: u32 = 81; pub const CRYPT_RSA_RMASK: u32 = 82; pub const CRYPT_ALG_PARAM_OID_GROUP_ID: u32 = 20; pub const CRYPT_PROMIX_MODE: u32 = 1; pub const CRYPT_ACPKM_MODE: u32 = 1; pub const CRYPT_SIMPLEMIX_MODE: u32 = 0; pub const CRYPT_MIXDUPLICATE: u32 = 2; pub const CRYPT_CUR_HANDLES: u32 = 0; pub const CRYPT_MAX_HANDLES: u32 = 1; pub const CRYPT_PROPERTIES: u32 = 1024; pub const CRYPT_FILTER_EXPORTABLE: u32 = 512; pub const CRYPT_FILTER_PROVIDER_TYPE: u32 = 256; pub const CRYPT_AVAILABLE: u32 = 64; pub const CRYPT_MEDIA: u32 = 32; pub const CRYPT_FQCN: u32 = 16; pub const CRYPT_UNIQUE: u32 = 8; pub const CRYPT_FINISH: u32 = 4; pub const CRYPT_DELETEKEYSET_PART: u32 = 1; pub const CRYPT_PROPERTIES_LENGTH: u32 = 2; pub const CRYPT_PROPERTY_EXPORTABLE: u32 = 1; pub const CRYPT_PROPERTY_VERSION_1: u32 = 1; pub const CRYPT_PROPERTY_MINOR_INFO: u32 = 2; pub const CRYPT_PROPERTY_VERSION_2: u32 = 2; pub const CRYPT_MODE_CBCSTRICT: u32 = 1; pub const CRYPT_MODE_CBCRFC4357: u32 = 31; pub const CRYPT_MODE_CNT: u32 = 3; pub const CRYPT_MODE_CTR: u32 = 32; pub const CRYPT_MODE_MGM: u32 = 33; pub const CRYPT_MODE_GCM: u32 = 34; pub const CRYPT_MODE_OMAC_CTR: u32 = 35; pub const CRYPT_MODE_WRAP: u32 = 36; pub const CRYPT_MODE_WRAP_PAD: u32 = 37; pub const CRYPT_KEYSET_ENUM_FLAG: u32 = 1; pub const CRYPT_READER_WND_LIST_FIRST: u32 = 1; pub const CRYPT_READER_WND_LIST_NEXT: u32 = 2; pub const CRYPT_READER_WND_LIST_FREE: u32 = 3; pub const CRYPT_READER_WND_ANSWER: u32 = 4; pub const CRYPT_READER_WND_DEFAULT: u32 = 5; pub const CRYPT_READER_WND_DELETE: u32 = 6; pub const CRYPT_READER_WND_ICON: u32 = 7; pub const CRYPT_PIN_PASSWD: u32 = 0; pub const CRYPT_PIN_ENCRYPTION: u32 = 1; pub const CRYPT_PIN_NK: u32 = 2; pub const CRYPT_PIN_UNKNOWN: u32 = 3; pub const CRYPT_PIN_QUERY: u32 = 4; pub const CRYPT_PIN_CLEAR: u32 = 5; pub const CRYPT_PIN_HARDWARE_PROTECTION: u32 = 6; pub const CRYPT_PIN_FKC_EKE: u32 = 7; pub const CRYPT_PIN_WND: u32 = 8; pub const CRYPT_PIN_NK_NONAME: u32 = 9; pub const CRYPT_PIN_NK_VIRTUAL: u32 = 10; pub const CRYPT_PIN_WND_PARAM_CLEAR: u32 = 0; pub const CRYPT_PIN_WND_PARAM_INFO: u32 = 1; pub const CRYPT_PIN_WND_PARAM_AUTH: u32 = 2; pub const CRYPT_PIN_WND_PARAM_BOTH: u32 = 3; pub const CRYPT_NK_IDENTIFIER_LEN: u32 = 8; pub const CRYPT_NK_PART_INDEX: u32 = 1048576; pub const CRYPT_AUTH_PASSWD: u32 = 240; pub const CRYPT_AUTH_QUERY: u32 = 241; pub const CRYPT_AUTH_CLEAR: u32 = 242; pub const CRYPT_AUTH_RESET_TRIES: u32 = 243; pub const CRYPT_AUTH_RESET_ADMIN: u32 = 244; pub const CRYPT_AUTH_TYPE_PUK: u32 = 1; pub const CRYPT_AUTH_TYPE_ADMIN: u32 = 2; pub const CRYPT_AUTH_TYPE_CONT: u32 = 3; pub const CRYPT_AUTH_TYPE_USER_PIN1: u32 = 4; pub const CRYPT_AUTH_TYPE_USER_PIN2: u32 = 5; pub const CRYPT_AUTH_ALG_NO: u32 = 0; pub const CRYPT_AUTH_ALG_SELF: u32 = 1; pub const CRYPT_AUTH_ALG_SIMPLE: u32 = 2; pub const CRYPT_AUTH_ALG_SESPAKE: u32 = 3; pub const CRYPT_AUTH_INFO_DEF_ADMIN: u32 = 1; pub const CRYPT_AUTH_INFO_ADMIN_IS_CONT: u32 = 2; pub const CRYPT_AUTH_INFO_ADMIN_IS_PUK: u32 = 4; pub const CRYPT_AUTH_INFO_RESETS_COUNTERS: u32 = 8; pub const CRYPT_AUTH_INFO_CAN_RESET_COUNTERS: u32 = 16; pub const CRYPT_AUTH_INFO_CAN_CHANGE_AUTH: u32 = 32; pub const CRYPT_AUTH_INFO_CAN_RESET_ADMIN: u32 = 64; pub const CRYPT_AUTH_INFO_RESTORE_CONT_AFTER_FOLDER_OPEN: u32 = 128; pub const CRYPT_AUTH_INFO_HARDWARE_RESET_ROOT_DEF: u32 = 256; pub const CRYPT_AUTH_INFO_CHANGE_WITH_VERIFY: u32 = 512; pub const CRYPT_AUTH_INFO_COMMON_AUTH: u32 = 1024; pub const CRYPT_AUTH_INFO_MAIN_CAN_NOT_CHANGE_ITSELF: u32 = 2048; pub const CRYPT_MAX_PIN_LENGTH: u32 = 160; pub const CRYPT_FAST_CODE_ALL_KERNEL_FUNCTIONS: u32 = 1; pub const CRYPT_FAST_CODE_ALL_USER_FUNCTIONS: u32 = 2; pub const CRYPT_FAST_CODE_ALL_FUNCTIONS: u32 = 3; pub const CRYPT_FAST_CODE_GET_SETFN: u32 = 8; pub type CHAR = ::std::os::raw::c_char; pub type LONG = ::std::os::raw::c_int; pub type DWORD = ::std::os::raw::c_uint; pub type BOOL = ::std::os::raw::c_int; pub type BYTE = ::std::os::raw::c_uchar; pub type LPVOID = *mut ::std::os::raw::c_void; pub type LPCVOID = *const ::std::os::raw::c_void; pub type wchar_t = ::std::os::raw::c_int; pub type va_list = __builtin_va_list; pub type LPCWSTR = *const wchar_t; pub type TCHAR = ::std::os::raw::c_char; pub type LPCSTR = *const CHAR; pub type LPSTR = *mut CHAR; pub type LPTSTR = *mut TCHAR; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct _FILETIME { pub dwLowDateTime: DWORD, pub dwHighDateTime: DWORD, } #[test] fn bindgen_test_layout__FILETIME() { const UNINIT: ::std::mem::MaybeUninit<_FILETIME> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_FILETIME>(), 8usize, concat!("Size of: ", stringify!(_FILETIME)) ); assert_eq!( ::std::mem::align_of::<_FILETIME>(), 4usize, concat!("Alignment of ", stringify!(_FILETIME)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwLowDateTime) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_FILETIME), "::", stringify!(dwLowDateTime) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwHighDateTime) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_FILETIME), "::", stringify!(dwHighDateTime) ) ); } pub type FILETIME = _FILETIME; pub type LPFILETIME = *mut _FILETIME; pub type ALG_ID = ::std::os::raw::c_uint; pub type HCRYPTPROV = ULONG_PTR; pub type HCRYPTKEY = ULONG_PTR; pub type HCRYPTHASH = ULONG_PTR; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CRYPTOAPI_BLOB { pub cbData: DWORD, pub pbData: *mut BYTE, } #[test] fn bindgen_test_layout__CRYPTOAPI_BLOB() { const UNINIT: ::std::mem::MaybeUninit<_CRYPTOAPI_BLOB> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CRYPTOAPI_BLOB>(), 16usize, concat!("Size of: ", stringify!(_CRYPTOAPI_BLOB)) ); assert_eq!( ::std::mem::align_of::<_CRYPTOAPI_BLOB>(), 8usize, concat!("Alignment of ", stringify!(_CRYPTOAPI_BLOB)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbData) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CRYPTOAPI_BLOB), "::", stringify!(cbData) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pbData) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CRYPTOAPI_BLOB), "::", stringify!(pbData) ) ); } impl Default for _CRYPTOAPI_BLOB { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type CRYPT_INTEGER_BLOB = _CRYPTOAPI_BLOB; pub type CRYPT_OBJID_BLOB = _CRYPTOAPI_BLOB; pub type CERT_NAME_BLOB = _CRYPTOAPI_BLOB; pub type CRYPT_DATA_BLOB = _CRYPTOAPI_BLOB; pub type PCRYPT_DATA_BLOB = *mut _CRYPTOAPI_BLOB; pub type PCRYPT_ATTR_BLOB = *mut _CRYPTOAPI_BLOB; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CRYPT_BIT_BLOB { pub cbData: DWORD, pub pbData: *mut BYTE, pub cUnusedBits: DWORD, } #[test] fn bindgen_test_layout__CRYPT_BIT_BLOB() { const UNINIT: ::std::mem::MaybeUninit<_CRYPT_BIT_BLOB> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CRYPT_BIT_BLOB>(), 24usize, concat!("Size of: ", stringify!(_CRYPT_BIT_BLOB)) ); assert_eq!( ::std::mem::align_of::<_CRYPT_BIT_BLOB>(), 8usize, concat!("Alignment of ", stringify!(_CRYPT_BIT_BLOB)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbData) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CRYPT_BIT_BLOB), "::", stringify!(cbData) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pbData) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CRYPT_BIT_BLOB), "::", stringify!(pbData) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cUnusedBits) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CRYPT_BIT_BLOB), "::", stringify!(cUnusedBits) ) ); } impl Default for _CRYPT_BIT_BLOB { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type CRYPT_BIT_BLOB = _CRYPT_BIT_BLOB; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CRYPT_ALGORITHM_IDENTIFIER { pub pszObjId: LPSTR, pub Parameters: CRYPT_OBJID_BLOB, } #[test] fn bindgen_test_layout__CRYPT_ALGORITHM_IDENTIFIER() { const UNINIT: ::std::mem::MaybeUninit<_CRYPT_ALGORITHM_IDENTIFIER> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CRYPT_ALGORITHM_IDENTIFIER>(), 24usize, concat!("Size of: ", stringify!(_CRYPT_ALGORITHM_IDENTIFIER)) ); assert_eq!( ::std::mem::align_of::<_CRYPT_ALGORITHM_IDENTIFIER>(), 8usize, concat!("Alignment of ", stringify!(_CRYPT_ALGORITHM_IDENTIFIER)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pszObjId) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CRYPT_ALGORITHM_IDENTIFIER), "::", stringify!(pszObjId) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Parameters) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CRYPT_ALGORITHM_IDENTIFIER), "::", stringify!(Parameters) ) ); } impl Default for _CRYPT_ALGORITHM_IDENTIFIER { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type CRYPT_ALGORITHM_IDENTIFIER = _CRYPT_ALGORITHM_IDENTIFIER; pub type PCRYPT_ALGORITHM_IDENTIFIER = *mut _CRYPT_ALGORITHM_IDENTIFIER; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CERT_EXTENSION { pub pszObjId: LPSTR, pub fCritical: BOOL, pub Value: CRYPT_OBJID_BLOB, } #[test] fn bindgen_test_layout__CERT_EXTENSION() { const UNINIT: ::std::mem::MaybeUninit<_CERT_EXTENSION> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CERT_EXTENSION>(), 32usize, concat!("Size of: ", stringify!(_CERT_EXTENSION)) ); assert_eq!( ::std::mem::align_of::<_CERT_EXTENSION>(), 8usize, concat!("Alignment of ", stringify!(_CERT_EXTENSION)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pszObjId) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CERT_EXTENSION), "::", stringify!(pszObjId) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fCritical) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CERT_EXTENSION), "::", stringify!(fCritical) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Value) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CERT_EXTENSION), "::", stringify!(Value) ) ); } impl Default for _CERT_EXTENSION { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCERT_EXTENSION = *mut _CERT_EXTENSION; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CRYPT_ATTRIBUTE { pub pszObjId: LPSTR, pub cValue: DWORD, pub rgValue: PCRYPT_ATTR_BLOB, } #[test] fn bindgen_test_layout__CRYPT_ATTRIBUTE() { const UNINIT: ::std::mem::MaybeUninit<_CRYPT_ATTRIBUTE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CRYPT_ATTRIBUTE>(), 24usize, concat!("Size of: ", stringify!(_CRYPT_ATTRIBUTE)) ); assert_eq!( ::std::mem::align_of::<_CRYPT_ATTRIBUTE>(), 8usize, concat!("Alignment of ", stringify!(_CRYPT_ATTRIBUTE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pszObjId) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CRYPT_ATTRIBUTE), "::", stringify!(pszObjId) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cValue) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CRYPT_ATTRIBUTE), "::", stringify!(cValue) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgValue) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CRYPT_ATTRIBUTE), "::", stringify!(rgValue) ) ); } impl Default for _CRYPT_ATTRIBUTE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCRYPT_ATTRIBUTE = *mut _CRYPT_ATTRIBUTE; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CERT_PUBLIC_KEY_INFO { pub Algorithm: CRYPT_ALGORITHM_IDENTIFIER, pub PublicKey: CRYPT_BIT_BLOB, } #[test] fn bindgen_test_layout__CERT_PUBLIC_KEY_INFO() { const UNINIT: ::std::mem::MaybeUninit<_CERT_PUBLIC_KEY_INFO> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CERT_PUBLIC_KEY_INFO>(), 48usize, concat!("Size of: ", stringify!(_CERT_PUBLIC_KEY_INFO)) ); assert_eq!( ::std::mem::align_of::<_CERT_PUBLIC_KEY_INFO>(), 8usize, concat!("Alignment of ", stringify!(_CERT_PUBLIC_KEY_INFO)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Algorithm) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CERT_PUBLIC_KEY_INFO), "::", stringify!(Algorithm) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).PublicKey) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CERT_PUBLIC_KEY_INFO), "::", stringify!(PublicKey) ) ); } impl Default for _CERT_PUBLIC_KEY_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type CERT_PUBLIC_KEY_INFO = _CERT_PUBLIC_KEY_INFO; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CERT_INFO { pub dwVersion: DWORD, pub SerialNumber: CRYPT_INTEGER_BLOB, pub SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub Issuer: CERT_NAME_BLOB, pub NotBefore: FILETIME, pub NotAfter: FILETIME, pub Subject: CERT_NAME_BLOB, pub SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO, pub IssuerUniqueId: CRYPT_BIT_BLOB, pub SubjectUniqueId: CRYPT_BIT_BLOB, pub cExtension: DWORD, pub rgExtension: PCERT_EXTENSION, } #[test] fn bindgen_test_layout__CERT_INFO() { const UNINIT: ::std::mem::MaybeUninit<_CERT_INFO> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CERT_INFO>(), 208usize, concat!("Size of: ", stringify!(_CERT_INFO)) ); assert_eq!( ::std::mem::align_of::<_CERT_INFO>(), 8usize, concat!("Alignment of ", stringify!(_CERT_INFO)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CERT_INFO), "::", stringify!(dwVersion) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).SerialNumber) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CERT_INFO), "::", stringify!(SerialNumber) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).SignatureAlgorithm) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CERT_INFO), "::", stringify!(SignatureAlgorithm) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Issuer) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_CERT_INFO), "::", stringify!(Issuer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).NotBefore) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(_CERT_INFO), "::", stringify!(NotBefore) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).NotAfter) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(_CERT_INFO), "::", stringify!(NotAfter) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Subject) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", stringify!(_CERT_INFO), "::", stringify!(Subject) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).SubjectPublicKeyInfo) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", stringify!(_CERT_INFO), "::", stringify!(SubjectPublicKeyInfo) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).IssuerUniqueId) as usize - ptr as usize }, 144usize, concat!( "Offset of field: ", stringify!(_CERT_INFO), "::", stringify!(IssuerUniqueId) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).SubjectUniqueId) as usize - ptr as usize }, 168usize, concat!( "Offset of field: ", stringify!(_CERT_INFO), "::", stringify!(SubjectUniqueId) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cExtension) as usize - ptr as usize }, 192usize, concat!( "Offset of field: ", stringify!(_CERT_INFO), "::", stringify!(cExtension) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgExtension) as usize - ptr as usize }, 200usize, concat!( "Offset of field: ", stringify!(_CERT_INFO), "::", stringify!(rgExtension) ) ); } impl Default for _CERT_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCERT_INFO = *mut _CERT_INFO; pub type HCRYPTMSG = *mut ::std::os::raw::c_void; pub type HCERTSTORE = *mut ::std::os::raw::c_void; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CERT_CONTEXT { pub dwCertEncodingType: DWORD, pub pbCertEncoded: *mut BYTE, pub cbCertEncoded: DWORD, pub pCertInfo: PCERT_INFO, pub hCertStore: HCERTSTORE, } #[test] fn bindgen_test_layout__CERT_CONTEXT() { const UNINIT: ::std::mem::MaybeUninit<_CERT_CONTEXT> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CERT_CONTEXT>(), 40usize, concat!("Size of: ", stringify!(_CERT_CONTEXT)) ); assert_eq!( ::std::mem::align_of::<_CERT_CONTEXT>(), 8usize, concat!("Alignment of ", stringify!(_CERT_CONTEXT)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwCertEncodingType) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CERT_CONTEXT), "::", stringify!(dwCertEncodingType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pbCertEncoded) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CERT_CONTEXT), "::", stringify!(pbCertEncoded) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbCertEncoded) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CERT_CONTEXT), "::", stringify!(cbCertEncoded) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pCertInfo) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CERT_CONTEXT), "::", stringify!(pCertInfo) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hCertStore) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_CERT_CONTEXT), "::", stringify!(hCertStore) ) ); } impl Default for _CERT_CONTEXT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type CERT_CONTEXT = _CERT_CONTEXT; pub type PCCERT_CONTEXT = *const CERT_CONTEXT; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CRL_ENTRY { pub SerialNumber: CRYPT_INTEGER_BLOB, pub RevocationDate: FILETIME, pub cExtension: DWORD, pub rgExtension: PCERT_EXTENSION, } #[test] fn bindgen_test_layout__CRL_ENTRY() { const UNINIT: ::std::mem::MaybeUninit<_CRL_ENTRY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CRL_ENTRY>(), 40usize, concat!("Size of: ", stringify!(_CRL_ENTRY)) ); assert_eq!( ::std::mem::align_of::<_CRL_ENTRY>(), 8usize, concat!("Alignment of ", stringify!(_CRL_ENTRY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).SerialNumber) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CRL_ENTRY), "::", stringify!(SerialNumber) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).RevocationDate) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CRL_ENTRY), "::", stringify!(RevocationDate) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cExtension) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CRL_ENTRY), "::", stringify!(cExtension) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgExtension) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_CRL_ENTRY), "::", stringify!(rgExtension) ) ); } impl Default for _CRL_ENTRY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCRL_ENTRY = *mut _CRL_ENTRY; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CRL_INFO { pub dwVersion: DWORD, pub SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub Issuer: CERT_NAME_BLOB, pub ThisUpdate: FILETIME, pub NextUpdate: FILETIME, pub cCRLEntry: DWORD, pub rgCRLEntry: PCRL_ENTRY, pub cExtension: DWORD, pub rgExtension: PCERT_EXTENSION, } #[test] fn bindgen_test_layout__CRL_INFO() { const UNINIT: ::std::mem::MaybeUninit<_CRL_INFO> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CRL_INFO>(), 96usize, concat!("Size of: ", stringify!(_CRL_INFO)) ); assert_eq!( ::std::mem::align_of::<_CRL_INFO>(), 8usize, concat!("Alignment of ", stringify!(_CRL_INFO)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CRL_INFO), "::", stringify!(dwVersion) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).SignatureAlgorithm) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CRL_INFO), "::", stringify!(SignatureAlgorithm) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Issuer) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_CRL_INFO), "::", stringify!(Issuer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ThisUpdate) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_CRL_INFO), "::", stringify!(ThisUpdate) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).NextUpdate) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(_CRL_INFO), "::", stringify!(NextUpdate) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cCRLEntry) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(_CRL_INFO), "::", stringify!(cCRLEntry) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgCRLEntry) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(_CRL_INFO), "::", stringify!(rgCRLEntry) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cExtension) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", stringify!(_CRL_INFO), "::", stringify!(cExtension) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgExtension) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", stringify!(_CRL_INFO), "::", stringify!(rgExtension) ) ); } impl Default for _CRL_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCRL_INFO = *mut _CRL_INFO; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CRL_CONTEXT { pub dwCertEncodingType: DWORD, pub pbCrlEncoded: *mut BYTE, pub cbCrlEncoded: DWORD, pub pCrlInfo: PCRL_INFO, pub hCertStore: HCERTSTORE, } #[test] fn bindgen_test_layout__CRL_CONTEXT() { const UNINIT: ::std::mem::MaybeUninit<_CRL_CONTEXT> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CRL_CONTEXT>(), 40usize, concat!("Size of: ", stringify!(_CRL_CONTEXT)) ); assert_eq!( ::std::mem::align_of::<_CRL_CONTEXT>(), 8usize, concat!("Alignment of ", stringify!(_CRL_CONTEXT)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwCertEncodingType) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CRL_CONTEXT), "::", stringify!(dwCertEncodingType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pbCrlEncoded) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CRL_CONTEXT), "::", stringify!(pbCrlEncoded) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbCrlEncoded) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CRL_CONTEXT), "::", stringify!(cbCrlEncoded) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pCrlInfo) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CRL_CONTEXT), "::", stringify!(pCrlInfo) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hCertStore) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_CRL_CONTEXT), "::", stringify!(hCertStore) ) ); } impl Default for _CRL_CONTEXT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type CRL_CONTEXT = _CRL_CONTEXT; pub type PCCRL_CONTEXT = *const CRL_CONTEXT; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CTL_USAGE { pub cUsageIdentifier: DWORD, pub rgpszUsageIdentifier: *mut LPSTR, } #[test] fn bindgen_test_layout__CTL_USAGE() { const UNINIT: ::std::mem::MaybeUninit<_CTL_USAGE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CTL_USAGE>(), 16usize, concat!("Size of: ", stringify!(_CTL_USAGE)) ); assert_eq!( ::std::mem::align_of::<_CTL_USAGE>(), 8usize, concat!("Alignment of ", stringify!(_CTL_USAGE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cUsageIdentifier) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CTL_USAGE), "::", stringify!(cUsageIdentifier) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgpszUsageIdentifier) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CTL_USAGE), "::", stringify!(rgpszUsageIdentifier) ) ); } impl Default for _CTL_USAGE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type CTL_USAGE = _CTL_USAGE; pub type PCERT_ENHKEY_USAGE = *mut _CTL_USAGE; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CTL_ENTRY { pub SubjectIdentifier: CRYPT_DATA_BLOB, pub cAttribute: DWORD, pub rgAttribute: PCRYPT_ATTRIBUTE, } #[test] fn bindgen_test_layout__CTL_ENTRY() { const UNINIT: ::std::mem::MaybeUninit<_CTL_ENTRY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CTL_ENTRY>(), 32usize, concat!("Size of: ", stringify!(_CTL_ENTRY)) ); assert_eq!( ::std::mem::align_of::<_CTL_ENTRY>(), 8usize, concat!("Alignment of ", stringify!(_CTL_ENTRY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).SubjectIdentifier) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CTL_ENTRY), "::", stringify!(SubjectIdentifier) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cAttribute) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CTL_ENTRY), "::", stringify!(cAttribute) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgAttribute) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CTL_ENTRY), "::", stringify!(rgAttribute) ) ); } impl Default for _CTL_ENTRY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCTL_ENTRY = *mut _CTL_ENTRY; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CTL_INFO { pub dwVersion: DWORD, pub SubjectUsage: CTL_USAGE, pub ListIdentifier: CRYPT_DATA_BLOB, pub SequenceNumber: CRYPT_INTEGER_BLOB, pub ThisUpdate: FILETIME, pub NextUpdate: FILETIME, pub SubjectAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub cCTLEntry: DWORD, pub rgCTLEntry: PCTL_ENTRY, pub cExtension: DWORD, pub rgExtension: PCERT_EXTENSION, } #[test] fn bindgen_test_layout__CTL_INFO() { const UNINIT: ::std::mem::MaybeUninit<_CTL_INFO> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CTL_INFO>(), 128usize, concat!("Size of: ", stringify!(_CTL_INFO)) ); assert_eq!( ::std::mem::align_of::<_CTL_INFO>(), 8usize, concat!("Alignment of ", stringify!(_CTL_INFO)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CTL_INFO), "::", stringify!(dwVersion) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).SubjectUsage) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CTL_INFO), "::", stringify!(SubjectUsage) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ListIdentifier) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CTL_INFO), "::", stringify!(ListIdentifier) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).SequenceNumber) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(_CTL_INFO), "::", stringify!(SequenceNumber) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ThisUpdate) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(_CTL_INFO), "::", stringify!(ThisUpdate) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).NextUpdate) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(_CTL_INFO), "::", stringify!(NextUpdate) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).SubjectAlgorithm) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(_CTL_INFO), "::", stringify!(SubjectAlgorithm) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cCTLEntry) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", stringify!(_CTL_INFO), "::", stringify!(cCTLEntry) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgCTLEntry) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", stringify!(_CTL_INFO), "::", stringify!(rgCTLEntry) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cExtension) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", stringify!(_CTL_INFO), "::", stringify!(cExtension) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgExtension) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", stringify!(_CTL_INFO), "::", stringify!(rgExtension) ) ); } impl Default for _CTL_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCTL_INFO = *mut _CTL_INFO; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CTL_CONTEXT { pub dwMsgAndCertEncodingType: DWORD, pub pbCtlEncoded: *mut BYTE, pub cbCtlEncoded: DWORD, pub pCtlInfo: PCTL_INFO, pub hCertStore: HCERTSTORE, pub hCryptMsg: HCRYPTMSG, pub pbCtlContent: *mut BYTE, pub cbCtlContent: DWORD, } #[test] fn bindgen_test_layout__CTL_CONTEXT() { const UNINIT: ::std::mem::MaybeUninit<_CTL_CONTEXT> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CTL_CONTEXT>(), 64usize, concat!("Size of: ", stringify!(_CTL_CONTEXT)) ); assert_eq!( ::std::mem::align_of::<_CTL_CONTEXT>(), 8usize, concat!("Alignment of ", stringify!(_CTL_CONTEXT)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwMsgAndCertEncodingType) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CTL_CONTEXT), "::", stringify!(dwMsgAndCertEncodingType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pbCtlEncoded) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CTL_CONTEXT), "::", stringify!(pbCtlEncoded) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbCtlEncoded) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CTL_CONTEXT), "::", stringify!(cbCtlEncoded) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pCtlInfo) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CTL_CONTEXT), "::", stringify!(pCtlInfo) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hCertStore) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_CTL_CONTEXT), "::", stringify!(hCertStore) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hCryptMsg) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(_CTL_CONTEXT), "::", stringify!(hCryptMsg) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pbCtlContent) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_CTL_CONTEXT), "::", stringify!(pbCtlContent) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbCtlContent) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(_CTL_CONTEXT), "::", stringify!(cbCtlContent) ) ); } impl Default for _CTL_CONTEXT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type CTL_CONTEXT = _CTL_CONTEXT; pub type PCCTL_CONTEXT = *const CTL_CONTEXT; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CERT_REVOCATION_CRL_INFO { pub cbSize: DWORD, pub pBaseCrlContext: PCCRL_CONTEXT, pub pDeltaCrlContext: PCCRL_CONTEXT, pub pCrlEntry: PCRL_ENTRY, pub fDeltaCrlEntry: BOOL, } #[test] fn bindgen_test_layout__CERT_REVOCATION_CRL_INFO() { const UNINIT: ::std::mem::MaybeUninit<_CERT_REVOCATION_CRL_INFO> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CERT_REVOCATION_CRL_INFO>(), 40usize, concat!("Size of: ", stringify!(_CERT_REVOCATION_CRL_INFO)) ); assert_eq!( ::std::mem::align_of::<_CERT_REVOCATION_CRL_INFO>(), 8usize, concat!("Alignment of ", stringify!(_CERT_REVOCATION_CRL_INFO)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CERT_REVOCATION_CRL_INFO), "::", stringify!(cbSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pBaseCrlContext) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CERT_REVOCATION_CRL_INFO), "::", stringify!(pBaseCrlContext) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pDeltaCrlContext) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CERT_REVOCATION_CRL_INFO), "::", stringify!(pDeltaCrlContext) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pCrlEntry) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CERT_REVOCATION_CRL_INFO), "::", stringify!(pCrlEntry) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fDeltaCrlEntry) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_CERT_REVOCATION_CRL_INFO), "::", stringify!(fDeltaCrlEntry) ) ); } impl Default for _CERT_REVOCATION_CRL_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCERT_REVOCATION_CRL_INFO = *mut _CERT_REVOCATION_CRL_INFO; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct _CERT_TRUST_STATUS { pub dwErrorStatus: DWORD, pub dwInfoStatus: DWORD, } #[test] fn bindgen_test_layout__CERT_TRUST_STATUS() { const UNINIT: ::std::mem::MaybeUninit<_CERT_TRUST_STATUS> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CERT_TRUST_STATUS>(), 8usize, concat!("Size of: ", stringify!(_CERT_TRUST_STATUS)) ); assert_eq!( ::std::mem::align_of::<_CERT_TRUST_STATUS>(), 4usize, concat!("Alignment of ", stringify!(_CERT_TRUST_STATUS)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwErrorStatus) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CERT_TRUST_STATUS), "::", stringify!(dwErrorStatus) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwInfoStatus) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_CERT_TRUST_STATUS), "::", stringify!(dwInfoStatus) ) ); } pub type CERT_TRUST_STATUS = _CERT_TRUST_STATUS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CERT_REVOCATION_INFO { pub cbSize: DWORD, pub dwRevocationResult: DWORD, pub pszRevocationOid: LPCSTR, pub pvOidSpecificInfo: LPVOID, pub fHasFreshnessTime: BOOL, pub dwFreshnessTime: DWORD, pub pCrlInfo: PCERT_REVOCATION_CRL_INFO, } #[test] fn bindgen_test_layout__CERT_REVOCATION_INFO() { const UNINIT: ::std::mem::MaybeUninit<_CERT_REVOCATION_INFO> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CERT_REVOCATION_INFO>(), 40usize, concat!("Size of: ", stringify!(_CERT_REVOCATION_INFO)) ); assert_eq!( ::std::mem::align_of::<_CERT_REVOCATION_INFO>(), 8usize, concat!("Alignment of ", stringify!(_CERT_REVOCATION_INFO)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CERT_REVOCATION_INFO), "::", stringify!(cbSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwRevocationResult) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_CERT_REVOCATION_INFO), "::", stringify!(dwRevocationResult) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pszRevocationOid) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CERT_REVOCATION_INFO), "::", stringify!(pszRevocationOid) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pvOidSpecificInfo) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CERT_REVOCATION_INFO), "::", stringify!(pvOidSpecificInfo) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fHasFreshnessTime) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CERT_REVOCATION_INFO), "::", stringify!(fHasFreshnessTime) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwFreshnessTime) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", stringify!(_CERT_REVOCATION_INFO), "::", stringify!(dwFreshnessTime) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pCrlInfo) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_CERT_REVOCATION_INFO), "::", stringify!(pCrlInfo) ) ); } impl Default for _CERT_REVOCATION_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCERT_REVOCATION_INFO = *mut _CERT_REVOCATION_INFO; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CERT_TRUST_LIST_INFO { pub cbSize: DWORD, pub pCtlEntry: PCTL_ENTRY, pub pCtlContext: PCCTL_CONTEXT, } #[test] fn bindgen_test_layout__CERT_TRUST_LIST_INFO() { const UNINIT: ::std::mem::MaybeUninit<_CERT_TRUST_LIST_INFO> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CERT_TRUST_LIST_INFO>(), 24usize, concat!("Size of: ", stringify!(_CERT_TRUST_LIST_INFO)) ); assert_eq!( ::std::mem::align_of::<_CERT_TRUST_LIST_INFO>(), 8usize, concat!("Alignment of ", stringify!(_CERT_TRUST_LIST_INFO)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CERT_TRUST_LIST_INFO), "::", stringify!(cbSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pCtlEntry) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CERT_TRUST_LIST_INFO), "::", stringify!(pCtlEntry) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pCtlContext) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CERT_TRUST_LIST_INFO), "::", stringify!(pCtlContext) ) ); } impl Default for _CERT_TRUST_LIST_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCERT_TRUST_LIST_INFO = *mut _CERT_TRUST_LIST_INFO; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CERT_CHAIN_ELEMENT { pub cbSize: DWORD, pub pCertContext: PCCERT_CONTEXT, pub TrustStatus: CERT_TRUST_STATUS, pub pRevocationInfo: PCERT_REVOCATION_INFO, pub pIssuanceUsage: PCERT_ENHKEY_USAGE, pub pApplicationUsage: PCERT_ENHKEY_USAGE, pub pwszExtendedErrorInfo: LPCWSTR, } #[test] fn bindgen_test_layout__CERT_CHAIN_ELEMENT() { const UNINIT: ::std::mem::MaybeUninit<_CERT_CHAIN_ELEMENT> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CERT_CHAIN_ELEMENT>(), 56usize, concat!("Size of: ", stringify!(_CERT_CHAIN_ELEMENT)) ); assert_eq!( ::std::mem::align_of::<_CERT_CHAIN_ELEMENT>(), 8usize, concat!("Alignment of ", stringify!(_CERT_CHAIN_ELEMENT)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_ELEMENT), "::", stringify!(cbSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pCertContext) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_ELEMENT), "::", stringify!(pCertContext) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).TrustStatus) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_ELEMENT), "::", stringify!(TrustStatus) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pRevocationInfo) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_ELEMENT), "::", stringify!(pRevocationInfo) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pIssuanceUsage) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_ELEMENT), "::", stringify!(pIssuanceUsage) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pApplicationUsage) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_ELEMENT), "::", stringify!(pApplicationUsage) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pwszExtendedErrorInfo) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_ELEMENT), "::", stringify!(pwszExtendedErrorInfo) ) ); } impl Default for _CERT_CHAIN_ELEMENT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCERT_CHAIN_ELEMENT = *mut _CERT_CHAIN_ELEMENT; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CERT_SIMPLE_CHAIN { pub cbSize: DWORD, pub TrustStatus: CERT_TRUST_STATUS, pub cElement: DWORD, pub rgpElement: *mut PCERT_CHAIN_ELEMENT, pub pTrustListInfo: PCERT_TRUST_LIST_INFO, pub fHasRevocationFreshnessTime: BOOL, pub dwRevocationFreshnessTime: DWORD, } #[test] fn bindgen_test_layout__CERT_SIMPLE_CHAIN() { const UNINIT: ::std::mem::MaybeUninit<_CERT_SIMPLE_CHAIN> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CERT_SIMPLE_CHAIN>(), 40usize, concat!("Size of: ", stringify!(_CERT_SIMPLE_CHAIN)) ); assert_eq!( ::std::mem::align_of::<_CERT_SIMPLE_CHAIN>(), 8usize, concat!("Alignment of ", stringify!(_CERT_SIMPLE_CHAIN)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CERT_SIMPLE_CHAIN), "::", stringify!(cbSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).TrustStatus) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_CERT_SIMPLE_CHAIN), "::", stringify!(TrustStatus) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cElement) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(_CERT_SIMPLE_CHAIN), "::", stringify!(cElement) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgpElement) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CERT_SIMPLE_CHAIN), "::", stringify!(rgpElement) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pTrustListInfo) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CERT_SIMPLE_CHAIN), "::", stringify!(pTrustListInfo) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fHasRevocationFreshnessTime) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_CERT_SIMPLE_CHAIN), "::", stringify!(fHasRevocationFreshnessTime) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwRevocationFreshnessTime) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", stringify!(_CERT_SIMPLE_CHAIN), "::", stringify!(dwRevocationFreshnessTime) ) ); } impl Default for _CERT_SIMPLE_CHAIN { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCERT_SIMPLE_CHAIN = *mut _CERT_SIMPLE_CHAIN; pub type CERT_CHAIN_CONTEXT = _CERT_CHAIN_CONTEXT; pub type PCCERT_CHAIN_CONTEXT = *const CERT_CHAIN_CONTEXT; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CERT_CHAIN_CONTEXT { pub cbSize: DWORD, pub TrustStatus: CERT_TRUST_STATUS, pub cChain: DWORD, pub rgpChain: *mut PCERT_SIMPLE_CHAIN, pub cLowerQualityChainContext: DWORD, pub rgpLowerQualityChainContext: *mut PCCERT_CHAIN_CONTEXT, pub fHasRevocationFreshnessTime: BOOL, pub dwRevocationFreshnessTime: DWORD, } #[test] fn bindgen_test_layout__CERT_CHAIN_CONTEXT() { const UNINIT: ::std::mem::MaybeUninit<_CERT_CHAIN_CONTEXT> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CERT_CHAIN_CONTEXT>(), 48usize, concat!("Size of: ", stringify!(_CERT_CHAIN_CONTEXT)) ); assert_eq!( ::std::mem::align_of::<_CERT_CHAIN_CONTEXT>(), 8usize, concat!("Alignment of ", stringify!(_CERT_CHAIN_CONTEXT)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_CONTEXT), "::", stringify!(cbSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).TrustStatus) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_CONTEXT), "::", stringify!(TrustStatus) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cChain) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_CONTEXT), "::", stringify!(cChain) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgpChain) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_CONTEXT), "::", stringify!(rgpChain) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cLowerQualityChainContext) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_CONTEXT), "::", stringify!(cLowerQualityChainContext) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgpLowerQualityChainContext) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_CONTEXT), "::", stringify!(rgpLowerQualityChainContext) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fHasRevocationFreshnessTime) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_CONTEXT), "::", stringify!(fHasRevocationFreshnessTime) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwRevocationFreshnessTime) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_CONTEXT), "::", stringify!(dwRevocationFreshnessTime) ) ); } impl Default for _CERT_CHAIN_CONTEXT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CERT_CHAIN_POLICY_PARA { pub cbSize: DWORD, pub dwFlags: DWORD, pub pvExtraPolicyPara: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__CERT_CHAIN_POLICY_PARA() { const UNINIT: ::std::mem::MaybeUninit<_CERT_CHAIN_POLICY_PARA> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CERT_CHAIN_POLICY_PARA>(), 16usize, concat!("Size of: ", stringify!(_CERT_CHAIN_POLICY_PARA)) ); assert_eq!( ::std::mem::align_of::<_CERT_CHAIN_POLICY_PARA>(), 8usize, concat!("Alignment of ", stringify!(_CERT_CHAIN_POLICY_PARA)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_POLICY_PARA), "::", stringify!(cbSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwFlags) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_POLICY_PARA), "::", stringify!(dwFlags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pvExtraPolicyPara) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_POLICY_PARA), "::", stringify!(pvExtraPolicyPara) ) ); } impl Default for _CERT_CHAIN_POLICY_PARA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCERT_CHAIN_POLICY_PARA = *mut _CERT_CHAIN_POLICY_PARA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CERT_CHAIN_POLICY_STATUS { pub cbSize: DWORD, pub dwError: DWORD, pub lChainIndex: LONG, pub lElementIndex: LONG, pub pvExtraPolicyStatus: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__CERT_CHAIN_POLICY_STATUS() { const UNINIT: ::std::mem::MaybeUninit<_CERT_CHAIN_POLICY_STATUS> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CERT_CHAIN_POLICY_STATUS>(), 24usize, concat!("Size of: ", stringify!(_CERT_CHAIN_POLICY_STATUS)) ); assert_eq!( ::std::mem::align_of::<_CERT_CHAIN_POLICY_STATUS>(), 8usize, concat!("Alignment of ", stringify!(_CERT_CHAIN_POLICY_STATUS)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_POLICY_STATUS), "::", stringify!(cbSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwError) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_POLICY_STATUS), "::", stringify!(dwError) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lChainIndex) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_POLICY_STATUS), "::", stringify!(lChainIndex) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lElementIndex) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_POLICY_STATUS), "::", stringify!(lElementIndex) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pvExtraPolicyStatus) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CERT_CHAIN_POLICY_STATUS), "::", stringify!(pvExtraPolicyStatus) ) ); } impl Default for _CERT_CHAIN_POLICY_STATUS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCERT_CHAIN_POLICY_STATUS = *mut _CERT_CHAIN_POLICY_STATUS; pub type PFN_CRYPT_GET_SIGNER_CERTIFICATE = ::std::option::Option< unsafe extern "C" fn( pvGetArg: *mut ::std::os::raw::c_void, dwCertEncodingType: DWORD, pSignerId: PCERT_INFO, hMsgCertStore: HCERTSTORE, ) -> PCCERT_CONTEXT, >; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CRYPT_SIGN_MESSAGE_PARA { pub cbSize: DWORD, pub dwMsgEncodingType: DWORD, pub pSigningCert: PCCERT_CONTEXT, pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pvHashAuxInfo: *mut ::std::os::raw::c_void, pub cMsgCert: DWORD, pub rgpMsgCert: *mut PCCERT_CONTEXT, pub cMsgCrl: DWORD, pub rgpMsgCrl: *mut PCCRL_CONTEXT, pub cAuthAttr: DWORD, pub rgAuthAttr: PCRYPT_ATTRIBUTE, pub cUnauthAttr: DWORD, pub rgUnauthAttr: PCRYPT_ATTRIBUTE, pub dwFlags: DWORD, pub dwInnerContentType: DWORD, } #[test] fn bindgen_test_layout__CRYPT_SIGN_MESSAGE_PARA() { const UNINIT: ::std::mem::MaybeUninit<_CRYPT_SIGN_MESSAGE_PARA> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CRYPT_SIGN_MESSAGE_PARA>(), 120usize, concat!("Size of: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA)) ); assert_eq!( ::std::mem::align_of::<_CRYPT_SIGN_MESSAGE_PARA>(), 8usize, concat!("Alignment of ", stringify!(_CRYPT_SIGN_MESSAGE_PARA)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(cbSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwMsgEncodingType) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(dwMsgEncodingType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSigningCert) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(pSigningCert) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).HashAlgorithm) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(HashAlgorithm) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pvHashAuxInfo) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(pvHashAuxInfo) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cMsgCert) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(cMsgCert) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgpMsgCert) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(rgpMsgCert) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cMsgCrl) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(cMsgCrl) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgpMsgCrl) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(rgpMsgCrl) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cAuthAttr) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(cAuthAttr) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgAuthAttr) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(rgAuthAttr) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cUnauthAttr) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(cUnauthAttr) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rgUnauthAttr) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(rgUnauthAttr) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwFlags) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(dwFlags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwInnerContentType) as usize - ptr as usize }, 116usize, concat!( "Offset of field: ", stringify!(_CRYPT_SIGN_MESSAGE_PARA), "::", stringify!(dwInnerContentType) ) ); } impl Default for _CRYPT_SIGN_MESSAGE_PARA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCRYPT_SIGN_MESSAGE_PARA = *mut _CRYPT_SIGN_MESSAGE_PARA; #[repr(C)] pub struct _CRYPT_VERIFY_MESSAGE_PARA { pub cbSize: DWORD, pub dwMsgAndCertEncodingType: DWORD, pub hCryptProv: HCRYPTPROV, pub pfnGetSignerCertificate: PFN_CRYPT_GET_SIGNER_CERTIFICATE, pub pvGetArg: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__CRYPT_VERIFY_MESSAGE_PARA() { const UNINIT: ::std::mem::MaybeUninit<_CRYPT_VERIFY_MESSAGE_PARA> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CRYPT_VERIFY_MESSAGE_PARA>(), 32usize, concat!("Size of: ", stringify!(_CRYPT_VERIFY_MESSAGE_PARA)) ); assert_eq!( ::std::mem::align_of::<_CRYPT_VERIFY_MESSAGE_PARA>(), 8usize, concat!("Alignment of ", stringify!(_CRYPT_VERIFY_MESSAGE_PARA)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CRYPT_VERIFY_MESSAGE_PARA), "::", stringify!(cbSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwMsgAndCertEncodingType) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_CRYPT_VERIFY_MESSAGE_PARA), "::", stringify!(dwMsgAndCertEncodingType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hCryptProv) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CRYPT_VERIFY_MESSAGE_PARA), "::", stringify!(hCryptProv) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfnGetSignerCertificate) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CRYPT_VERIFY_MESSAGE_PARA), "::", stringify!(pfnGetSignerCertificate) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pvGetArg) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CRYPT_VERIFY_MESSAGE_PARA), "::", stringify!(pvGetArg) ) ); } impl Default for _CRYPT_VERIFY_MESSAGE_PARA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCRYPT_VERIFY_MESSAGE_PARA = *mut _CRYPT_VERIFY_MESSAGE_PARA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CADES_AUTH_PARA { pub dwSize: DWORD, pub dwAuthType: DWORD, pub wszUsername: LPCWSTR, pub wszPassword: LPCWSTR, pub pClientCertificate: PCCERT_CONTEXT, } #[test] fn bindgen_test_layout__CADES_AUTH_PARA() { const UNINIT: ::std::mem::MaybeUninit<_CADES_AUTH_PARA> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CADES_AUTH_PARA>(), 32usize, concat!("Size of: ", stringify!(_CADES_AUTH_PARA)) ); assert_eq!( ::std::mem::align_of::<_CADES_AUTH_PARA>(), 8usize, concat!("Alignment of ", stringify!(_CADES_AUTH_PARA)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CADES_AUTH_PARA), "::", stringify!(dwSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwAuthType) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_CADES_AUTH_PARA), "::", stringify!(dwAuthType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).wszUsername) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CADES_AUTH_PARA), "::", stringify!(wszUsername) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).wszPassword) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CADES_AUTH_PARA), "::", stringify!(wszPassword) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pClientCertificate) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CADES_AUTH_PARA), "::", stringify!(pClientCertificate) ) ); } impl Default for _CADES_AUTH_PARA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCADES_AUTH_PARA = *mut _CADES_AUTH_PARA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CADES_SERVICE_CONNECTION_PARA { pub dwSize: DWORD, pub wszUri: LPCWSTR, pub pAuthPara: PCADES_AUTH_PARA, } #[test] fn bindgen_test_layout__CADES_SERVICE_CONNECTION_PARA() { const UNINIT: ::std::mem::MaybeUninit<_CADES_SERVICE_CONNECTION_PARA> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CADES_SERVICE_CONNECTION_PARA>(), 24usize, concat!("Size of: ", stringify!(_CADES_SERVICE_CONNECTION_PARA)) ); assert_eq!( ::std::mem::align_of::<_CADES_SERVICE_CONNECTION_PARA>(), 8usize, concat!("Alignment of ", stringify!(_CADES_SERVICE_CONNECTION_PARA)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CADES_SERVICE_CONNECTION_PARA), "::", stringify!(dwSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).wszUri) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CADES_SERVICE_CONNECTION_PARA), "::", stringify!(wszUri) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pAuthPara) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CADES_SERVICE_CONNECTION_PARA), "::", stringify!(pAuthPara) ) ); } impl Default for _CADES_SERVICE_CONNECTION_PARA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCADES_SERVICE_CONNECTION_PARA = *mut _CADES_SERVICE_CONNECTION_PARA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CADES_PROXY_PARA { pub dwSize: DWORD, pub wszProxyUri: LPCWSTR, pub pProxyAuthPara: PCADES_AUTH_PARA, } #[test] fn bindgen_test_layout__CADES_PROXY_PARA() { const UNINIT: ::std::mem::MaybeUninit<_CADES_PROXY_PARA> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CADES_PROXY_PARA>(), 24usize, concat!("Size of: ", stringify!(_CADES_PROXY_PARA)) ); assert_eq!( ::std::mem::align_of::<_CADES_PROXY_PARA>(), 8usize, concat!("Alignment of ", stringify!(_CADES_PROXY_PARA)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CADES_PROXY_PARA), "::", stringify!(dwSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).wszProxyUri) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CADES_PROXY_PARA), "::", stringify!(wszProxyUri) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pProxyAuthPara) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CADES_PROXY_PARA), "::", stringify!(pProxyAuthPara) ) ); } impl Default for _CADES_PROXY_PARA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCADES_PROXY_PARA = *mut _CADES_PROXY_PARA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CADES_SIGN_PARA { pub dwSize: DWORD, pub dwCadesType: DWORD, pub pSignerCert: PCCERT_CONTEXT, pub szHashAlgorithm: LPCSTR, pub hAdditionalStore: HCERTSTORE, pub pTspConnectionPara: PCADES_SERVICE_CONNECTION_PARA, pub pProxyPara: PCADES_PROXY_PARA, pub pCadesExtraPara: LPVOID, } #[test] fn bindgen_test_layout__CADES_SIGN_PARA() { const UNINIT: ::std::mem::MaybeUninit<_CADES_SIGN_PARA> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CADES_SIGN_PARA>(), 56usize, concat!("Size of: ", stringify!(_CADES_SIGN_PARA)) ); assert_eq!( ::std::mem::align_of::<_CADES_SIGN_PARA>(), 8usize, concat!("Alignment of ", stringify!(_CADES_SIGN_PARA)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CADES_SIGN_PARA), "::", stringify!(dwSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwCadesType) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_CADES_SIGN_PARA), "::", stringify!(dwCadesType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSignerCert) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CADES_SIGN_PARA), "::", stringify!(pSignerCert) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).szHashAlgorithm) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CADES_SIGN_PARA), "::", stringify!(szHashAlgorithm) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hAdditionalStore) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CADES_SIGN_PARA), "::", stringify!(hAdditionalStore) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pTspConnectionPara) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_CADES_SIGN_PARA), "::", stringify!(pTspConnectionPara) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pProxyPara) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(_CADES_SIGN_PARA), "::", stringify!(pProxyPara) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pCadesExtraPara) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_CADES_SIGN_PARA), "::", stringify!(pCadesExtraPara) ) ); } impl Default for _CADES_SIGN_PARA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCADES_SIGN_PARA = *mut _CADES_SIGN_PARA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CADES_SIGN_MESSAGE_PARA { pub dwSize: DWORD, pub pSignMessagePara: PCRYPT_SIGN_MESSAGE_PARA, pub pCadesSignPara: PCADES_SIGN_PARA, } #[test] fn bindgen_test_layout__CADES_SIGN_MESSAGE_PARA() { const UNINIT: ::std::mem::MaybeUninit<_CADES_SIGN_MESSAGE_PARA> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CADES_SIGN_MESSAGE_PARA>(), 24usize, concat!("Size of: ", stringify!(_CADES_SIGN_MESSAGE_PARA)) ); assert_eq!( ::std::mem::align_of::<_CADES_SIGN_MESSAGE_PARA>(), 8usize, concat!("Alignment of ", stringify!(_CADES_SIGN_MESSAGE_PARA)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CADES_SIGN_MESSAGE_PARA), "::", stringify!(dwSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSignMessagePara) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CADES_SIGN_MESSAGE_PARA), "::", stringify!(pSignMessagePara) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pCadesSignPara) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CADES_SIGN_MESSAGE_PARA), "::", stringify!(pCadesSignPara) ) ); } impl Default for _CADES_SIGN_MESSAGE_PARA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCADES_SIGN_MESSAGE_PARA = *mut _CADES_SIGN_MESSAGE_PARA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CADES_VERIFICATION_PARA { pub dwSize: DWORD, pub pMessageContentHash: LPVOID, pub pProxyPara: PCADES_PROXY_PARA, pub hStore: HCERTSTORE, pub bReserved2: BOOL, pub pReserved3: LPVOID, pub dwCadesType: DWORD, } #[test] fn bindgen_test_layout__CADES_VERIFICATION_PARA() { const UNINIT: ::std::mem::MaybeUninit<_CADES_VERIFICATION_PARA> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CADES_VERIFICATION_PARA>(), 56usize, concat!("Size of: ", stringify!(_CADES_VERIFICATION_PARA)) ); assert_eq!( ::std::mem::align_of::<_CADES_VERIFICATION_PARA>(), 8usize, concat!("Alignment of ", stringify!(_CADES_VERIFICATION_PARA)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFICATION_PARA), "::", stringify!(dwSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pMessageContentHash) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFICATION_PARA), "::", stringify!(pMessageContentHash) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pProxyPara) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFICATION_PARA), "::", stringify!(pProxyPara) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hStore) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFICATION_PARA), "::", stringify!(hStore) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bReserved2) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFICATION_PARA), "::", stringify!(bReserved2) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pReserved3) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFICATION_PARA), "::", stringify!(pReserved3) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwCadesType) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFICATION_PARA), "::", stringify!(dwCadesType) ) ); } impl Default for _CADES_VERIFICATION_PARA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCADES_VERIFICATION_PARA = *mut _CADES_VERIFICATION_PARA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CADES_VERIFICATION_INFO { pub dwSize: DWORD, pub dwStatus: DWORD, pub pSignerCert: PCCERT_CONTEXT, pub pSigningTime: LPFILETIME, pub pReserved: LPFILETIME, pub pSignatureTimeStampTime: LPFILETIME, } #[test] fn bindgen_test_layout__CADES_VERIFICATION_INFO() { const UNINIT: ::std::mem::MaybeUninit<_CADES_VERIFICATION_INFO> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CADES_VERIFICATION_INFO>(), 40usize, concat!("Size of: ", stringify!(_CADES_VERIFICATION_INFO)) ); assert_eq!( ::std::mem::align_of::<_CADES_VERIFICATION_INFO>(), 8usize, concat!("Alignment of ", stringify!(_CADES_VERIFICATION_INFO)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFICATION_INFO), "::", stringify!(dwSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwStatus) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFICATION_INFO), "::", stringify!(dwStatus) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSignerCert) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFICATION_INFO), "::", stringify!(pSignerCert) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSigningTime) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFICATION_INFO), "::", stringify!(pSigningTime) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pReserved) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFICATION_INFO), "::", stringify!(pReserved) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSignatureTimeStampTime) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFICATION_INFO), "::", stringify!(pSignatureTimeStampTime) ) ); } impl Default for _CADES_VERIFICATION_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCADES_VERIFICATION_INFO = *mut _CADES_VERIFICATION_INFO; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CADES_VERIFY_MESSAGE_PARA { pub dwSize: DWORD, pub pVerifyMessagePara: PCRYPT_VERIFY_MESSAGE_PARA, pub pCadesVerifyPara: PCADES_VERIFICATION_PARA, } #[test] fn bindgen_test_layout__CADES_VERIFY_MESSAGE_PARA() { const UNINIT: ::std::mem::MaybeUninit<_CADES_VERIFY_MESSAGE_PARA> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CADES_VERIFY_MESSAGE_PARA>(), 24usize, concat!("Size of: ", stringify!(_CADES_VERIFY_MESSAGE_PARA)) ); assert_eq!( ::std::mem::align_of::<_CADES_VERIFY_MESSAGE_PARA>(), 8usize, concat!("Alignment of ", stringify!(_CADES_VERIFY_MESSAGE_PARA)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFY_MESSAGE_PARA), "::", stringify!(dwSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pVerifyMessagePara) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFY_MESSAGE_PARA), "::", stringify!(pVerifyMessagePara) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pCadesVerifyPara) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_CADES_VERIFY_MESSAGE_PARA), "::", stringify!(pCadesVerifyPara) ) ); } impl Default for _CADES_VERIFY_MESSAGE_PARA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCADES_VERIFY_MESSAGE_PARA = *mut _CADES_VERIFY_MESSAGE_PARA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CADES_ENHANCE_MESSAGE_PARA { pub dwSize: DWORD, pub dwMsgEncodingType: DWORD, pub pCadesSignPara: PCADES_SIGN_PARA, } #[test] fn bindgen_test_layout__CADES_ENHANCE_MESSAGE_PARA() { const UNINIT: ::std::mem::MaybeUninit<_CADES_ENHANCE_MESSAGE_PARA> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_CADES_ENHANCE_MESSAGE_PARA>(), 16usize, concat!("Size of: ", stringify!(_CADES_ENHANCE_MESSAGE_PARA)) ); assert_eq!( ::std::mem::align_of::<_CADES_ENHANCE_MESSAGE_PARA>(), 8usize, concat!("Alignment of ", stringify!(_CADES_ENHANCE_MESSAGE_PARA)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwSize) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CADES_ENHANCE_MESSAGE_PARA), "::", stringify!(dwSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dwMsgEncodingType) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_CADES_ENHANCE_MESSAGE_PARA), "::", stringify!(dwMsgEncodingType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pCadesSignPara) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_CADES_ENHANCE_MESSAGE_PARA), "::", stringify!(pCadesSignPara) ) ); } impl Default for _CADES_ENHANCE_MESSAGE_PARA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type PCADES_ENHANCE_MESSAGE_PARA = *mut _CADES_ENHANCE_MESSAGE_PARA; pub type __builtin_va_list = [__va_list_tag; 1usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __va_list_tag { pub gp_offset: ::std::os::raw::c_uint, pub fp_offset: ::std::os::raw::c_uint, pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout___va_list_tag() { const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__va_list_tag>(), 24usize, concat!("Size of: ", stringify!(__va_list_tag)) ); assert_eq!( ::std::mem::align_of::<__va_list_tag>(), 8usize, concat!("Alignment of ", stringify!(__va_list_tag)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(__va_list_tag), "::", stringify!(gp_offset) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(__va_list_tag), "::", stringify!(fp_offset) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(__va_list_tag), "::", stringify!(overflow_arg_area) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(__va_list_tag), "::", stringify!(reg_save_area) ) ); } impl Default for __va_list_tag { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } }