Lines Matching refs:keymint
24 use keymint::{KeyParameterValue::KeyParameterValue, Tag::Tag, TagType::TagType};
26 use kmr_wire::{keymint::DateTime, keymint::KeyParam, KeySizeInBits, RsaExponent};
31 pub use android_hardware_security_keymint::aidl::android::hardware::security::keymint;
32 pub use android_hardware_security_rkp::aidl::android::hardware::security::keymint as rkp;
43 keymint::ErrorCode::ErrorCode::INVALID_ARGUMENT.0, in failed_conversion()
138 impl Fromm<wire::keymint::Certificate> for keymint::Certificate::Certificate {
139 fn fromm(val: wire::keymint::Certificate) -> Self { in fromm()
148 impl Fromm<wire::keymint::HardwareAuthToken> for keymint::HardwareAuthToken::HardwareAuthToken {
149 fn fromm(val: wire::keymint::HardwareAuthToken) -> Self { in fromm()
160 impl Fromm<wire::keymint::KeyCharacteristics> for keymint::KeyCharacteristics::KeyCharacteristics {
161 fn fromm(val: wire::keymint::KeyCharacteristics) -> Self { in fromm()
168 impl Fromm<wire::keymint::KeyCreationResult> for keymint::KeyCreationResult::KeyCreationResult {
169 fn fromm(val: wire::keymint::KeyCreationResult) -> Self { in fromm()
177 impl Fromm<wire::keymint::KeyMintHardwareInfo>
178 for keymint::KeyMintHardwareInfo::KeyMintHardwareInfo
180 fn fromm(val: wire::keymint::KeyMintHardwareInfo) -> Self { in fromm()
212 impl Fromm<wire::keymint::KeyParam> for keymint::KeyParameter::KeyParameter {
213 fn fromm(val: wire::keymint::KeyParam) -> Self { in fromm()
245 keymint::HardwareAuthenticatorType::HardwareAuthenticatorType(v as i32), in fromm()
390 impl TryFromm<keymint::AttestationKey::AttestationKey> for wire::keymint::AttestationKey {
392 fn try_fromm(val: keymint::AttestationKey::AttestationKey) -> Result<Self, Self::Error> { in try_fromm()
404 impl TryFromm<keymint::HardwareAuthToken::HardwareAuthToken> for wire::keymint::HardwareAuthToken {
406 fn try_fromm(val: keymint::HardwareAuthToken::HardwareAuthToken) -> Result<Self, Self::Error> { in try_fromm()
432 if let keymint::KeyParameterValue::KeyParameterValue::$variant(v) = $val.value {
445 if let keymint::KeyParameterValue::KeyParameterValue::BoolValue(true) = $val.value {
457 if let keymint::KeyParameterValue::KeyParameterValue::Blob(b) = &$val.value {
467 impl TryFromm<&keymint::KeyParameter::KeyParameter> for Option<KeyParam> {
469 fn try_fromm(val: &keymint::KeyParameter::KeyParameter) -> Result<Self, Self::Error> { in try_fromm()
472 keymint::Tag::Tag::PURPOSE => { in try_fromm()
475 keymint::Tag::Tag::ALGORITHM => { in try_fromm()
478 keymint::Tag::Tag::BLOCK_MODE => { in try_fromm()
481 keymint::Tag::Tag::DIGEST => { in try_fromm()
484 keymint::Tag::Tag::PADDING => { in try_fromm()
487 keymint::Tag::Tag::EC_CURVE => { in try_fromm()
490 keymint::Tag::Tag::RSA_OAEP_MGF_DIGEST => { in try_fromm()
493 keymint::Tag::Tag::ORIGIN => { in try_fromm()
499 keymint::Tag::Tag::USER_AUTH_TYPE => { in try_fromm()
505 keymint::Tag::Tag::KEY_SIZE => { in try_fromm()
508 keymint::Tag::Tag::MIN_MAC_LENGTH => { in try_fromm()
511 keymint::Tag::Tag::MAX_USES_PER_BOOT => { in try_fromm()
514 keymint::Tag::Tag::USAGE_COUNT_LIMIT => { in try_fromm()
517 keymint::Tag::Tag::USER_ID => Some(KeyParam::UserId(value_of!(val, Integer)? as u32)), in try_fromm()
518 keymint::Tag::Tag::AUTH_TIMEOUT => { in try_fromm()
521 keymint::Tag::Tag::OS_VERSION => { in try_fromm()
524 keymint::Tag::Tag::OS_PATCHLEVEL => { in try_fromm()
527 keymint::Tag::Tag::VENDOR_PATCHLEVEL => { in try_fromm()
530 keymint::Tag::Tag::BOOT_PATCHLEVEL => { in try_fromm()
533 keymint::Tag::Tag::MAC_LENGTH => { in try_fromm()
536 keymint::Tag::Tag::MAX_BOOT_LEVEL => { in try_fromm()
541 keymint::Tag::Tag::RSA_PUBLIC_EXPONENT => { in try_fromm()
544 keymint::Tag::Tag::USER_SECURE_ID => { in try_fromm()
549 keymint::Tag::Tag::CALLER_NONCE => { in try_fromm()
553 keymint::Tag::Tag::INCLUDE_UNIQUE_ID => { in try_fromm()
557 keymint::Tag::Tag::BOOTLOADER_ONLY => { in try_fromm()
561 keymint::Tag::Tag::ROLLBACK_RESISTANCE => { in try_fromm()
565 keymint::Tag::Tag::EARLY_BOOT_ONLY => { in try_fromm()
569 keymint::Tag::Tag::NO_AUTH_REQUIRED => { in try_fromm()
573 keymint::Tag::Tag::ALLOW_WHILE_ON_BODY => { in try_fromm()
577 keymint::Tag::Tag::TRUSTED_USER_PRESENCE_REQUIRED => { in try_fromm()
581 keymint::Tag::Tag::TRUSTED_CONFIRMATION_REQUIRED => { in try_fromm()
585 keymint::Tag::Tag::UNLOCKED_DEVICE_REQUIRED => { in try_fromm()
589 keymint::Tag::Tag::DEVICE_UNIQUE_ATTESTATION => { in try_fromm()
593 keymint::Tag::Tag::STORAGE_KEY => { in try_fromm()
597 keymint::Tag::Tag::RESET_SINCE_ID_ROTATION => { in try_fromm()
603 keymint::Tag::Tag::ACTIVE_DATETIME => Some(KeyParam::ActiveDatetime(DateTime { in try_fromm()
606 keymint::Tag::Tag::ORIGINATION_EXPIRE_DATETIME => { in try_fromm()
611 keymint::Tag::Tag::USAGE_EXPIRE_DATETIME => { in try_fromm()
616 keymint::Tag::Tag::CREATION_DATETIME => Some(KeyParam::CreationDatetime(DateTime { in try_fromm()
619 keymint::Tag::Tag::CERTIFICATE_NOT_BEFORE => { in try_fromm()
624 keymint::Tag::Tag::CERTIFICATE_NOT_AFTER => { in try_fromm()
631 keymint::Tag::Tag::APPLICATION_ID => Some(KeyParam::ApplicationId(clone_blob!(val)?)), in try_fromm()
632 keymint::Tag::Tag::APPLICATION_DATA => { in try_fromm()
635 keymint::Tag::Tag::ROOT_OF_TRUST => Some(KeyParam::RootOfTrust(clone_blob!(val)?)), in try_fromm()
636 keymint::Tag::Tag::ATTESTATION_CHALLENGE => { in try_fromm()
639 keymint::Tag::Tag::ATTESTATION_APPLICATION_ID => { in try_fromm()
642 keymint::Tag::Tag::ATTESTATION_ID_BRAND => { in try_fromm()
645 keymint::Tag::Tag::ATTESTATION_ID_DEVICE => { in try_fromm()
648 keymint::Tag::Tag::ATTESTATION_ID_PRODUCT => { in try_fromm()
651 keymint::Tag::Tag::ATTESTATION_ID_SERIAL => { in try_fromm()
654 keymint::Tag::Tag::ATTESTATION_ID_IMEI => { in try_fromm()
657 keymint::Tag::Tag::ATTESTATION_ID_SECOND_IMEI => { in try_fromm()
660 keymint::Tag::Tag::ATTESTATION_ID_MEID => { in try_fromm()
663 keymint::Tag::Tag::ATTESTATION_ID_MANUFACTURER => { in try_fromm()
666 keymint::Tag::Tag::ATTESTATION_ID_MODEL => { in try_fromm()
669 keymint::Tag::Tag::NONCE => Some(KeyParam::Nonce(clone_blob!(val)?)), in try_fromm()
670 keymint::Tag::Tag::CERTIFICATE_SERIAL => { in try_fromm()
673 keymint::Tag::Tag::CERTIFICATE_SUBJECT => { in try_fromm()
678 keymint::Tag::Tag::UNIQUE_ID in try_fromm()
679 | keymint::Tag::Tag::HARDWARE_TYPE in try_fromm()
680 | keymint::Tag::Tag::MIN_SECONDS_BETWEEN_OPS in try_fromm()
681 | keymint::Tag::Tag::IDENTITY_CREDENTIAL_KEY in try_fromm()
682 | keymint::Tag::Tag::ASSOCIATED_DATA in try_fromm()
683 | keymint::Tag::Tag::CONFIRMATION_TOKEN => { in try_fromm()
715 enum_convert! { wire::keymint::ErrorCode => keymint::ErrorCode::ErrorCode }
716 enum_convert! { wire::keymint::Algorithm => keymint::Algorithm::Algorithm }
717 enum_convert! { wire::keymint::BlockMode => keymint::BlockMode::BlockMode }
718 enum_convert! { wire::keymint::Digest => keymint::Digest::Digest }
719 enum_convert! { wire::keymint::EcCurve => keymint::EcCurve::EcCurve }
720 enum_convert! { wire::keymint::HardwareAuthenticatorType =>
721 keymint::HardwareAuthenticatorType::HardwareAuthenticatorType }
722 enum_convert! { wire::keymint::KeyFormat => keymint::KeyFormat::KeyFormat }
723 enum_convert! { wire::keymint::KeyOrigin => keymint::KeyOrigin::KeyOrigin }
724 enum_convert! { wire::keymint::KeyPurpose => keymint::KeyPurpose::KeyPurpose }
725 enum_convert! { wire::keymint::PaddingMode => keymint::PaddingMode::PaddingMode }
726 enum_convert! { wire::keymint::SecurityLevel => keymint::SecurityLevel::SecurityLevel }
727 enum_convert! { wire::keymint::Tag => keymint::Tag::Tag }
728 enum_convert! { wire::keymint::TagType => keymint::TagType::TagType }