Backed out changeset cf5af528086f (bug 1911385) for causing windows build bustages. CLOSED TREE

This commit is contained in:
Iulian Moraru 2024-08-06 00:52:19 +03:00
Родитель 2da357cc55
Коммит 54f8616dab
2 изменённых файлов: 0 добавлений и 40 удалений

Просмотреть файл

@ -485,21 +485,6 @@ extern "C" fn C_SetAttributeValue(
CKR_FUNCTION_NOT_SUPPORTED
}
const RELEVANT_ATTRIBUTES: &[CK_ATTRIBUTE_TYPE] = &[
CKA_CLASS,
CKA_EC_PARAMS,
CKA_ID,
CKA_ISSUER,
CKA_KEY_TYPE,
CKA_LABEL,
CKA_MODULUS,
CKA_PRIVATE,
CKA_SERIAL_NUMBER,
CKA_SUBJECT,
CKA_TOKEN,
CKA_VALUE,
];
/// This gets called to initialize a search for objects matching a given list of attributes. This
/// module implements this by gathering the attributes and passing them to the `ManagerProxy` to
/// start the search.
@ -514,9 +499,6 @@ extern "C" fn C_FindObjectsInit(
let mut attrs = Vec::new();
for i in 0..ulCount {
let attr = unsafe { &*pTemplate.offset(i as isize) };
if !RELEVANT_ATTRIBUTES.contains(&attr.type_) {
return CKR_ATTRIBUTE_TYPE_INVALID;
}
let slice = unsafe {
std::slice::from_raw_parts(attr.pValue as *const u8, attr.ulValueLen as usize)
};

Просмотреть файл

@ -594,21 +594,6 @@ fn trace_attr(prefix: &str, attr: &CK_ATTRIBUTE) {
);
}
const RELEVANT_ATTRIBUTES: &[CK_ATTRIBUTE_TYPE] = &[
CKA_CLASS,
CKA_EC_PARAMS,
CKA_ID,
CKA_ISSUER,
CKA_KEY_TYPE,
CKA_LABEL,
CKA_MODULUS,
CKA_PRIVATE,
CKA_SERIAL_NUMBER,
CKA_SUBJECT,
CKA_TOKEN,
CKA_VALUE,
];
/// This gets called to initialize a search for objects matching a given list of attributes. This
/// module implements this by gathering the attributes and passing them to the `ManagerProxy` to
/// start the search.
@ -626,13 +611,6 @@ extern "C" fn C_FindObjectsInit(
for i in 0..ulCount as usize {
let attr = unsafe { &*pTemplate.add(i) };
trace_attr(" ", attr);
if !RELEVANT_ATTRIBUTES.contains(&attr.type_) {
log_with_thread_id!(
debug,
"C_FindObjectsInit: irrelevant attribute, returning CKR_ATTRIBUTE_TYPE_INVALID"
);
return CKR_ATTRIBUTE_TYPE_INVALID;
}
let slice = unsafe {
std::slice::from_raw_parts(attr.pValue as *const u8, attr.ulValueLen as usize)
};