public class ManagementApplication
extends java.lang.Object
implements java.io.Closeable
| Constructor and Description |
|---|
ManagementApplication(YubiKeySession session)
Create new instance of
ManagementApplication |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Version |
getVersion()
Firmware version
|
DeviceConfiguration |
readConfiguration()
Reads configurations from device
|
void |
setMode(DeviceConfiguration config)
Enables/disables USB capability on the key
|
void |
writeConfiguration(DeviceConfiguration config,
boolean reboot)
Writes updates
|
public ManagementApplication(YubiKeySession session)
throws java.io.IOException,
ApplicationNotFound
ManagementApplicationsession - session with YubiKeyjava.io.IOException - in case of connection errorApduException - in case of communication errorApplicationNotFoundpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic Version getVersion()
public DeviceConfiguration readConfiguration() throws java.io.IOException, ApduException, NotSupportedOperation
java.io.IOException - in case of connection errorApduException - in case of communication or not supported operation errorNotSupportedOperationpublic void writeConfiguration(DeviceConfiguration config, boolean reboot) throws java.io.IOException, ApduException, NotSupportedOperation
config - updated configurationsreboot - require rebootjava.io.IOException - in case of connection errorApduException - in case of communication or not supported operation errorNotSupportedOperationpublic void setMode(DeviceConfiguration config) throws java.io.IOException, ApduException, NotSupportedOperation
config - updated configurationsjava.io.IOException - in case of connection errorApduException - in case of communication or not supported operation errorNotSupportedOperation