[erlang-questions] Dealing with public/private keys stored in*.pem files

Ingela Anderton Andin ingela@REDACTED
Fri Feb 1 09:14:43 CET 2008

erlang-questions-request@REDACTED wrote:
>> 2008/1/31, Jakob Cederlund <jakob@REDACTED>:
>> Hi,
>> there is not yet a public api for this in OTP. However, the undocumented,
>> unsupported function ssl_pkix:decode_rsa_keyfile/2 does just this. It reads
>> a .pem keyfile and returns a record with exponent and modulus, and other
>> fields. It is unsupported, so it might be moved (or even removed) in future
>> releases of OTP.
>> /Jakob

Well as Niclas pointed out  ssl_pkix:decode_rsa_keyfile/2 is a new 
function in ssl-3.9
that was released in r12b.  An as Jakob has pointed out it is not part 
of a public API (and will not
be in the future either, probably even the documented functions in 
ssl_pkix will become deprecated) , so even if you use
it to solve your immediate problem  I  would not recommend it as long 
term solution.
I can however offer you a long term solution and that is to use the new 
library application public_key that we are working on right now.
I can not make any promises on exactly when it will be released but it 
is coming in a near
future so look out for it.

Regards Ingela -OTP team

More information about the erlang-questions mailing list