public class PibMemory extends PibImpl
PibImpl.Error| Constructor and Description |
|---|
PibMemory() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCertificate(CertificateV2 certificate)
Add the certificate.
|
void |
addIdentity(Name identityName)
Add the identity.
|
void |
addKey(Name identityName,
Name keyName,
ByteBuffer key)
Add the key.
|
void |
clearIdentities()
Erase all certificates, keys, and identities.
|
CertificateV2 |
getCertificate(Name certificateName)
Get the certificate with name certificateName.
|
HashSet<Name> |
getCertificatesOfKey(Name keyName)
Get a list of certificate names of the key with id keyName.
|
CertificateV2 |
getDefaultCertificateOfKey(Name keyName)
Get the default certificate for the key with eyName.
|
Name |
getDefaultIdentity()
Get the default identity.
|
Name |
getDefaultKeyOfIdentity(Name identityName)
Get the name of the default key for the identity with name identityName.
|
HashSet<Name> |
getIdentities()
Get the names of all the identities.
|
Blob |
getKeyBits(Name keyName)
Get the key bits of a key with name keyName.
|
HashSet<Name> |
getKeysOfIdentity(Name identityName)
Get all the key names of the identity with the name identityName.
|
static String |
getScheme() |
String |
getTpmLocator()
Get the TPM Locator.
|
boolean |
hasCertificate(Name certificateName)
Check for the existence of a certificate with name certificateName.
|
boolean |
hasIdentity(Name identityName)
Check for the existence of an identity.
|
boolean |
hasKey(Name keyName)
Check for the existence of a key with keyName.
|
void |
removeCertificate(Name certificateName)
Remove the certificate with name certificateName.
|
void |
removeIdentity(Name identityName)
Remove the identity and its related keys and certificates.
|
void |
removeKey(Name keyName)
Remove the key with keyName and its related certificates.
|
void |
setDefaultCertificateOfKey(Name keyName,
Name certificateName)
Set the cert with name certificateName as the default for the key with
keyName.
|
void |
setDefaultIdentity(Name identityName)
Set the identity with the identityName as the default identity.
|
void |
setDefaultKeyOfIdentity(Name identityName,
Name keyName)
Set the key with keyName as the default key for the identity with name
identityName.
|
void |
setTpmLocator(String tpmLocator)
Set the corresponding TPM information to tpmLocator.
|
public static String getScheme()
public void setTpmLocator(String tpmLocator) throws PibImpl.Error
setTpmLocator in class PibImpltpmLocator - The TPM locator string.PibImpl.Error - for a non-semantic (database access) error.public String getTpmLocator() throws PibImpl.Error
getTpmLocator in class PibImplPibImpl.Error - for a non-semantic (database access) error.public boolean hasIdentity(Name identityName) throws PibImpl.Error
hasIdentity in class PibImplidentityName - The name of the identity.PibImpl.Error - for a non-semantic (database access) error.public void addIdentity(Name identityName) throws PibImpl.Error
addIdentity in class PibImplidentityName - The name of the identity to add. This copies the name.PibImpl.Error - for a non-semantic (database access) error.public void removeIdentity(Name identityName) throws PibImpl.Error
removeIdentity in class PibImplidentityName - The name of the identity to remove.PibImpl.Error - for a non-semantic (database access) error.public void clearIdentities()
throws PibImpl.Error
clearIdentities in class PibImplPibImpl.Error - for a non-semantic (database access) error.public HashSet<Name> getIdentities() throws PibImpl.Error
getIdentities in class PibImplPibImpl.Error - for a non-semantic (database access) error.public void setDefaultIdentity(Name identityName) throws PibImpl.Error
setDefaultIdentity in class PibImplidentityName - The name for the default identity. This copies the name.PibImpl.Error - for a non-semantic (database access) error.public Name getDefaultIdentity() throws Pib.Error, PibImpl.Error
getDefaultIdentity in class PibImplPib.Error - for no default identity.PibImpl.Error - for a non-semantic (database access) error.public boolean hasKey(Name keyName) throws PibImpl.Error
hasKey in class PibImplkeyName - The name of the key.PibImpl.Error - for a non-semantic (database access) error.public void addKey(Name identityName, Name keyName, ByteBuffer key) throws PibImpl.Error
addKey in class PibImplidentityName - The name of the identity that the key belongs to. This
copies the name.keyName - The name of the key. This copies the name.key - The public key bits. This copies the array.PibImpl.Error - for a non-semantic (database access) error.public void removeKey(Name keyName) throws PibImpl.Error
removeKey in class PibImplkeyName - The name of the key.PibImpl.Error - for a non-semantic (database access) error.public Blob getKeyBits(Name keyName) throws Pib.Error, PibImpl.Error
getKeyBits in class PibImplkeyName - The name of the key.Pib.Error - if the key does not exist.PibImpl.Error - for a non-semantic (database access) error.public HashSet<Name> getKeysOfIdentity(Name identityName) throws PibImpl.Error
getKeysOfIdentity in class PibImplidentityName - The name of the identity.PibImpl.Error - for a non-semantic (database access) error.public void setDefaultKeyOfIdentity(Name identityName, Name keyName) throws Pib.Error, PibImpl.Error
setDefaultKeyOfIdentity in class PibImplidentityName - The name of the identity. This copies the name.keyName - The name of the key. This copies the name.Pib.Error - if the key does not exist.PibImpl.Error - for a non-semantic (database access) error.public Name getDefaultKeyOfIdentity(Name identityName) throws Pib.Error, PibImpl.Error
getDefaultKeyOfIdentity in class PibImplidentityName - The name of the identity.Pib.Error - if there is no default key or if the identity does not
exist.PibImpl.Error - for a non-semantic (database access) error.public boolean hasCertificate(Name certificateName) throws PibImpl.Error
hasCertificate in class PibImplcertificateName - The name of the certificate.PibImpl.Error - for a non-semantic (database access) error.public void addCertificate(CertificateV2 certificate) throws PibImpl.Error
addCertificate in class PibImplcertificate - The certificate to add. This copies the object.PibImpl.Error - for a non-semantic (database access) error.public void removeCertificate(Name certificateName) throws PibImpl.Error
removeCertificate in class PibImplcertificateName - The name of the certificate.PibImpl.Error - for a non-semantic (database access) error.public CertificateV2 getCertificate(Name certificateName) throws Pib.Error, PibImpl.Error
getCertificate in class PibImplcertificateName - The name of the certificate.Pib.Error - if the certificate does not exist.PibImpl.Error - for a non-semantic (database access) error.public HashSet<Name> getCertificatesOfKey(Name keyName) throws PibImpl.Error
getCertificatesOfKey in class PibImplkeyName - The name of the key.PibImpl.Error - for a non-semantic (database access) error.public void setDefaultCertificateOfKey(Name keyName, Name certificateName) throws Pib.Error, PibImpl.Error
setDefaultCertificateOfKey in class PibImplkeyName - The name of the key.certificateName - The name of the certificate. This copies the name.Pib.Error - if the certificate with name certificateName does not
exist.PibImpl.Error - for a non-semantic (database access) error.public CertificateV2 getDefaultCertificateOfKey(Name keyName) throws Pib.Error, PibImpl.Error
getDefaultCertificateOfKey in class PibImplkeyName - The name of the key.Pib.Error - if the default certificate does not exist.PibImpl.Error - for a non-semantic (database access) error.Copyright © 2019. All rights reserved.