java.lang.Object | +--java.security.Identity | +--java.security.Signer
java.security.KeyStore, the
java.security.cert package, and
java.security.Principal.
Untamed: This class is used to represent an Identity that can also digitally sign data.
The management of a signer's private keys is an important and sensitive issue that should be handled by subclasses as appropriate to their intended use.
Identity,
Serialized FormSigner(String name,
IdentityScope scope)
void
setKeyPair(KeyPair pair)
addCertificate, certificates, equals, fullName, getInfo, getName, getPublicKey, getScope, hashCode, identityEquals, printCertificates, removeCertificate, setInfo, setPublicKey, toString
private PrivateKey privateKey
protected Signer()
public Signer(String name)
name - the identity name.public Signer(String name, IdentityScope scope) throws KeyManagementException
name - the identity name.scope - the scope of the identity.public PrivateKey getPrivateKey()
First, if there is a security manager, its checkSecurityAccess
method is called with "getSignerPrivateKey"
as its argument to see if it's ok to return the private key.
SecurityManager.checkSecurityAccess(java.lang.String)public final void setKeyPair(KeyPair pair) throws InvalidParameterException, KeyException
First, if there is a security manager, its checkSecurityAccess
method is called with "setSignerKeyPair"
as its argument to see if it's ok to set the key pair.
pair - an initialized key pair.
InvalidParameterException
KeyExceptionSecurityManager.checkSecurityAccess(java.lang.String)String printKeys()
public String toString()
SecurityManager.checkSecurityAccess(java.lang.String)private static void check(String directive)