Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{ok, {{_, 200, _}, _, Signature}} = httpc:request(get, {Url, [{"User-Agent", rebar_utils:user_agent()}]}, [], [{sync, true}], rebar),
{ok, Data} = file:read_file(TmpFile),
[RsaPublicKey] = public_key:pem_decode(?PUBLIC_KEY),
Key = public_key:pem_entry_decode(RsaPublicKey),
public_key:verify(Data, sha512, Signature, Key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment