Index: examples/example_scripts/perl/IceCream_ID.pem
===================================================================
--- examples/example_scripts/perl/IceCream_ID.pem	(revision ba6027a0fac78c4a2e819aabd3ccc80779620acc)
+++ examples/example_scripts/perl/IceCream_ID.pem	(revision ba6027a0fac78c4a2e819aabd3ccc80779620acc)
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDDCCAfSgAwIBAgIJAP5qi+Yg3YR6MA0GCSqGSIb3DQEBBQUAMBMxETAPBgNV
+BAMTCEljZUNyZWFtMB4XDTEyMDgwNDAzNDYwMFoXDTE1MDcyMDAzNDYwMFowEzER
+MA8GA1UEAxMISWNlQ3JlYW0wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
+AQDuN5ij6TYzFR7TETkSzy8pWVifbWgbqI/K3je0m5mqTLBOiO8HLZwVXRdr0tMw
+eB02PRkEaa1kzHugKVghXhzDUjKUCW7LknD+EntrUKlnN6sfiDBI9Sv8w90dQ/yU
+L70vStQq9gkaHvaJQFtk/SF5znexQd618/KAyHPJeWDl3rMAHWAmIJULIx4kbwFS
+fSy5qUkI32UJ5kyoNXPdnTPP3TxHEfr2XqbYexDJBncIN2jSrpSCFEZh42Ga1sW9
+onJ5gNb69IS3HnReNO7zpL2hV2IAEdio9k8gkjFcQr9VkAwd7konz2R8n6Yy1nSR
+tGKESnnWKD4g/94m6dhAsf+7AgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wDgYD
+VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSxT+wg+QKJWxhsO5qwQe2WnPJwfzAfBgNV
+HSMEGDAWgBSxT+wg+QKJWxhsO5qwQe2WnPJwfzANBgkqhkiG9w0BAQUFAAOCAQEA
+Z7KJYJe4X5vR4sYiVkaySRliSLhB2+NvromOmUuvQY3fvtZVWlvDcEWQpp7OSCJx
+1y3fMMZFdrQGPWiHAUZX4WdplzsO1TG208p0jqSJaQjclnUcT2Vb6E1ViDVude9W
+xhaPgKI+wzeECsSN29GUBeNtG9EAGm5POIWrWtx33g3fgzDw5vmtLGV+T7/OWXMR
+6w0n0sLZ5soqa0GSDMqL+/ZrkllqoFSyYMlswHlsZKn6ta/tIAUeYBIwTQsqVuwK
+JetIavMeFNFxfUEEn5WZUgkGtc8X2/d25FfsVH3iG4NCmmFqvUQMro+rJUi0rp5j
+WNNA9b0mcL6OLlwmt82HCQ==
+-----END CERTIFICATE-----
Index: examples/example_scripts/perl/IceCream_private.pem
===================================================================
--- examples/example_scripts/perl/IceCream_private.pem	(revision ba6027a0fac78c4a2e819aabd3ccc80779620acc)
+++ examples/example_scripts/perl/IceCream_private.pem	(revision ba6027a0fac78c4a2e819aabd3ccc80779620acc)
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEA7jeYo+k2MxUe0xE5Es8vKVlYn21oG6iPyt43tJuZqkywTojv
+By2cFV0Xa9LTMHgdNj0ZBGmtZMx7oClYIV4cw1IylAluy5Jw/hJ7a1CpZzerH4gw
+SPUr/MPdHUP8lC+9L0rUKvYJGh72iUBbZP0hec53sUHetfPygMhzyXlg5d6zAB1g
+JiCVCyMeJG8BUn0sualJCN9lCeZMqDVz3Z0zz908RxH69l6m2HsQyQZ3CDdo0q6U
+ghRGYeNhmtbFvaJyeYDW+vSEtx50XjTu86S9oVdiABHYqPZPIJIxXEK/VZAMHe5K
+J89kfJ+mMtZ0kbRihEp51ig+IP/eJunYQLH/uwIDAQABAoIBABnAvuqxcp+RH/T3
+frEO3u1ccF1D6aZb0be/0EvhKnqjsce7vAONpbsVhkuszhIGWjob3tGATzN/e7nz
+3kg1MWzYPQmN/4FYgoilHNycKsQy23gcNAQfJTM9RXE9gVfP1WcAcvF2CcPeJw7t
+ezPuvai6bmwmT9ph1gygHwxf597RwCgw5RJILj7RbB5S/qGCM52iAJk8L1n3LzFm
+hXfoyD+q97jSETJ7VBFsW/wCDVeD1l8u9tVNRGMshrQnZSNvzZ4xJeql6BmJ94Kw
+HtNDTo2MCsl3HAuqqhz/asKwbKsf2IWxG2fBd+7l9yyJWFQw2P4/eDm2b339U416
+Jq6wZ9ECgYEA+gXxqQjwXPSzCNwVop3QiVm/LMdQENSrwgGX/334UZTqTO0BMMqX
+RkGCEr0E+TJieHEHPyFDulBkEahBM8VU87cT8iVbbIY8uN//Vpxn3B9BNYeJhFge
+h+Ed79C4OD5IFlvEsLyl9lO9lMejKszkPAPQguLTTY/2LnsMZlT9HgkCgYEA8+ln
+QKDrQkbwm/6P5VFjSMvIyaXxu6+8N07JbssqdeNkROKw21mvOIcPDgEXqhPK+HAz
+9hYycRjxmre4drtimDux8IM4z14U0nxhQs0Gi0PFuvWzKgx0RuF0MUgTIeZNgEWN
+5mwbGM0S2DPcypk7D3IdcqmGZd+9ybroK69A4KMCgYALVJ2hBXCvJb+/VQn99pzu
+vIx3YQj12k12W1AiGflY6SC9H7iAF45HdsyIQNyq1me0AZtMdxt0pBQE4NUjnXu+
+F7vlq1+7SVITJsORj0D9rsTrwhqvTrcDfWY36gOPOPNXYA1H3STARwc+aNWyKNrn
+BV07sT/WMgH8FUN4l71o0QKBgESQzUS+t8Om24aOlfbZ3TYeizAcZQrkyN0nWbq6
+hBIlvQ8cRqky2e3jEZlXN0bJT5ptOD4qWT2vzGM42DMQVBQFW+0HhlXM1b+h1VmI
+9xj5EUGQRjBA1gMC573ey/oQmqK/ardmlmtvYqfCVIPjdVXPN3X/L9e9gMWPtCpr
+lqpPAoGBAOufAucJga/80qSfzPjC3NlKJ20pjC/ijG2K630grAqa7WDg0KjLk5IH
+hXy9bXMUq/dNEbm3r0fCC05XfRdY6wnQghthvcgvX3/3SdDA74XXTwOg7f0NlSCr
+UEMgsnQbAHt3Sf6sIBMfffPv9HBcyft1aUGPWGXk34jqRTBmI4vY
+-----END RSA PRIVATE KEY-----
Index: examples/example_scripts/perl/Makefile
===================================================================
--- examples/example_scripts/perl/Makefile	(revision ba6027a0fac78c4a2e819aabd3ccc80779620acc)
+++ examples/example_scripts/perl/Makefile	(revision ba6027a0fac78c4a2e819aabd3ccc80779620acc)
@@ -0,0 +1,16 @@
+clean:
+	rm -f *.pem *.der 
+
+realclean:
+	rm -rf *.pem *.der *.log
+
+run: 
+	make clean
+	rm -rf id.log
+	creddy --generate --cn IceCream
+	./abac_keyid.pl IceCream_ID.pem 1>id.log 2>&1 
+bad: 
+	make clean
+	rm -rf id2.log
+	creddy --generate --cn IceCream
+	./abac_keyid.pl IceCream_private.pem 1>id2.log 2>&1 
Index: examples/example_scripts/perl/abac_keyid.pl
===================================================================
--- examples/example_scripts/perl/abac_keyid.pl	(revision ba6027a0fac78c4a2e819aabd3ccc80779620acc)
+++ examples/example_scripts/perl/abac_keyid.pl	(revision ba6027a0fac78c4a2e819aabd3ccc80779620acc)
@@ -0,0 +1,17 @@
+#!/usr/bin/perl
+
+use ABAC;
+
+my $filename = shift || die "Usage: abac_keyid.pl <cert.pem>\n";
+
+my $id;
+eval {
+    # will throw a RuntimeException if it can't load the cert
+    $id = ABAC::ID->new($filename);
+};
+if ($@) {
+    print "ERROR, Problem loading cert: $@";
+    exit;
+}
+
+print $id->id_keyid, "    OKAY\n";
Index: examples/example_scripts/perl/id.log
===================================================================
--- examples/example_scripts/perl/id.log	(revision ba6027a0fac78c4a2e819aabd3ccc80779620acc)
+++ examples/example_scripts/perl/id.log	(revision ba6027a0fac78c4a2e819aabd3ccc80779620acc)
@@ -0,0 +1,1 @@
+e3f7a5ceeb2d8f816aebbbcf0054bbc03732b8d6    OKAY
Index: examples/example_scripts/perl/id2.log
===================================================================
--- examples/example_scripts/perl/id2.log	(revision ba6027a0fac78c4a2e819aabd3ccc80779620acc)
+++ examples/example_scripts/perl/id2.log	(revision ba6027a0fac78c4a2e819aabd3ccc80779620acc)
@@ -0,0 +1,3 @@
+OpenSSL X.509 parsing failed
+building CRED_CERTIFICATE - X509 failed, tried 4 builders
+perl: Id creation from filename failed
Index: examples/example_scripts/perl/run_test
===================================================================
--- examples/example_scripts/perl/run_test	(revision ba6027a0fac78c4a2e819aabd3ccc80779620acc)
+++ examples/example_scripts/perl/run_test	(revision ba6027a0fac78c4a2e819aabd3ccc80779620acc)
@@ -0,0 +1,19 @@
+#!/bin/sh 
+
+echo '---running (perl) id script'
+make run 1>/dev/null 2>& 1
+result=`grep OKAY id.log 2>/dev/null`
+if [ "$result" = "" ]; then
+   echo "   ERROR"
+else   
+   echo "   PASSED"
+fi
+
+echo '---running (perl) id script, expected failure'
+make bad 1>/dev/null 2>& 1
+result=`grep "Id creation from filename failed" id2.log 2>/dev/null`
+if [ "$result" = "" ]; then
+   echo "   ERROR"
+else   
+   echo "   PASSED"
+fi
