Tritonio

Building yubico tools (ykman)

Jun 30th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. Working with the code
  2. Install dependencies
  3. It’s assumed a Python environment with pip is installed.
  4.  
  5. Windows
  6. Make sure the swig executable is in your PATH. Add libusb and ykpers DLLs to the root of the repository.
  7.  
  8. macOS
  9. brew install swig ykpers libusb
  10. Linux (Debian-based distributions)
  11. sudo apt install swig libykpers-1-1 libu2f-udev pcscd libpcsclite-dev
  12. Install yubikey-manager from source
  13. Clone the repository:
  14.  
  15. git clone https://github.com/Yubico/yubikey-manager.git
  16. cd yubikey-manager
  17. Install in editable mode with pip:
  18.  
  19. pip install -e .
  20. Show available commands:
  21.  
  22. ykman --help
  23. Show information about inserted YubiKey:
  24.  
  25. ykman info
  26. Run ykman in DEBUG mode:
  27.  
  28. ykman --log-level DEBUG info
  29. To uninstall, run:
  30.  
  31. pip uninstall yubikey-manager
  32. Code Style
  33. This project uses Flake8 for code style with a pre-commit hook. To use these:
  34.  
  35. pip install pre-commit flake8
  36. pre-commit install
  37. Unit tests
  38. To run unit tests:
  39.  
  40. python setup.py test
  41. Integration tests
  42. WARNING
  43. ONLY run these on a dedicated developer key, as it will permanently delete data on the device!
  44. To run integration tests, indicate the serial number (given by ykman list) of the YubiKey to test with:
  45.  
  46. DESTRUCTIVE_TEST_YUBIKEY_SERIAL=123456 python setup.py test
Add Comment
Please, Sign In to add comment