mix format

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-08-03 10:19:28 +02:00
parent e1e9b0fc11
commit 2eb2c23af3
6 changed files with 39 additions and 20 deletions

View File

@@ -324,10 +324,13 @@ defmodule Eventos.Service.ActivityPub.Utils do
def pem_to_public_key(pem) do
[key_code] = :public_key.pem_decode(pem)
key = :public_key.pem_entry_decode(key_code)
case key do
{:RSAPrivateKey, _, modulus, exponent, _, _, _, _, _, _, _} ->
{:RSAPublicKey, modulus, exponent}
{:RSAPublicKey, modulus, exponent} -> {:RSAPublicKey, modulus, exponent}
{:RSAPublicKey, modulus, exponent} ->
{:RSAPublicKey, modulus, exponent}
end
end