public class TpmBackEndMemory extends TpmBackEnd
TpmBackEnd.Error| Constructor and Description |
|---|
TpmBackEndMemory() |
| Modifier and Type | Method and Description |
|---|---|
protected TpmKeyHandle |
doCreateKey(Name identityName,
KeyParams params)
Create a key for identityName according to params.
|
protected void |
doDeleteKey(Name keyName)
Delete the key with name keyName.
|
protected Blob |
doExportKey(Name keyName,
ByteBuffer password)
Get the encoded private key with name keyName in PKCS #8 format, possibly
password-encrypted.
|
protected TpmKeyHandle |
doGetKeyHandle(Name keyName)
Get the handle of the key with name keyName.
|
protected boolean |
doHasKey(Name keyName)
Check if the key with name keyName exists in the TPM.
|
protected void |
doImportKey(Name keyName,
ByteBuffer pkcs8,
ByteBuffer password)
Import an encoded private key with name keyName in PKCS #8 format, possibly
password-encrypted.
|
static String |
getScheme() |
createKey, deleteKey, exportKey, getKeyHandle, hasKey, importKey, isTerminalMode, isTpmLocked, setKeyName, setTerminalMode, unlockTpmpublic static String getScheme()
protected boolean doHasKey(Name keyName) throws TpmBackEnd.Error
doHasKey in class TpmBackEndkeyName - The name of the key.TpmBackEnd.Errorprotected TpmKeyHandle doGetKeyHandle(Name keyName) throws TpmBackEnd.Error
doGetKeyHandle in class TpmBackEndkeyName - The name of the key.TpmBackEnd.Errorprotected TpmKeyHandle doCreateKey(Name identityName, KeyParams params) throws TpmBackEnd.Error
doCreateKey in class TpmBackEndidentityName - The name if the identity.params - The KeyParams for creating the key.TpmBackEnd.Error - if the key cannot be created.protected void doDeleteKey(Name keyName) throws TpmBackEnd.Error
doDeleteKey in class TpmBackEndkeyName - The name of the key to delete.TpmBackEnd.Error - if the deletion fails.protected Blob doExportKey(Name keyName, ByteBuffer password) throws TpmBackEnd.Error
doExportKey in class TpmBackEndkeyName - The name of the key in the TPM.password - The password for encrypting the private key, which should
have characters in the range of 1 to 127. If the password is supplied, use
it to return a PKCS #8 EncryptedPrivateKeyInfo. If the password is null,
return an unencrypted PKCS #8 PrivateKeyInfo.TpmBackEnd.Error - if the key does not exist or if the key cannot be
exported, e.g., insufficient privileges.protected void doImportKey(Name keyName, ByteBuffer pkcs8, ByteBuffer password) throws TpmBackEnd.Error
doImportKey in class TpmBackEndkeyName - The name of the key to use in the TPM.pkcs8 - The input byte buffer. If the password is supplied, this is a
PKCS #8 EncryptedPrivateKeyInfo. If the password is null, this is an
unencrypted PKCS #8 PrivateKeyInfo.password - The password for decrypting the private key, which should
have characters in the range of 1 to 127. If the password is supplied, use
it to decrypt the PKCS #8 EncryptedPrivateKeyInfo. If the password is null,
import an unencrypted PKCS #8 PrivateKeyInfo.TpmBackEnd.Error - for an error importing the key.Copyright © 2019. All rights reserved.