[erlang-questions] reading RSA public key files (PEM)

Vlad Skvortsov vss@REDACTED
Tue Feb 24 21:29:56 CET 2009


Hi!

With Erlang R12B5 I can read RSA private keys but not public:

Eshell V5.6.5  (abort with ^G)
1> public_key:pem_to_der("test_rsa").
{ok,[{rsa_private_key,<<48,130,4,160,2,1,0,2,130,1,1,0,
                        161,19,65,96,102,199,220,63,184,
                        182,224,110,...>>,
                      not_encrypted}]}
2> public_key:pem_to_der("test_rsa.pub").
{ok,[]}


Googling around I couldn't find how do that. Any suggestions?

Thanks!

-- 
Vlad Skvortsov, vss@REDACTED, http://vss.73rus.com




More information about the erlang-questions mailing list