Clojure glue code to interact with the horrible JVM SSL code
Clojure glue code to interact with the horrible JVM SSL code
Help net decide how to treat input. The default value
of :guess
will treat string input as paths under 256
chars - a common value for PATH_MAX - and inlined
cert data above that.
A value of :data
will always assume inlined certs,
and a value of :file
will always assume paths.
Help net decide how to treat input. The default value of `:guess` will treat string input as paths under 256 chars - a common value for **PATH_MAX** - and inlined cert data above that. A value of `:data` will always assume inlined certs, and a value of `:file` will always assume paths.
(->chain fact cert-spec)
Get a certificate chain out of several certificate specs
Get a certificate chain out of several certificate specs
(cert-bytes input)
Get certificate bytes out of an input.
Get certificate bytes out of an input.
(cert-string input)
Convert input to certificate bytes
Convert input to certificate bytes
(client-context {:keys [bundle password cert pkey authority storage insecure]})
Build an SSL client context for netty
Build an SSL client context for netty
(handler-fn ctx)
Build a handler function to be used in netty pipelines out of an SSL context. Will yield a 1-arity function of a context and a 3-arity function of a context, a host, and a port which will add a handler to the context.
Build a handler function to be used in netty pipelines out of an SSL context. Will yield a 1-arity function of a context and a 3-arity function of a context, a host, and a port which will add a handler to the context.
(new-handler ctx channel)
(new-handler ctx channel host port)
Create a new SSL handler from an SslContext
Create a new SSL handler from an SslContext
(s->cert factory input)
Generate an X509 from a given source.
Generate an X509 from a given source.
(s->pkey factory input)
When reading private keys, we unfortunately have to read PKCS8 encoded keys, short of pulling-in bouncy castle :-( Since these keys are usually DER encoded, they're unconvienent to have laying around in strings. We resort to base64 encoded DER here.
When reading private keys, we unfortunately have to read PKCS8 encoded keys, short of pulling-in bouncy castle :-( Since these keys are usually DER encoded, they're unconvienent to have laying around in strings. We resort to base64 encoded DER here.
(server-context {:keys [pkey password cert auth-mode ca-cert ciphers cache-size
session-timeout storage]})
Build an SSL client context for netty
Build an SSL client context for netty
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close