[erlang-questions] Generate RSA private key (writing letsencrypt client)

Andreas Schultz aschultz@REDACTED
Wed Jan 20 14:34:26 CET 2016


Hi,

otp/lib/ssl/test/erl_make_certs.erl has the complete code in Erlang
to generate RSA, DSA and EC certificates including their private keys.

I'm not sure whether the generate primes and keys are safe for real
certificates. You should check that before (re)using the code.

Andreas

On 01/20/2016 01:59 PM, Serge Aleynikov wrote:
> I faced the same issue and had to resort to the RSA_generate_key call in C.
>
> On Wed, Jan 20, 2016 at 5:04 AM, Max Lapshin <max.lapshin@REDACTED <mailto:max.lapshin@REDACTED>> wrote:
>
>
>     Hi.  I cannot find a way to generate RSA private (and public) key from erlang.
>
>     I've looked through public_key sources and have found Yuri's cutkey:
>     https://github.com/yrashk/cutkey/blob/master/src/cutkey.erl
>
>     I haven't found any code in public_key sources that does something like cutkey does.
>
>     But I don't want to add extra dependency, maybe something has changed and it is
>     possible to generate RSAPrivateKey.
>
>     I'm writing client for letsencrypt and want fully automate all things without calling openssl via command line.
>
>     _______________________________________________
>     erlang-questions mailing list
>     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>     http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list