mirror of https://gitlab.com/bashrc2/epicyon
Base64 encode pgp public key within vcard
parent
28111275f1
commit
c77b64baf9
4
pgp.py
4
pgp.py
|
@ -8,6 +8,7 @@ __status__ = "Production"
|
|||
__module_group__ = "Profile Metadata"
|
||||
|
||||
import os
|
||||
import base64
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
from person import get_actor_json
|
||||
|
@ -645,7 +646,8 @@ def actor_to_vcard(actor: {}) -> str:
|
|||
vcard_str += 'PHOTO:' + actor['icon']['url'] + '\n'
|
||||
pgp_key = get_pgp_pub_key(actor)
|
||||
if pgp_key:
|
||||
vcard_str += 'KEY;TYPE=PGP:' + pgp_key + '\n'
|
||||
vcard_str += 'KEY:data:application/pgp-keys;base64,' + \
|
||||
base64.b64encode(pgp_key).decode('utf-8') + '\n'
|
||||
email_address = get_email_address(actor)
|
||||
if email_address:
|
||||
vcard_str += 'EMAIL;TYPE=internet:' + email_address + '\n'
|
||||
|
|
Loading…
Reference in New Issue