Commit 6c5c6d88 authored by Zot's avatar Zot Committed by Mario

Pleroma uses PKCS#1 (RSA) keys. Convert to PKCS#8 if we encounter one on the...

Pleroma uses PKCS#1 (RSA) keys. Convert to PKCS#8 if we encounter one on the inbound side. Not a lot we can do about sending them since it will likely break federation with other software.
parent 3266af3d
......@@ -888,6 +888,9 @@ function as_actor_store($url,$person_obj) {
if(array_key_exists('publicKey',$person_obj) && array_key_exists('publicKeyPem',$person_obj['publicKey'])) {
if($person_obj['id'] === $person_obj['publicKey']['owner']) {
$pubkey = $person_obj['publicKey']['publicKeyPem'];
if(strstr($pubkey,'RSA ')) {
$pubkey = rsatopem($pubkey);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment