icecat: add release icecat-140.6.0-1gnu1 for ecne
This commit is contained in:
parent
618c9f4145
commit
7d0f5dab3b
3382 changed files with 457689 additions and 569094 deletions
|
|
@ -226,6 +226,9 @@ fn sec_key_create_signature(
|
|||
)
|
||||
};
|
||||
if signature.is_null() {
|
||||
if error.is_null() {
|
||||
return Err(error_here!(ErrorType::ExternalError));
|
||||
}
|
||||
let error = unsafe { CFError::wrap_under_create_rule(error) };
|
||||
return Err(error_here!(
|
||||
ErrorType::ExternalError,
|
||||
|
|
@ -235,8 +238,12 @@ fn sec_key_create_signature(
|
|||
Ok(unsafe { CFData::wrap_under_create_rule(signature) })
|
||||
}
|
||||
|
||||
fn sec_key_copy_attributes<T: TCFType>(key: &SecKey) -> CFDictionary<CFString, T> {
|
||||
unsafe { CFDictionary::wrap_under_create_rule(SecKeyCopyAttributes(key.as_concrete_TypeRef())) }
|
||||
fn sec_key_copy_attributes<T: TCFType>(key: &SecKey) -> Result<CFDictionary<CFString, T>, Error> {
|
||||
let attributes = unsafe { SecKeyCopyAttributes(key.as_concrete_TypeRef()) };
|
||||
if attributes.is_null() {
|
||||
return Err(error_here!(ErrorType::ExternalError));
|
||||
}
|
||||
Ok(unsafe { CFDictionary::wrap_under_create_rule(attributes) })
|
||||
}
|
||||
|
||||
fn sec_key_copy_external_representation(key: &SecKey) -> Result<CFData, Error> {
|
||||
|
|
@ -244,6 +251,9 @@ fn sec_key_copy_external_representation(key: &SecKey) -> Result<CFData, Error> {
|
|||
let representation =
|
||||
unsafe { SecKeyCopyExternalRepresentation(key.as_concrete_TypeRef(), &mut error) };
|
||||
if representation.is_null() {
|
||||
if error.is_null() {
|
||||
return Err(error_here!(ErrorType::ExternalError));
|
||||
}
|
||||
let error = unsafe { CFError::wrap_under_create_rule(error) };
|
||||
return Err(error_here!(
|
||||
ErrorType::ExternalError,
|
||||
|
|
@ -814,7 +824,7 @@ impl Sign for Key {
|
|||
}
|
||||
|
||||
fn get_key_attribute<T: TCFType + Clone>(key: &SecKey, attr: CFStringRef) -> Result<T, Error> {
|
||||
let attributes: CFDictionary<CFString, T> = sec_key_copy_attributes(key);
|
||||
let attributes: CFDictionary<CFString, T> = sec_key_copy_attributes(key)?;
|
||||
match attributes.find(attr as *const _) {
|
||||
Some(value) => Ok((*value).clone()),
|
||||
None => Err(error_here!(ErrorType::ExternalError)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue