public class CertificateCredential extends Credential
Modifier and Type | Field and Description |
---|---|
private URI |
certfile |
private URI |
keyfile
This member variables holds the URI of the keyfile of the SecurityContext
|
private int |
privateKeySlot
Some ssh implementations on windows (tunnelier) use a private key slot
|
dataObjects, notes, password, username
Constructor and Description |
---|
CertificateCredential(URI keyfile,
URI certfile,
String password)
Constructs a
CertificateCredential out of a URI pointing
to the private key, a URI pointing to the certificate and a
password. |
CertificateCredential(URI keyfile,
URI certfile,
String username,
String password)
Constructs a
CertificateCredential out of a URI pointing
to the private key, a URI pointing to the certificate, a username
and a password. |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a clone of this context.
|
boolean |
equals(Object obj)
Check two SecurityContexts for equality.
|
URI |
getCertfile()
Returns the
URI of the certificate file. |
URI |
getKeyfile()
Returns the location of the keyfile associated with the context.
|
int |
getPrivateKeySlot()
Returns the private key slot.
|
int |
hashCode() |
void |
setCertfile(URI certfile)
Set the location of the certificate file.
|
void |
setKeyfile(URI keyfile)
Sets the location of the keyfile associated with the context.
|
void |
setPrivateKeySlot(int privateKeySlot)
Sets the private key slot.
|
String |
toString() |
addNote, containsNoteKey, getDataObject, getNoteValue, getPassword, getUsername, isValidFor, putDataObject, removeDataObject, setPassword, setUsername
private URI keyfile
private int privateKeySlot
private URI certfile
public CertificateCredential(URI keyfile, URI certfile, String username, String password)
CertificateCredential
out of a URI
pointing
to the private key, a URI
pointing to the certificate, a username
and a password.keyfile
- the private key file (for example userkey.pem)certfile
- the certificate file (for example usercert.pem)username
- the usernamepassword
- the password or passphrase belonging to the key and
certificate.public CertificateCredential(URI keyfile, URI certfile, String password)
CertificateCredential
out of a URI
pointing
to the private key, a URI
pointing to the certificate and a
password.keyfile
- the private key file (for example userkey.pem)certfile
- the certificate file (for example usercert.pem)password
- the password or passphrase belonging to the key and
certificate.public boolean equals(Object obj)
equals
in class Credential
obj
- the object to compare this withpublic Object clone() throws CloneNotSupportedException
clone
in class Credential
CloneNotSupportedException
public URI getKeyfile()
public void setKeyfile(URI keyfile)
keyfile
- the location of the keyfile associated with the context.public int hashCode()
hashCode
in class Credential
public int getPrivateKeySlot()
public void setPrivateKeySlot(int privateKeySlot)
privateKeySlot
- the new private key slot.public URI getCertfile()
URI
of the certificate file.URI
of the certificate file.public void setCertfile(URI certfile)
certfile
- the location of the certificate file.