Lines Matching refs:convert_device
331 template <typename T> SoftKeymasterDevice* convert_device(const T* dev) { in convert_device() function
355 delete convert_device(reinterpret_cast<keymaster2_device_t*>(dev)); in close_device()
360 delete convert_device(reinterpret_cast<keymaster1_device_t*>(dev)); in close_device()
379 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in get_supported_algorithms()
382 auto& impl_ = convert_device(dev)->impl_; in get_supported_algorithms()
410 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in get_supported_block_modes()
414 auto& impl_ = convert_device(dev)->impl_; in get_supported_block_modes()
444 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in get_supported_padding_modes()
449 auto& impl_ = convert_device(dev)->impl_; in get_supported_padding_modes()
454 convert_device(dev)->impl_->SupportedPaddingModes(request, &response); in get_supported_padding_modes()
478 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in get_supported_digests()
482 auto& impl_ = convert_device(dev)->impl_; in get_supported_digests()
509 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in get_supported_import_formats()
513 auto& impl_ = convert_device(dev)->impl_; in get_supported_import_formats()
540 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in get_supported_export_formats()
544 auto& impl_ = convert_device(dev)->impl_; in get_supported_export_formats()
567 auto& impl_ = convert_device(dev)->impl_; in configure()
576 if (response.error == KM_ERROR_OK) convert_device(dev)->configured_ = true; in configure()
585 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in add_rng_entropy()
588 auto& impl_ = convert_device(dev)->impl_; in add_rng_entropy()
602 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in add_rng_entropy()
604 SoftKeymasterDevice* sk_dev = convert_device(dev); in add_rng_entropy()
688 SoftKeymasterDevice* sk_dev = convert_device(dev); in generate_key()
729 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in generate_key()
733 SoftKeymasterDevice* sk_dev = convert_device(dev); in generate_key()
801 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in get_key_characteristics()
812 auto& impl_ = convert_device(dev)->impl_; in get_key_characteristics()
840 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in get_key_characteristics()
844 SoftKeymasterDevice* sk_dev = convert_device(dev); in get_key_characteristics()
870 SoftKeymasterDevice* sk_dev = convert_device(dev); in import_key()
910 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in import_key()
912 SoftKeymasterDevice* sk_dev = convert_device(dev); in import_key()
941 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in export_key()
949 auto& impl_ = convert_device(dev)->impl_; in export_key()
976 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in export_key()
978 SoftKeymasterDevice* sk_dev = convert_device(dev); in export_key()
991 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in attest_key()
995 auto& impl_ = convert_device(dev)->impl_; in attest_key()
1046 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in upgrade_key()
1048 auto& impl_ = convert_device(dev)->impl_; in upgrade_key()
1072 return convert_device(dev)->context_->DeleteKey(blob); in delete_key()
1080 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in delete_key()
1083 return convert_device(dev)->context_->DeleteKey(blob); in delete_key()
1090 return convert_device(dev)->context_->DeleteAllKeys(); in delete_all_keys()
1097 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in delete_all_keys()
1099 return convert_device(dev)->context_->DeleteAllKeys(); in delete_all_keys()
1113 SoftKeymasterDevice* skdev = convert_device(dev); in begin()
1182 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in begin()
1184 SoftKeymasterDevice* sk_dev = convert_device(dev); in begin()
1199 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in update()
1200 if (km1_dev && !convert_device(dev)->impl_->has_operation(operation_handle)) { in update()
1217 auto& impl_ = convert_device(dev)->impl_; in update()
1256 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in update()
1258 SoftKeymasterDevice* sk_dev = convert_device(dev); in update()
1272 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in finish()
1273 if (km1_dev && !convert_device(dev)->impl_->has_operation(operation_handle)) { in finish()
1290 auto& impl_ = convert_device(dev)->impl_; in finish()
1334 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in finish()
1340 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in finish()
1341 if (km1_dev && !convert_device(dev)->impl_->has_operation(operation_handle)) { in finish()
1436 auto& impl_ = convert_device(dev)->impl_; in finish()
1471 const keymaster1_device_t* km1_dev = convert_device(dev)->wrapped_km1_device_; in abort()
1472 if (km1_dev && !convert_device(dev)->impl_->has_operation(operation_handle)) { in abort()
1479 auto& impl_ = convert_device(dev)->impl_; in abort()
1492 if (!convert_device(dev)->configured()) return KM_ERROR_KEYMASTER_NOT_CONFIGURED; in abort()
1494 SoftKeymasterDevice* sk_dev = convert_device(dev); in abort()