   [keystore alias pem-private-key pw pem-cert]
   {:pre  [(instance? KeyStore keystore)
           (string? alias)
-          pem-private-key
+          (not (nil? pem-private-key))
           (string? pw)]
    :post [(instance? KeyStore %)]}
   (with-open [key-reader  (reader pem-private-key)


  Returns the SSLContext instance."
  [cert private-key ca-cert]
  {:pre  [cert
          private-key
          ca-cert]
   :post [(instance? SSLContext %)]}
  (with-open [cert-reader    (reader cert)
              key-reader     (reader private-key)

  `pem`: the file path to write the PEM output to (or some other object supported by clojure's `writer`)"
  [key pem]
  {:pre  [(instance? Key key)
          (not (nil? pem))]
   :post [(nil? %)]}
  (with-open [w (writer pem)]
    (CertificateUtils/writeToPEM key w)))
