|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.hermesftp.cmd.AbstractFtpCmd net.sf.hermesftp.cmd.impl.FtpCmdAuth
public class FtpCmdAuth
AUTHENTICATION/SECURITY MECHANISM (AUTH)
The argument field is a Telnet string identifying a supported mechanism. This string is case-insensitive. Values must be registered with the IANA, except that values beginning with "X-" are reserved for local use.
If the server does not recognize the AUTH command, it must respond with reply code 500. This is intended to encompass the large deployed base of non-security-aware ftp servers, which will respond with reply code 500 to any unrecognized command. If the server does recognize the AUTH command but does not implement the security extensions, it should respond with reply code 502.
If the server does not understand the named security mechanism, it should respond with reply code 504.
If the server is not willing to accept the named security mechanism, it should respond with reply code 534.
If the server is not able to accept the named security mechanism, such as if a required resource is unavailable, it should respond with reply code 431.
If the server is willing to accept the named security mechanism, but requires security data, it must respond with reply code 334.
If the server is willing to accept the named security mechanism, and does not require any security data, it must respond with reply code 234.
If the server is responding with a 334 reply code, it may include security data as described in the next section.
Some servers will allow the AUTH command to be reissued in order to establish new authentication. The AUTH command, if accepted, removes any state associated with prior FTP Security commands. The server must also require that the user reauthorize (that is, reissue some or all of the USER, PASS, and ACCT commands) in this case (see section 4 of RFC2228 for an explanation of "authorize" in this context).
Field Summary |
---|
Constructor Summary | |
---|---|
FtpCmdAuth()
|
Method Summary | |
---|---|
void |
execute()
Some notes about SSL support: Use keytool to generate a keystore/key:
keytool -genkey -alias behnke -keyalg DSA -keystore keystore -validity 365 -storepass secret -keypass secret
The attributes keypass and storepass must be equal! |
java.lang.String |
getHelp()
Returns a short help text for the command. |
void |
handshakeCompleted(javax.net.ssl.HandshakeCompletedEvent e)
|
boolean |
isAuthenticationRequired()
Returns whether authentication is needed or not. |
boolean |
socketModified()
Indicates, whether the socket has already been modified. |
Methods inherited from class net.sf.hermesftp.cmd.AbstractFtpCmd |
---|
getAbsPath, getAndResetFileOffset, getArguments, getCtx, getPathArg, getPermission, getToken, handleAsyncCmd, isResponded, msg, msg, msg, msgOut, msgOut, msgOut, out, setArguments, setCtx, setToken |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FtpCmdAuth()
Method Detail |
---|
public void execute() throws FtpCmdException
keytool -genkey -alias behnke -keyalg DSA -keystore keystore -validity 365 -storepass secret -keypass secret
The attributes keypass and storepass must be equal! Executes the command.
execute
in interface FtpCmd
FtpCmdException
- Thrown on any exception occuring while the command is executed.public boolean socketModified()
socketModified
in interface ClientSocketModifier
public java.lang.String getHelp()
getHelp
in interface FtpCmd
public boolean isAuthenticationRequired()
isAuthenticationRequired
in interface FtpCmd
public void handshakeCompleted(javax.net.ssl.HandshakeCompletedEvent e)
handshakeCompleted
in interface javax.net.ssl.HandshakeCompletedListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |