No project description provided
Project description
pyattest
pyattest provides a common interface that helps you verify attestations from either Google or Apple.
Installation
pyattest is available on PyPI and can be installed via $ python -m pip install pyattest
Usage
The following parameters are important:
key_id
: A Base64 encoded SHA-256 hash of your apps certificateapk_package_name
: Name of your apkproduction
: Ignores basic integrity and cts profile check ifFalse
attest
: The jws object string representing the attestationnonce
: The nonce used to create the attestation
config = GoogleConfig(key_ids=[key_id], apk_package_name='ch.dreipol.demo', production=True)
attestation = Attestation(attest, nonce, config)
try:
attestation.verify()
except PyAttestException as exception:
# Do your thing
pass
Apple
The following parameters are important:
key_id
: SHA-256 hash of the public key form the cert you got back from the attestationapp_id
: Your app’s App ID, which is the concatenation of your 10-digit team identifier, a period, and your app’s CFBundleIdentifier valueproduction
: Checks for the appropriateaaguid
attest
: The apple attestation as binarynonce
: The nonce used to create the attestation
config = AppleConfig(key_id=key_id, app_id='1234ABCDEF.ch.dreipol.demo', production=True)
attestation = Attestation(attest, nonce, config)
try:
attestation.verify()
except PyAttestException as exception:
# Do your thing
pass
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyattest-0.0.8.tar.gz
(12.5 kB
view hashes)
Built Distribution
Close
Hashes for pyattest-0.0.8-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6739440ae9bb76c8f2a2b2cd110a50897c435451c0ff6d7d24b2b7c6c1f3976 |
|
MD5 | 69c9a4f574ff7e56c895d4cd59f4f6c2 |
|
BLAKE2b-256 | afbb02f05240e1794267d2a29f0dc02e3d70289be10389b4bef49a77fb022a58 |