[erlang-questions] public_key:pem_decode/1 and public_key:verify/4
Joakim G.
jocke@REDACTED
Fri Jan 21 12:47:11 CET 2011
With this patch public_key:pem_decode/1 returns a RSAPublicKey
record as defined in public_key.hrl (instead of just []).
I haven't used the output yet though. :-)
I will experiment with public_key:verify/4 over the weekend.
Cheers
/Jocke
On 2011-01-21 00:03, Seth Falcon wrote:
> 2011/1/20 Joakim G. <jocke@REDACTED>:
>> I updated pubkey_pem.html a tiny little bit and it seems to
>> work:
>>
>> jocke@REDACTED:~/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?
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
More information about the erlang-questions
mailing list