From a6f651c0f9def5efbd0e034514d320818d06e7c6 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 16 Jun 2012 16:18:12 +0200 Subject: Don't freak out when there is no client certificate. --- src/mulk/benki/main.clj | 16 +++++++++------- 1 file 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] -- cgit v1.2.3