|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.distinct.rpc.Auth
|
+--com.distinct.rpc.AuthDes
Implements AUTH_DES authenticators. Used in Secure RPC.
JRPC.Auth,
JRPC.AuthUnix,
JRPC.AuthShort,
Serialized Form| Field Summary | |
static int |
kMAXNETNAME
|
| Constructor Summary | |
AuthDes(java.lang.String clientnetname,
java.math.BigInteger SK,
java.math.BigInteger PK,
int win)
Creates an authenticator of flavor AUTH_DES. |
|
AuthDes(java.lang.String clientnetname,
java.lang.String passwd,
java.lang.String servernetname,
PublicKeyDB db,
int win)
Creates an authenticator of flavor AUTH_DES. |
|
| Method Summary | |
static java.lang.String |
generateKeyPair(java.lang.String passwd)
Generates a new key pair (public key/private key) |
java.lang.String |
getClientNetname()
Returns the full authenticated netname of the client. |
javax.crypto.SecretKey |
getSessionKey()
Returns the DES secret key that is used in this session. |
Auth |
getVerifier()
Returns the verifier that belongs to this authenticator. |
void |
setServerTime(int server_time)
Sets the current system time of the server, measured in seconds, since midnight, January 1, 1970 UTC. |
void |
update()
Updates the authenticator for a new call with the latest timestamp. |
void |
validate(Auth verf)
Checks whether the other authenticator (the one returned from the server) fits to this one and updates the status of this instance if required. |
| Methods inherited from class com.distinct.rpc.Auth |
getAuthOpaque, getFlavor, setAuthOpaque, setFlavor, xdr_decode, xdr_encode |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int kMAXNETNAME
| Constructor Detail |
public AuthDes(java.lang.String clientnetname,
java.lang.String passwd,
java.lang.String servernetname,
PublicKeyDB db,
int win)
throws RPCError
clientnetname - The name of the client's authority.passwd - The password that authenticates the client's authority.servernetname - The name of the servers's authority.db - The key store.win - The time window size in seconds.
RPCError - Thrown if creation fails.
public AuthDes(java.lang.String clientnetname,
java.math.BigInteger SK,
java.math.BigInteger PK,
int win)
throws RPCError
clientnetname - The name of the client's authority.SK - The secret private key of the client.PK - The public key of the server.win - The time window size in seconds.
RPCError - Thrown if creation fails.| Method Detail |
public void setServerTime(int server_time)
server_time - The current system time of the server.public java.lang.String getClientNetname()
public javax.crypto.SecretKey getSessionKey()
public Auth getVerifier()
public void validate(Auth verf)
throws RPCAuthError
RPCAuthError - Thrown if the check fails.
public void update()
throws RPCError
RPCError
public static java.lang.String generateKeyPair(java.lang.String passwd)
throws RPCError
passwd - The password used to encrypt the secret key.
RPCError - Thrown if something fails in the crypto stuff.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||