   [ext-container]
   {:pre [(or (certificate? ext-container)
              (certificate-request? ext-container))]
-   :post [(sequential? %)
-          (every? extension? %)]}
+   :post [(extension-list? %)]}
   (-> (ExtensionsUtils/getExtensionList (javaize ext-container))
       clojureize))
 

       (not (nil? (:critical x)))
       (not (nil? (:value x)))))

(defn keypair?
  "Returns true if x is a keypair (see `generate-key-pair`)."
  [x]

  ([keypair subject-dn extensions]
   {:pre  [(keypair? keypair)
           (valid-x500-name? subject-dn)
           (extension-list? extensions)]
    :post [(certificate-request? %)]}
   (CertificateAuthority/generateCertificateRequest
     keypair subject-dn extensions)))
