summaryrefslogtreecommitdiff
path: root/app/designs
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-07-12 09:55:26 +0200
committerAzul <azul@leap.se>2014-07-12 09:55:26 +0200
commit3bbfdf29bbc40432c21e34fe84060cf9ae70273f (patch)
tree553111ac07f6100738f29ddc7165fa800852f224 /app/designs
parent0666c06fd7e66c783345a9810ace319a1cd9321f (diff)
allow querying for the expiry of a particular fingerprint
Diffstat (limited to 'app/designs')
-rw-r--r--app/designs/identity/cert_expiry_by_fingerprint.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/designs/identity/cert_expiry_by_fingerprint.js b/app/designs/identity/cert_expiry_by_fingerprint.js
new file mode 100644
index 0000000..0636da5
--- /dev/null
+++ b/app/designs/identity/cert_expiry_by_fingerprint.js
@@ -0,0 +1,12 @@
+function(doc) {
+ if (doc.type != 'Identity') {
+ return;
+ }
+ if (typeof doc.cert_fingerprints === "object") {
+ for (fp in doc.cert_fingerprints) {
+ if (doc.cert_fingerprints.hasOwnProperty(fp)) {
+ emit(fp, doc.cert_fingerprints[fp]);
+ }
+ }
+ }
+}