Detect public key

main
Bob Mottram 2019-12-17 20:58:50 +00:00
parent 5cbe610e5b
commit cbe7059a20
1 changed files with 2 additions and 2 deletions

4
pgp.py
View File

@ -47,7 +47,7 @@ def getPGPpubKey(actorJson: {}) -> str:
continue
if propertyValue['type']!='PropertyValue':
continue
if '-BEGIN PUBLIC KEY-' not in propertyValue['value']:
if '--BEGIN PGP PUBLIC KEY' not in propertyValue['value']:
continue
return propertyValue['value']
return ''
@ -90,7 +90,7 @@ def setPGPpubKey(actorJson: {},PGPpubKey: str) -> None:
if not actorJson.get('attachment'):
actorJson['attachment']=[]
if '-BEGIN PUBLIC KEY-' not in PGPpubKey:
if '--BEGIN PGP PUBLIC KEY' not in PGPpubKey:
return
for propertyValue in actorJson['attachment']: