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 |
getAllKeyNamesOfIdentity(Name identityName,
ArrayList nameList,
boolean isDefault)
Append all the key names of a particular identity to the nameList.
|
IdentityCertificate |
getCertificate(Name certificateName)
Get a certificate from the identity storage, requiring only a valid
certificate to be returned.
|
abstract IdentityCertificate |
getCertificate(Name certificateName,
boolean allowAny)
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 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.SecurityException - if a key with the keyName already exists.public abstract Blob getKey(Name keyName) throws SecurityException
keyName - The name of the requested public key.SecurityExceptionpublic 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.SecurityException - if the certificate is already installed.public abstract IdentityCertificate getCertificate(Name certificateName, boolean allowAny) throws SecurityException
certificateName - The name of the requested certificate.allowAny - If false, only a valid certificate will be
returned, otherwise validity is disregarded.SecurityExceptionpublic final IdentityCertificate getCertificate(Name certificateName) throws SecurityException
certificateName - The name of the requested certificate.SecurityExceptionpublic 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 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 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.