     {:not-before (.toDate not-before)
      :not-after  (.toDate not-after)}))
 
+
 (schema/defn settings->cadir-paths
   "Trim down the CA settings to include only paths to files and directories.
   These paths are necessary during CA initialization for determining what needs

           [java.io InputStream ByteArrayOutputStream ByteArrayInputStream File StringReader IOException]
           [java.nio.file Files Paths LinkOption]
           [java.nio.file.attribute FileAttribute PosixFilePermissions]
           (java.security KeyPair)
           (org.joda.time DateTime)
           (java.security.cert CRLException)
           (sun.security.x509 X509CertImpl))

                                             (.getPublicKey cacert)))]
    (log/info (i18n/trs "Signed certificate request for {0}" subject))
    (write-cert-to-inventory! signed-cert cert-inventory)
    (write-cert signed-cert (path-to-cert signeddir subject))))

(schema/defn ^:always-validate
  save-certificate-request!
