              (certificate-request? ext-container)
              (instance? List ext-container))
          (string? oid)]
-   :post [(map? %)]}
+   :post [(extension? %)]}
   (-> (ExtensionsUtils/getExtension (javaize ext-container) oid)
       clojureize))
 

    (catch Exception _
      false)))

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

  "Given an object which contains a private key, extract and return it."
  [key-object]
  {:pre [(keypair? key-object)]
   :post [(private-key? %)]}
  (CertificateAuthority/getPrivateKey key-object))