Lines Matching refs:convert_device
333 template <typename T> SoftKeymasterDevice* convert_device(const T* dev) { in convert_device() function
357 delete convert_device(reinterpret_cast<keymaster2_device_t*>(dev)); in close_device()
362 delete convert_device(reinterpret_cast<keymaster1_device_t*>(dev)); in close_device()
381 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in get_supported_algorithms()
384 auto& impl_ = convert_device(dev)->impl_; in get_supported_algorithms()
412 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in get_supported_block_modes()
416 auto& impl_ = convert_device(dev)->impl_; in get_supported_block_modes()
446 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in get_supported_padding_modes()
451 auto& impl_ = convert_device(dev)->impl_; in get_supported_padding_modes()
456 convert_device(dev)->impl_->SupportedPaddingModes(request, &response); in get_supported_padding_modes()
480 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in get_supported_digests()
484 auto& impl_ = convert_device(dev)->impl_; in get_supported_digests()
511 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in get_supported_import_formats()
515 auto& impl_ = convert_device(dev)->impl_; in get_supported_import_formats()
542 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in get_supported_export_formats()
546 auto& impl_ = convert_device(dev)->impl_; in get_supported_export_formats()
569 auto& impl_ = convert_device(dev)->impl_; in configure()
578 if (response.error == KM_ERROR_OK) convert_device(dev)->configured_ = true; in configure()
587 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in add_rng_entropy()
590 auto& impl_ = convert_device(dev)->impl_; in add_rng_entropy()
604 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in add_rng_entropy()
606 SoftKeymasterDevice* sk_dev = convert_device(dev); in add_rng_entropy()
690 SoftKeymasterDevice* sk_dev = convert_device(dev); in generate_key()
731 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in generate_key()
735 SoftKeymasterDevice* sk_dev = convert_device(dev); in generate_key()
803 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in get_key_characteristics()
814 auto& impl_ = convert_device(dev)->impl_; in get_key_characteristics()
842 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in get_key_characteristics()
846 SoftKeymasterDevice* sk_dev = convert_device(dev); in get_key_characteristics()
872 SoftKeymasterDevice* sk_dev = convert_device(dev); in import_key()
912 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in import_key()
914 SoftKeymasterDevice* sk_dev = convert_device(dev); in import_key()
943 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in export_key()
951 auto& impl_ = convert_device(dev)->impl_; in export_key()
978 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in export_key()
980 SoftKeymasterDevice* sk_dev = convert_device(dev); in export_key()
993 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in attest_key()
997 auto& impl_ = convert_device(dev)->impl_; in attest_key()
1048 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in upgrade_key()
1050 auto& impl_ = convert_device(dev)->impl_; in upgrade_key()
1074 return convert_device(dev)->context_->DeleteKey(blob); in delete_key()
1082 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in delete_key()
1085 return convert_device(dev)->context_->DeleteKey(blob); in delete_key()
1092 return convert_device(dev)->context_->DeleteAllKeys(); in delete_all_keys()
1099 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in delete_all_keys()
1101 return convert_device(dev)->context_->DeleteAllKeys(); in delete_all_keys()
1115 SoftKeymasterDevice* skdev = convert_device(dev); in begin()
1184 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in begin()
1186 SoftKeymasterDevice* sk_dev = convert_device(dev); in begin()
1201 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in update()
1202 if (km1_dev && !convert_device(dev)->impl_->has_operation(operation_handle)) { in update()
1219 auto& impl_ = convert_device(dev)->impl_; in update()
1258 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in update()
1260 SoftKeymasterDevice* sk_dev = convert_device(dev); in update()
1274 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in finish()
1275 if (km1_dev && !convert_device(dev)->impl_->has_operation(operation_handle)) { in finish()
1292 auto& impl_ = convert_device(dev)->impl_; in finish()
1336 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in finish()
1342 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in finish()
1343 if (km1_dev && !convert_device(dev)->impl_->has_operation(operation_handle)) { in finish()
1438 auto& impl_ = convert_device(dev)->impl_; in finish()
1473 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in abort()
1474 if (km1_dev && !convert_device(dev)->impl_->has_operation(operation_handle)) { in abort()
1481 auto& impl_ = convert_device(dev)->impl_; in abort()
1494 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in abort()
1496 SoftKeymasterDevice* sk_dev = convert_device(dev); in abort()