Class: AppInfo::Android::Signature::V3
- Includes:
- Helper::Algorithm, Helper::IOBlock, Helper::Signatures
- Defined in:
- lib/app_info/android/signatures/v3.rb
Overview
Android v3 Signature
FULL FORMAT: OFFSET DATA TYPE DESCRIPTION
-
@+0 bytes uint32: signer size in bytes
-
@+4 bytes payload signer block
-
@+0 bytes unit32: signed data size in bytes
-
@+4 bytes payload signed data block
-
@+0 bytes unit32: digests with size in bytes
-
@+0 bytes unit32: digests with size in bytes
-
-
@+W bytes unit32: minSDK
-
@+X+4 bytes unit32: maxSDK
-
@+Y+4 bytes unit32: signatures with size in bytes
-
@+Y+4 bytes payload signed data block
-
-
@+Z bytes unit32: public key with size in bytes
-
@+Z+4 bytes payload signed data block
-
-
Constant Summary collapse
- V3_BLOCK_ID =
V3 Signature ID 0xf05368c0
[0xc0, 0x68, 0x53, 0xf0].freeze
- V3_1_BLOCK_ID =
V3.1 Signature ID 0x1b93ad61
[0x61, 0xad, 0x93, 0x1b].freeze
Constants included from Helper::Algorithm
Helper::Algorithm::SIG_DSA_WITH_SHA256, Helper::Algorithm::SIG_ECDSA_WITH_SHA256, Helper::Algorithm::SIG_ECDSA_WITH_SHA512, Helper::Algorithm::SIG_RSA_PKCS1_V1_5_WITH_SHA256, Helper::Algorithm::SIG_RSA_PKCS1_V1_5_WITH_SHA512, Helper::Algorithm::SIG_RSA_PSS_WITH_SHA256, Helper::Algorithm::SIG_RSA_PSS_WITH_SHA512, Helper::Algorithm::SIG_STRIPPING_PROTECTION_ATTR_ID, Helper::Algorithm::SIG_VERITY_DSA_WITH_SHA256, Helper::Algorithm::SIG_VERITY_ECDSA_WITH_SHA256, Helper::Algorithm::SIG_VERITY_RSA_PKCS1_V1_5_WITH_SHA256
Constants inherited from Base
Instance Attribute Summary collapse
-
#certificates ⇒ Object
readonly
Returns the value of attribute certificates.
-
#digests ⇒ Object
readonly
Returns the value of attribute digests.
Attributes inherited from Base
Instance Method Summary collapse
Methods included from Helper::Algorithm
#algorithem_priority, #algorithm_match, #algorithm_method, #best_algorithem, #compare_algorithem
Methods included from Helper::Signatures
#signature_algorithms, #signed_data_certs, #signed_data_digests, #singers_block, #verify_additional_attrs
Methods included from Helper::IOBlock
#left_bytes_check, #length_prefix_block, #loop_length_prefix_io
Methods inherited from Base
#description, #initialize, #logger, #scheme, verify
Constructor Details
This class inherits a constructor from AppInfo::Android::Signature::Base
Instance Attribute Details
#certificates ⇒ Object (readonly)
Returns the value of attribute certificates.
33 34 35 |
# File 'lib/app_info/android/signatures/v3.rb', line 33 def certificates @certificates end |
#digests ⇒ Object (readonly)
Returns the value of attribute digests.
33 34 35 |
# File 'lib/app_info/android/signatures/v3.rb', line 33 def digests @digests end |
Instance Method Details
#verify ⇒ Object
39 40 41 42 43 44 45 46 47 |
# File 'lib/app_info/android/signatures/v3.rb', line 39 def verify begin signers_block = singers_block(V3_1_BLOCK_ID) rescue NotFoundError signers_block = singers_block(V3_BLOCK_ID) end @certificates, @digests = verified_certs(signers_block) end |