Revert "Revert "Dynamic insertion of pubkey to mac_permissions.xml""

This reverts commit 1446e714af0b0c358b5ecf37c5d704c96c72cf7c

Hidden dependency has been resolved.

Change-Id: Ia535c0b9468ea5f705dff9813186a7fa8bab84ae
diff --git a/keys.conf b/keys.conf
new file mode 100644
index 0000000..387b65a
--- /dev/null
+++ b/keys.conf
@@ -0,0 +1,25 @@
+#
+# Maps an arbitrary tag [TAGNAME] with the string contents found in
+# TARGET_BUILD_VARAINT. Common convention is to start TAGNAME with an @ and
+# name it after the base file name of the pem file.
+#
+# Each tag (section) then allows one to specify any string found in
+# TARGET_BUILD_VARIANT. Typcially this is user, eng, and userdebug. Another
+# option is to use ALL which will match ANY TARGET_BUILD_VARAINT string.
+#
+
+[@PLATFORM]
+ALL : build/target/product/security/platform.x509.pem
+
+[@MEDIA]
+ALL : build/target/product/security/media.x509.pem
+
+[@SHARED]
+ALL : build/target/product/security/shared.x509.pem
+
+# Example of ALL TARGET_BUILD_VARIANTS
+[@RELEASE]
+ENG       : build/target/product/security/testkey.x509.pem
+USER      : build/target/product/security/testkey.x509.pem
+USERDEBUG : build/target/product/security/testkey.x509.pem
+