Needed for some configurations, at least virtualbox. fixes #14.
if (ykl_errno != 0)
goto done;
ykl_errno = libusb_detach_kernel_driver(h, 0);
+ if (ykl_errno != 0)
+ goto done;
+ /* This is needed for yubikey-personalization to work inside virtualbox virtualization. */
+ ykl_errno = libusb_set_configuration(h, 1);
goto done;
}
}
if (h != NULL)
usb_detach_kernel_driver_np(h, 0);
#endif
+ /* This is needed for yubikey-personalization to work inside virtualbox virtualization. */
+ if (h != NULL)
+ usb_set_configuration(h, 1);
goto done;
}
}