DataDog / yubikey

YubiKey at Datadog
MIT License
495 stars 36 forks source link

gpg.sh hangs due to unexpected output #107

Closed morrisonlevi closed 2 years ago

morrisonlevi commented 2 years ago

I had to make these changes to get it to work:

diff --git a/expect.sh b/expect.sh
index de83a2b..a2594bc 100755
--- a/expect.sh
+++ b/expect.sh
@@ -215,7 +215,7 @@ expect -exact "Enter Admin PIN: "
 stty -echo
 send -- "$ADMIN_PIN\r"

-expect -exact "Set touch policy of signature key to $TOUCH_POLICY? \[y/N\]: "
+expect -exact "Set touch policy of SIG key to $TOUCH_POLICY? \[y/N\]: "
 send -- "y\r"
 expect eof

@@ -228,7 +228,7 @@ expect -exact "Enter Admin PIN: "
 stty -echo
 send -- "$ADMIN_PIN\r"

-expect -exact "Set touch policy of authentication key to on? \[y/N\]: "
+expect -exact "Set touch policy of AUT key to on? \[y/N\]: "
 send -- "y\r"
 expect eof

@@ -241,7 +241,7 @@ expect -exact "Enter Admin PIN: "
 stty -echo
 send -- "$ADMIN_PIN\r"

-expect -exact "Set touch policy of encryption key to on? \[y/N\]: "
+expect -exact "Set touch policy of ENC key to on? \[y/N\]: "
 send -- "y\r"
 expect eof

I do not know why the strings don't match for me -- a regex may be appropriate here or something.

jandro996 commented 2 years ago

After upgrading required tools I have the same issue, seems that openpgp output messages have changed

slemiere commented 2 years ago

same here

urnfdog commented 2 years ago

Can this go back in as a PR or will it break Intel Macs going through this process? Also ran into the same thing on my M1.

daisukixci commented 2 years ago

Made #108 with your patch, thanks