Add a factor to load /srv/sso.debian.org/debsso/data/spkac_ca/ca.crl
authorPeter Palfrader <peter@palfrader.org>
Tue, 25 Aug 2015 17:22:31 +0000 (19:22 +0200)
committerPeter Palfrader <peter@palfrader.org>
Tue, 25 Aug 2015 17:22:31 +0000 (19:22 +0200)
modules/debian-org/lib/facter/debsso.rb [new file with mode: 0644]

diff --git a/modules/debian-org/lib/facter/debsso.rb b/modules/debian-org/lib/facter/debsso.rb
new file mode 100644 (file)
index 0000000..21c4f75
--- /dev/null
@@ -0,0 +1,19 @@
+begin
+    require 'etc'
+
+    Facter.add("debsso_skac_crl") do
+        setcode do
+            crl = nil
+            crlfile = '/srv/sso.debian.org/debsso/data/spkac_ca/ca.crl'
+            if FileTest.exist?(crlfile)
+                crl = File.open(crlfile).read
+            end
+            crl
+        end
+    end
+
+rescue Exception => e
+end
+# vim:set et:
+# vim:set ts=4:
+# vim:set shiftwidth=4: