Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ pub const CKM_NSS_HKDF_SHA256: u32 = CKM_NSS + 4;
pub const CKM_NSS_HKDF_SHA384: u32 = CKM_NSS + 5;

pub type CK_GCM_PARAMS = CK_GCM_PARAMS_V3;
#[repr(C)]
// On Windows, PKCS#11 structs use 1-byte packing (see pkcs11p.h).
#[cfg_attr(target_os = "windows", repr(C, packed))]
#[cfg_attr(not(target_os = "windows"), repr(C))]
pub struct CK_GCM_PARAMS_V3 {
pub pIv: CK_BYTE_PTR,
pub ulIvLen: CK_ULONG,
Expand All @@ -21,7 +23,9 @@ pub struct CK_GCM_PARAMS_V3 {
pub ulAADLen: CK_ULONG,
pub ulTagBits: CK_ULONG,
}
#[repr(C)]
// On Windows, PKCS#11 structs use 1-byte packing (see pkcs11p.h).
#[cfg_attr(target_os = "windows", repr(C, packed))]
#[cfg_attr(not(target_os = "windows"), repr(C))]
pub struct CK_NSS_HKDFParams {
pub bExtract: CK_BBOOL,
pub pSalt: CK_BYTE_PTR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ pub type CK_OBJECT_CLASS = CK_ULONG;
pub type CK_KEY_TYPE = CK_ULONG;
pub type CK_ATTRIBUTE_TYPE = CK_ULONG;
pub type CK_FLAGS = CK_ULONG;
#[repr(C)]
// On Windows, PKCS#11 structs use 1-byte packing (see pkcs11p.h).
#[cfg_attr(target_os = "windows", repr(C, packed))]
#[cfg_attr(not(target_os = "windows"), repr(C))]
#[derive(Clone, Copy)]
pub struct CK_ATTRIBUTE {
pub type_: CK_ATTRIBUTE_TYPE,
Expand Down