  
  PG_FUNCTION_INFO_V1(pg_armor);
  PG_FUNCTION_INFO_V1(pg_dearmor);
-@@ -183,6 +211,7 @@ struct debug_expect
+@@ -183,6 +212,7 @@ struct debug_expect
  	int			debug;
  	int			expect;
  	int			cipher_algo;

+			   *key;
+	text	   *keypsw = NULL,
+			   *arg = NULL;
+	int err;
+
+	data = PG_GETARG_BYTEA_P(0);
+	key = PG_GETARG_BYTEA_P(1);
+	if (PG_NARGS() > 2)
+		keypsw = PG_GETARG_BYTEA_P(2);
+	if (PG_NARGS() > 3)
+		arg = PG_GETARG_BYTEA_P(3);
+
+	err = signature_keys_internal(1, data, key, keypsw, arg,
+								  (ReturnSetInfo *) fcinfo->resultinfo);
+
+	if (err < 0)
+		ereport(ERROR,

 	/* text conversion? */
 	if (ctx->text_mode && ctx->convert_crlf)
diff --git a/pgp-info.c b/pgp-info.c
index b75266f..15d5a13 100644
--- a/pgp-info.c
+++ b/pgp-info.c
@@ -49,17 +49,18 @@ read_pubkey_keyid(PullFilter *pkt, uint8 *keyid_buf)
