[erlang-questions] ssl:listen and certs from binary

Rostislav Romanin rostislav.romanin@REDACTED
Mon Jul 2 21:17:18 CEST 2012


In case somebody will look for same thing some day:

get_der(Pem)->
    {_,Der,_} = hd(public_key:pem_decode(Pem)),
    Der.

ssl:listen(Port [{key, {'RSAPrivateKey', get_der(KeyPem)}}, {cert,
get_der(CertPem)}, {cacerts, [get_der(CaPem)]}])



On Mon, Jul 2, 2012 at 6:39 PM, Rostislav Romanin <
rostislav.romanin@REDACTED> wrote:

> Hi,
>
> I have key,cert (pem format)as a binary. According to the documentation
> ssl:listen()
> accepts them as der_encoded().
>
> What is the path that should be traveled in order to get there ?
> (guess it starts with pem_decode and ends with der_encode but can't figure
> the
> exact process).
>
> Thanks,
> Rostislav
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120702/f86ba122/attachment.htm>


More information about the erlang-questions mailing list