iotcs.trust module¶
-
class
iotcs.trust.TrustedAssetsManagerBase¶ Bases:
iotcs.common.Closeable-
DEFAULT_PORT= 443¶
-
TA_STORE_PASSWORD_PROPERTY= 'oracle.iot.client.trustedAssetsStorePassword'¶
-
TA_STORE_PROPERTY= 'oracle.iot.client.trustedAssetsStore'¶
-
clientId¶
-
close()¶ Closes this instance releasing any system resources associated with it. If the instance is already closed then invoking this method has no effect. :raises IOException: if there is an error closing the instance
-
connectedDeviceTag¶
-
endpointId¶
-
genRSAKeyPair(bits=2048)¶
-
generateKeyPair(keytype, keyalgo)¶
-
getClientId()¶
-
getEndpointId()¶
-
getPrivateKey()¶
-
getPublicKey()¶
-
getServerHost()¶
-
getServerPort()¶
-
getServerScheme()¶
-
icdMap¶
-
privateKey¶
-
publicKey¶
-
serverHost¶
-
serverPort¶
-
serverScheme¶
-
serverUrl¶
-
setEndpointId(clientId)¶
-
setPrivateKey(privateKey)¶
-
setPublicKey(publicKey)¶
-
setServer(uriString)¶
-
signWithKey(key, message)¶
-
signWithPrivateKey(message, algorithm=<module 'Cryptodome.Hash.SHA256' from '/usr/mylocal/python/python3.7.3/lib/python3.7/site-packages/Cryptodome/Hash/SHA256.py'>)¶
-
-
class
iotcs.trust.UnifiedTrustedAssetsManager(path, passphrase)¶ Bases:
iotcs.trust.TrustedAssetsManagerBaseThe TrustedAssetsManager handles trust material used for activation and authentication to the IoT CS
Construct from encrypted trusted assets. path: the path to the trusted assets file passphrase: the passphrase for decrypting the file
-
AES_BLOCK_SIZE= 16¶
-
AES_KEY_SIZE= 128¶
-
CLIENT_ID_TAG= 2¶
-
CONNECTED_DEVICE_TAG= 8¶
-
ENDPOINT_ID_TAG= 4¶
-
FORMAT_VERSION= 33¶
-
MAX_FORMAT_VERSION= 126¶
-
PBKDF2_ITERATIONS= 10000¶
-
PRIVATE_KEY_TAG= 6¶
-
PUBLIC_KEY_TAG= 7¶
-
SERVER_URI_TAG= 1¶
-
SHARED_SECRET_TAG= 3¶
-
class
TLV(buff, offset)¶ Bases:
object-
length¶
-
offsetToNext¶
-
tag¶
-
value¶
-
static
writeTLV(bio, tag, value)¶
-
-
TRUST_ANCHOR_TAG= 5¶
-
assetsFile¶
-
bs¶
-
close()¶ CLose open resources
-
createTas(password, serverScheme, serverHost, serverPort, clientId, sharedSecret, endpointId, trustAnchor, privateKey, publicKey, icdMap)¶
-
create_key(password, salt)¶
-
decrypt(secret_key, cipher_text)¶
-
encrypt(secret_key, plain_text)¶
-
icdMap¶
-
initialize(passphrase, encrypted_data)¶
-
isActivated()¶
-
load(path, password)¶
-
passphrase¶
-
path¶
-
setEndpointCredentials(endpointId, certificate)¶
-
store()¶
-
trustAnchor¶
-