Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be532ab6 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Brint E. Kriebel
Browse files

tools: getb64key - print the base64 version of a PEM public key file

Change-Id: Ia94ff560c88dfe85c3fa55db5c8219aa0d3419ee
parent c1b0bb68
Loading
Loading
Loading
Loading

tools/getb64key.py

0 → 100755
+17 −0
Original line number Diff line number Diff line
#!/usr/bin/python

import base64
import sys
import os

pkFile = open(sys.argv[1], 'rb').readlines()
base64Key = ""
inCert = False
for line in pkFile:
    if line.startswith("-"):
        inCert = not inCert
        continue

    base64Key += line.strip()

print base64.b16encode(base64.b64decode(base64Key)).lower()