[erlang-questions] public_key:pem_decode/1 and public_key:verify/4

Seth Falcon <>
Fri Jan 21 00:03:04 CET 2011


2011/1/20 Joakim G. <>:
> I updated pubkey_pem.html a tiny little bit and it seems to
> work:
>
> :~/installs/otp_src_R14B01/lib/public_key/src$ diff -bwt
> pubkey_pem.erl.orig pubkey_pem.erl
> 157a158,159
>> join_entry([<<"-----END RSA PUBLIC KEY-----", _/binary>>| Lines],
> Entry) ->
>>     {lists:reverse(Entry), Lines};
> 212a215,216
>> pem_start('RSAPublicKey') ->
>>     <<"-----BEGIN RSA PUBLIC KEY-----">>;
> 221a226,227
>> pem_end(<<"-----BEGIN RSA PUBLIC KEY-----">>) ->
>>     <<"-----END RSA PUBLIC KEY-----">>;
> 232a239,240
>> asn1_type(<<"-----BEGIN RSA PUBLIC KEY-----">>) ->
>>     'RSAPublicKey';
>
> Thanks

Our mails crossed.  When you say "this seems to work", were you able
to actually use the public key for verification/decryption?


More information about the erlang-questions mailing list