| Top |
| ykneomgr_rc | ykneomgr_global_init () |
| void | ykneomgr_global_done () |
| const char * | ykneomgr_strerror () |
| const char * | ykneomgr_strerror_name () |
| ykneomgr_rc | ykneomgr_init () |
| void | ykneomgr_done () |
| ykneomgr_rc | ykneomgr_list_devices () |
| ykneomgr_rc | ykneomgr_connect () |
| ykneomgr_rc | ykneomgr_discover () |
| uint8_t | ykneomgr_get_version_major () |
| uint8_t | ykneomgr_get_version_minor () |
| uint8_t | ykneomgr_get_version_build () |
| uint8_t | ykneomgr_get_mode () |
| uint32_t | ykneomgr_get_serialno () |
| ykneomgr_rc | ykneomgr_modeswitch () |
| ykneomgr_rc | ykneomgr_authenticate () |
| ykneomgr_rc | ykneomgr_applet_list () |
| ykneomgr_rc | ykneomgr_applet_delete () |
| ykneomgr_rc | ykneomgr_applet_install () |
ykneomgr_rc
ykneomgr_global_init (ykneomgr_initflags flags);
Initialize the library. This function is not guaranteed to be thread safe and must be invoked on application startup.
void
ykneomgr_global_done (void);
Release all resources from the library. Call this function when no further use of the library is needed.
const char *
ykneomgr_strerror (int err);
Convert return code to human readable string explanation of the reason for the particular error code.
This string can be used to output a diagnostic message to the user.
This function is one of few in the library that can be used without
a successful call to ykneomgr_global_init().
const char *
ykneomgr_strerror_name (int err);
Convert return code to human readable string representing the error
code symbol itself. For example, ykneomgr_strerror_name(YKNEOMGR_OK)
returns the string "YKNEOMGR_OK".
This string can be used to output a diagnostic message to the user.
This function is one of few in the library that can be used without
a successful call to ykneomgr_global_init().
ykneomgr_rc
ykneomgr_init (ykneomgr_dev **dev);
Create a YubiKey NEO device handle. The handle must be deallocated
using ykneomgr_done() when you no longer need it.
void
ykneomgr_done (ykneomgr_dev *dev);
Release all resources allocated to a YubiKey NEO device handle.
ykneomgr_rc ykneomgr_list_devices (ykneomgr_dev *dev,char *devicestr,size_t *len);
List devices.
dev |
a ykneomgr_dev device handle. |
|
devicestr |
output buffer to hold string, or |
|
len |
on input length of |
ykneomgr_rc ykneomgr_connect (ykneomgr_dev *dev,const char *name);
Establish connection to a named PCSC device and verify that it has
the YubiKey NEO applet. The name
string should be a PCSC device
name; you can use the command line tool "pcsc_scan" to list
connected devices.
On success, YKNEOMGR_OK (integer 0) is returned, when no
device could be found YKNEOMGR_NO_DEVICE is returned, or another
ykneomgr_rc error code.
ykneomgr_rc
ykneomgr_discover (ykneomgr_dev *dev);
Discover and establish connection to a YubiKey NEO. The function will return an error if more than one device is present, or if no device is present.
On success, YKNEOMGR_OK (integer 0) is returned, when no
device could be found YKNEOMGR_NO_DEVICE is returned, when too
many devices are present YKNEOMGR_TOO_MANY_DEVICES is returned,
or another ykneomgr_rc error code.
uint8_t
ykneomgr_get_version_major (ykneomgr_dev *dev);
Get major version of a YubiKey NEO. Versions are in the form of MAJOR.MINOR.BUILD, for example 3.0.4, in which case this function would return 3.
uint8_t
ykneomgr_get_version_minor (ykneomgr_dev *dev);
Get minor version of a YubiKey NEO. Versions are in the form of MINOR.MINOR.BUILD, for example 3.0.4, in which case this function would return 0.
uint8_t
ykneomgr_get_version_build (ykneomgr_dev *dev);
Get build version of a YubiKey NEO. Versions are in the form of BUILD.MINOR.BUILD, for example 3.0.4, in which case this function would return 4.
uint32_t
ykneomgr_get_serialno (ykneomgr_dev *dev);
Get serial number of a YubiKey NEO, if visible.
ykneomgr_rc ykneomgr_modeswitch (ykneomgr_dev *dev,uint8_t mode);
Mode switch a YubiKey NEO.
ykneomgr_rc ykneomgr_authenticate (ykneomgr_dev *dev,const uint8_t *key);
Authenticate to the device, to prepare for privileged function access.
ykneomgr_rc ykneomgr_applet_list (ykneomgr_dev *dev,char *appletstr,size_t *len);
List installed applets.
dev |
a ykneomgr_dev device handle. |
|
appletstr |
output buffer to hold string, or |
|
len |
on input length of |
ykneomgr_rc ykneomgr_applet_delete (ykneomgr_dev *dev,const uint8_t *aid,size_t aidlen);
Delete specified applet.
ykneomgr_rc ykneomgr_applet_install (ykneomgr_dev *dev,const char *capfile);
Install specified applet.