-fingerprint=$(fingerprint_server_key)
-
-# match to only ultimately trusted user IDs
-tmpuidMatch="u:$(echo $userID | gpg_escape)"
-
-# find the index of the requsted user ID
-# NOTE: this is based on circumstantial evidence that the order of
-# this output is the appropriate index
-if line=$(gpg_host --list-keys --with-colons --fixed-list-mode "0x${fingerprint}!" \
- | egrep '^(uid|uat):' | cut -f2,10 -d: | grep -n -x -F "$tmpuidMatch") ; then
- uidIndex=${line%%:*}
+# make sure the user ID to revoke
+uidIndex=$(find_host_userid) || \
+ failure "No non-revoked user ID found matching '$userID'."
+
+if [ "$PROMPT" = "true" ] ; then
+ read -p "The following host key user ID will be revoked:
+ $userID
+Are you sure you would like to revoke this user ID? (Y/n) " OK; OK=${OK:=Y}
+ if [ "${OK/y/Y}" != 'Y' ] ; then
+ failure "User ID not revoked."
+ fi