summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-06-16 16:18:12 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-06-16 16:18:12 +0200
commita6f651c0f9def5efbd0e034514d320818d06e7c6 (patch)
tree063a4b04594488637ebaf99674e6ba597bbb04ee /src
parentc5e1ae4c18a7bb8ecf9370b913e1de1ebc64f398 (diff)
Don't freak out when there is no client certificate.
Diffstat (limited to 'src')
-rw-r--r--src/mulk/benki/main.clj16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mulk/benki/main.clj b/src/mulk/benki/main.clj
index 43809ca..7bcf332 100644
--- a/src/mulk/benki/main.clj
+++ b/src/mulk/benki/main.clj
@@ -71,13 +71,15 @@
subject :subject
}
cert-data]
- {:modulus (bigint (BigInteger. modulus 16))
- :exponent (bigint (BigInteger. exponent 16))
- :fingerprint fingerprint
- :valid-to (org.joda.time.DateTime. (Long. valid-to))
- :valid-from (org.joda.time.DateTime. (Long. valid-from))
- :subject subject
- :subject-alt-name subject-alt-name}))
+ (if modulus
+ {:modulus (bigint (BigInteger. modulus 16))
+ :exponent (bigint (BigInteger. exponent 16))
+ :fingerprint fingerprint
+ :valid-to (org.joda.time.DateTime. (Long. valid-to))
+ :valid-from (org.joda.time.DateTime. (Long. valid-from))
+ :subject subject
+ :subject-alt-name subject-alt-name}
+ nil)))
(defn wrap-client-cert [handler]
(fn [request]