KeyTool: Fix .auth vs .esl/.cer file confusion

In user mode, authenticated variables are the ones that require .auth
files.  The Mok variables still take any file type.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
diff --git a/KeyTool.c b/KeyTool.c
index 049ee4e..62be460 100644
--- a/KeyTool.c
+++ b/KeyTool.c
@@ -405,8 +405,13 @@
 {
 	CHAR16 *title[3];
 	/* PK update must be signed: so require .auth file */
-	CHAR16 *ext = (key != KEY_PK && variable_is_setupmode())
-		? L".esl|.auth|.cer" : L".auth";
+	CHAR16 *ext;
+
+	if (key != KEY_PK && (variable_is_setupmode()
+			      || keyinfo[key].authenticated == 0))
+		ext = L".esl|.auth|.cer";
+	else
+		ext = L".auth";
 
 	title[0] = L"Select File containing additional key for";
 	title[1] = keyinfo[key].text;