p2ps.imp.peer
Class SecurityManagerImp
java.lang.Object
p2ps.imp.peer.SecurityManagerImp
- All Implemented Interfaces:
- SecurityManager
- public class SecurityManagerImp
- extends java.lang.Object
- implements SecurityManager
Information on the current security context for this peer.
- Version:
- $Revision: 295 $
- Author:
- Ian Wang
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
P2PS_CERTIFICATE_ALIAS_PROPERTY
public static final java.lang.String P2PS_CERTIFICATE_ALIAS_PROPERTY
- See Also:
- Constant Field Values
DEFAULT_P2PS_CERTIFICATE_ALIAS
public static final java.lang.String DEFAULT_P2PS_CERTIFICATE_ALIAS
- See Also:
- Constant Field Values
SecurityManagerImp
public SecurityManagerImp()
init
public void init(Config config,
char[] password)
getKeyStore
public java.security.KeyStore getKeyStore()
- the key store
- Specified by:
getKeyStore in interface SecurityManager
- Returns:
- the key store for this context
getKeyStoreFile
public java.io.File getKeyStoreFile()
- Specified by:
getKeyStoreFile in interface SecurityManager
- Returns:
- the key store file
getKeyStorePassword
public char[] getKeyStorePassword()
- Specified by:
getKeyStorePassword in interface SecurityManager
- Returns:
- the key store password
reloadKeyStore
public void reloadKeyStore()
throws java.security.KeyStoreException
- Reloads the keystore
- Specified by:
reloadKeyStore in interface SecurityManager
- Throws:
java.security.KeyStoreException
getPeerCertificateAlias
public java.lang.String getPeerCertificateAlias()
- Specified by:
getPeerCertificateAlias in interface SecurityManager
- Returns:
- the certificate alias for the main peer
getPeerCertificatePassword
public char[] getPeerCertificatePassword()
- Specified by:
getPeerCertificatePassword in interface SecurityManager
- Returns:
- the password for the peer certificate
getPeerDistinguishedName
public java.lang.String getPeerDistinguishedName()
throws java.security.KeyStoreException
- Specified by:
getPeerDistinguishedName in interface SecurityManager
- Returns:
- the distingushed name for the peer (or null if unknown)
- Throws:
java.security.KeyStoreException
getSecurityContext
public SecurityContext getSecurityContext(java.lang.String peercert,
java.lang.String[] groupcerts)
- Specified by:
getSecurityContext in interface SecurityManager
- Returns:
- the security context for the specified peer and group certificate
thumbprints
getSecurityContext
public SecurityContext getSecurityContext(Peer peer,
java.lang.String clientsecurity,
java.lang.String serversecurity)
- Specified by:
getSecurityContext in interface SecurityManager
- Parameters:
clientsecurity - the client security levelserversecurity - the server security level
- Returns:
- the security context for the specified peer
getSecurityContext
public SecurityContext getSecurityContext(java.net.URI uri,
Peer peer)
- Specified by:
getSecurityContext in interface SecurityManager
- Returns:
- the security context for the specified uri, or null if unknown/
not applicable
getTrustManager
public TrustManager getTrustManager(java.lang.String securitylevel)
- Specified by:
getTrustManager in interface SecurityManager
- Parameters:
securitylevel - the security level (e.g. IDENTITY_SECURITY or TRUST_SECURITY)
- Returns:
- the trust manager responsible for accepting certificates for the
specified security level.
setTrustManager
public void setTrustManager(java.lang.String securitylevel,
TrustManager trustmanager)
- Sets the trust manager responsible for accepting certificates for the
specified context
- Specified by:
setTrustManager in interface SecurityManager