net.named_data.jndn.security.identity
public abstract class IdentityStorage extends Object
| Constructor and Description |
|---|
IdentityStorage() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
activateKey(Name keyName)
Activate a key.
|
abstract void |
addCertificate(IdentityCertificate certificate)
Add a certificate to the identity storage.
|
abstract void |
addIdentity(Name identityName)
Add a new identity.
|
abstract void |
addKey(Name keyName,
KeyType keyType,
Blob publicKeyDer)
Add a public key to the identity storage.
|
abstract void |
deactivateKey(Name keyName)
Deactivate a key.
|
abstract void |
deleteCertificateInfo(Name certificateName)
Delete a certificate.
|
abstract void |
deleteIdentityInfo(Name identity)
Delete an identity and related public keys and certificates.
|
abstract void |
deletePublicKeyInfo(Name keyName)
Delete a public key and related certificates.
|
abstract boolean |
doesCertificateExist(Name certificateName)
Check if the specified certificate already exists.
|
abstract boolean |
doesIdentityExist(Name identityName)
Check if the specified identity already exists.
|
abstract boolean |
doesKeyExist(Name keyName)
Check if the specified key already exists.
|
abstract void |
getAllCertificateNamesOfKey(Name keyName,
ArrayList nameList,
boolean isDefault)
Append all the certificate names of a particular key name to the nameList.
|
abstract void |
getAllIdentities(ArrayList nameList,
boolean isDefault)
Append all the identity names to the nameList.
|
abstract void |
getAllKeyNamesOfIdentity(Name identityName,
ArrayList nameList,
boolean isDefault)
Append all the key names of a particular identity to the nameList.
|
abstract IdentityCertificate |
getCertificate(Name certificateName)
Get a certificate from the identity storage.
|
IdentityCertificate |
getDefaultCertificate()
Get the certificate of the default identity.
|
Name |
getDefaultCertificateNameForIdentity(Name identityName)
Get the default certificate name for the specified identity.
|
abstract Name |
getDefaultCertificateNameForKey(Name keyName)
Get the default certificate name for the specified key.
|
abstract Name |
getDefaultIdentity()
Get the default identity.
|
abstract Name |
getDefaultKeyNameForIdentity(Name identityName)
Get the default key name for the specified identity.
|
abstract Blob |
getKey(Name keyName)
Get the public key DER blob from the identity storage.
|
Name |
getNewKeyName(Name identityName,
boolean useKsk)
Generate a name for a new key belonging to the identity.
|
abstract String |
getTpmLocator()
Get the TPM locator associated with this storage.
|
abstract boolean |
revokeIdentity()
Revoke the identity.
|
abstract void |
setDefaultCertificateNameForKey(Name keyName,
Name certificateName)
Set the default key name for the specified identity.
|
abstract void |
setDefaultIdentity(Name identityName)
Set the default identity.
|
void |
setDefaultKeyNameForIdentity(Name keyName)
Set the default key name for the specified identity.
|
abstract void |
setDefaultKeyNameForIdentity(Name keyName,
Name identityNameCheck)
Set a key as the default key of an identity.
|
public abstract boolean doesIdentityExist(Name identityName) throws SecurityException
identityName - The identity name.SecurityExceptionpublic abstract void addIdentity(Name identityName) throws SecurityException
identityName - The identity name to be added.SecurityExceptionpublic abstract boolean revokeIdentity()
throws SecurityException
SecurityExceptionpublic final Name getNewKeyName(Name identityName, boolean useKsk) throws SecurityException
identityName - The identity name.useKsk - If true, generate a KSK name, otherwise a DSK name.SecurityExceptionpublic abstract boolean doesKeyExist(Name keyName) throws SecurityException
keyName - The name of the key.SecurityExceptionpublic abstract void addKey(Name keyName, KeyType keyType, Blob publicKeyDer) throws SecurityException
keyName - The name of the public key to be added.keyType - Type of the public key to be added.publicKeyDer - A blob of the public key DER to be added.SecurityExceptionpublic abstract Blob getKey(Name keyName) throws SecurityException
keyName - The name of the requested public key.SecurityException - if the key doesn't exist.public abstract void activateKey(Name keyName) throws SecurityException
keyName - The name of the key.SecurityExceptionpublic abstract void deactivateKey(Name keyName) throws SecurityException
keyName - The name of the key.SecurityExceptionpublic abstract boolean doesCertificateExist(Name certificateName) throws SecurityException
certificateName - The name of the certificate.SecurityExceptionpublic abstract void addCertificate(IdentityCertificate certificate) throws SecurityException
certificate - The certificate to be added. This makes a copy of the
certificate.SecurityExceptionpublic abstract IdentityCertificate getCertificate(Name certificateName) throws SecurityException
certificateName - The name of the requested certificate.SecurityException - if the certificate doesn't exist.public abstract String getTpmLocator() throws SecurityException
SecurityException - if the TPM locator doesn't exist.public abstract Name getDefaultIdentity() throws SecurityException
SecurityException - if the default identity is not set.public abstract Name getDefaultKeyNameForIdentity(Name identityName) throws SecurityException
identityName - The identity name.SecurityException - if the default key name for the identity is not set.public final Name getDefaultCertificateNameForIdentity(Name identityName) throws SecurityException
identityName - The identity name.SecurityException - if the default key name for the identity is not
set or the default certificate name for the key name is not set.public abstract Name getDefaultCertificateNameForKey(Name keyName) throws SecurityException
keyName - The key name.SecurityException - if the default certificate name for the key name
is not set.public abstract void getAllIdentities(ArrayList nameList, boolean isDefault) throws SecurityException
nameList - Append result names to nameList.isDefault - If true, add only the default identity name. If false, add
only the non-default identity names.SecurityExceptionpublic abstract void getAllKeyNamesOfIdentity(Name identityName, ArrayList nameList, boolean isDefault) throws SecurityException
identityName - The identity name to search for.nameList - Append result names to nameList.isDefault - If true, add only the default key name. If false, add only
the non-default key names.SecurityExceptionpublic abstract void getAllCertificateNamesOfKey(Name keyName, ArrayList nameList, boolean isDefault) throws SecurityException
keyName - The key name to search for.nameList - Append result names to nameList.isDefault - If true, add only the default certificate name. If false,
add only the non-default certificate names.SecurityExceptionpublic abstract void setDefaultIdentity(Name identityName) throws SecurityException
identityName - The default identity name.SecurityExceptionpublic abstract void setDefaultKeyNameForIdentity(Name keyName, Name identityNameCheck) throws SecurityException
keyName - The name of the key.identityNameCheck - The identity name to check that the keyName
contains the same identity name. If an empty name, it is ignored.SecurityExceptionpublic final void setDefaultKeyNameForIdentity(Name keyName) throws SecurityException
keyName - The key name.SecurityExceptionpublic abstract void setDefaultCertificateNameForKey(Name keyName, Name certificateName) throws SecurityException
keyName - The key name.certificateName - The certificate name.SecurityExceptionpublic final IdentityCertificate getDefaultCertificate() throws SecurityException
SecurityExceptionpublic abstract void deleteCertificateInfo(Name certificateName) throws SecurityException
certificateName - The certificate name.SecurityExceptionpublic abstract void deletePublicKeyInfo(Name keyName) throws SecurityException
keyName - The key name.SecurityExceptionpublic abstract void deleteIdentityInfo(Name identity) throws SecurityException
identity - The identity name.SecurityExceptionCopyright © 2016. All rights reserved.