a-dma / yubitouch Goto Github PK
View Code? Open in Web Editor NEWBash script for setting or clearing touch requirements for # cryptographic operations the OpenPGP application on a YubiKey 4
License: BSD 2-Clause "Simplified" License
Bash script for setting or clearing touch requirements for # cryptographic operations the OpenPGP application on a YubiKey 4
License: BSD 2-Clause "Simplified" License
printf "$PE_PROMPT" | $PE
does not work for me on macOS.
$ PE_PROMPT='SETPROMPT Admin PIN\nGETPIN\nBYE\n'
$ PE=/usr/local/bin/pinentry
$ printf "$PE_PROMPT" | $PE
OK Pleased to meet you
OK
S ERROR curses.? 83918950
ERR 83918950 Inappropriate ioctl for device <Pinentry>
OK closing connection
$ /usr/local/bin/pinentry -h
pinentry-curses (pinentry) 1.0.0
Copyright (C) 2016 g10 Code GmbH
License GPLv2+: GNU GPL version 2 or later <https://www.gnu.org/licenses/>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Usage: pinentry-curses [options] (-h for help)
Ask securely for a secret and print it to stdout.
Options:
-d, --debug Turn on debugging output
-D, --display DISPLAY Set the X display
-T, --ttyname FILE Set the tty terminal node name
-N, --ttytype NAME Set the tty terminal type
-C, --lc-ctype STRING Set the tty LC_CTYPE value
-M, --lc-messages STRING Set the tty LC_MESSAGES value
-o, --timeout SECS Timeout waiting for input after this many seconds
-g, --no-global-grab Grab keyboard only while window is focused
-W, --parent-wid Parent window ID (for positioning)
-c, --colors STRING Set custom colors for ncurses
Please report bugs to <https://bugs.gnupg.org>.
To allow this script to work properly with Cygwin and Gpg4Win installed in the default location that includes space(s) in the path, please replace all instances of $GCA
with "$GCA"
.
When I tried to run this script, it will every time fail with "Verification failed, wrong pin?" message
After a while, I have found that PIN property for real pin "12345679" contains asci value "2d6e2031323334353637390a" that is for "-n 12345679". After delete -n operator on line 97, everything works well.
Line 97 in 2b5f0e6
I discovered your script today and successfully used it to require touch for my Yubikeys. Thanks!
One minor issue I saw when running it was a message from which telling me that I don't have xxd on my system; eg,
which: no xxd in (/usr/sbin:/usr/bin:/sbin:/bin)
Is it worth redirecting stderr to /dev/null each time calling that in the script?
Because the command is interpreted by the bash command line before the execution, there can be an issue with a password that contains characters like $.
It will be useful to improve a readme file here: https://github.com/a-dma/yubitouch/blame/master/README.org#L22
change it please with:
./yubitouch.sh {sig|aut|dec} {off|on|fix} '[admin_pin]'
It will work also with numeric passwords but prevent the issue described above...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.