|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.peer.secrmi.SecureRMIToolkit | +--edu.stanford.peer.secrmi.SecureServerToolkit
The SecureServerToolkit class can export RMI remote objects using SSL and create signed proxies. The way to use this class is first to create a SecureServerToolkit object, then use it to export objects and register both the remote object and the signed proxy with a registry.
Constructor Summary | |
SecureServerToolkit(java.security.KeyStore serviceKS,
java.lang.String sksPwd,
java.security.KeyStore proxyKS)
Creates a SecureServerToolkit object. |
|
SecureServerToolkit(java.security.KeyStore serviceKS,
java.lang.String sksPwd,
java.security.KeyStore proxyKS,
java.lang.String signingKeyAlias,
java.lang.String signingAlg)
Creates a SecureServerToolkit object. |
|
SecureServerToolkit(java.security.KeyStore serviceKS,
java.lang.String sksPwd,
java.security.KeyStore proxyKS,
java.lang.String signingKeyAlias,
java.lang.String signingAlg,
java.lang.String provider)
|
Method Summary | |
java.rmi.Remote |
exportObject(java.rmi.Remote object)
Exports a remote object so that proxies of the remote object communicate with the object through SSL. |
SignedRemoteObject |
exportSignedObject(java.rmi.Remote object)
Exports a remote object so that proxies of the remote object communicate with the object through SSL and creates a signed proxy. |
static java.security.KeyStore |
loadKeyStore(java.lang.String type,
java.io.FileInputStream in,
char[] icchars)
Load a key store from an input stream. |
static java.security.KeyStore |
loadKeyStore(java.lang.String type,
java.lang.String provider,
java.io.FileInputStream in,
char[] icchars)
Load a key store from an input stream. |
static java.security.KeyStore |
loadKeyStore(java.lang.String type,
java.lang.String filename,
java.lang.String icword)
Load a key store from file. |
static java.security.KeyStore |
loadKeyStore(java.lang.String type,
java.lang.String provider,
java.lang.String filename,
java.lang.String icword)
Load a key store from file. |
void |
setSignature(java.security.PrivateKey signingKey,
java.lang.String signingAlg)
|
void |
setSignature(java.security.PrivateKey signingKey,
java.lang.String signingAlg,
java.lang.String provider)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SecureServerToolkit(java.security.KeyStore serviceKS, java.lang.String sksPwd, java.security.KeyStore proxyKS) throws java.security.NoSuchAlgorithmException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.UnrecoverableKeyException, java.security.cert.CertificateException, java.security.KeyManagementException, java.security.InvalidKeyException
serviceKS
- the key store that holds the private key for services
to communicate act as SSL serverssksPwd
- the password to access the private key in the key storeproxyKS
- the key store that holds certificates of that the proxypublic SecureServerToolkit(java.security.KeyStore serviceKS, java.lang.String sksPwd, java.security.KeyStore proxyKS, java.lang.String signingKeyAlias, java.lang.String signingAlg) throws java.security.NoSuchAlgorithmException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.UnrecoverableKeyException, java.security.cert.CertificateException, java.security.KeyManagementException, java.security.InvalidKeyException
serviceKS
- the key store services use to communicate
with proxies through SSLsksPwd
- the password to access the service key storeproxyKS
- the key store that the proxy uses as a trust storepublic SecureServerToolkit(java.security.KeyStore serviceKS, java.lang.String sksPwd, java.security.KeyStore proxyKS, java.lang.String signingKeyAlias, java.lang.String signingAlg, java.lang.String provider) throws java.security.NoSuchAlgorithmException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.UnrecoverableKeyException, java.security.cert.CertificateException, java.security.KeyManagementException, java.security.InvalidKeyException
Method Detail |
public void setSignature(java.security.PrivateKey signingKey, java.lang.String signingAlg) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException
public void setSignature(java.security.PrivateKey signingKey, java.lang.String signingAlg, java.lang.String provider) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.InvalidKeyException
public final SignedRemoteObject exportSignedObject(java.rmi.Remote object) throws java.rmi.RemoteException, java.io.IOException, java.security.InvalidKeyException
object
- the object to be exportedpublic final java.rmi.Remote exportObject(java.rmi.Remote object) throws java.rmi.RemoteException
object
- the object to be exportedpublic static final java.security.KeyStore loadKeyStore(java.lang.String type, java.lang.String filename, java.lang.String icword) throws java.io.FileNotFoundException, java.io.IOException, java.security.KeyStoreException, java.security.cert.CertificateException, java.security.NoSuchAlgorithmException
type
- the type of the key store to load, e.g., JKS, jceks, etc.filename
- the name of the key store fileicword
- the word for checking the integrity of the key store;
when it is null, no check is performedpublic static final java.security.KeyStore loadKeyStore(java.lang.String type, java.io.FileInputStream in, char[] icchars) throws java.io.IOException, java.security.KeyStoreException, java.security.cert.CertificateException, java.security.NoSuchAlgorithmException
type
- the type of the key store to load, e.g., JKS, jceks, etc.in
- the input stream of the keystoreicchars
- the word for checking the integrity of the key store;
when it is null, no check is performed.public static final java.security.KeyStore loadKeyStore(java.lang.String type, java.lang.String provider, java.lang.String filename, java.lang.String icword) throws java.io.FileNotFoundException, java.io.IOException, java.security.KeyStoreException, java.security.cert.CertificateException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException
type
- the type of the key store to load, e.g., JKS, jceks, etc.provider
- the name of the providerfilename
- the name of the key store fileicword
- the word for checking the integrity of the key store;
when it is null, no check is performedpublic static final java.security.KeyStore loadKeyStore(java.lang.String type, java.lang.String provider, java.io.FileInputStream in, char[] icchars) throws java.io.IOException, java.security.KeyStoreException, java.security.NoSuchProviderException, java.security.cert.CertificateException, java.security.NoSuchAlgorithmException
type
- the type of the key store to load, e.g., JKS, jceks, etc.provider
- the name of the providerin
- the input stream of the keystoreicchars
- the word for checking the integrity of the key store;
when it is null, no check is performed
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |