mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 09:28:05 +00:00
Fix storing certs in DER format.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
9ef088971b
commit
cd6f898f8e
1 changed files with 2 additions and 2 deletions
|
|
@ -97,10 +97,10 @@ def get_pki_certs(certs_dir='certs', force=False):
|
|||
dvcap = os.path.join(certs_dir, certs['dvca']['CHR'])
|
||||
if (os.path.exists(cvcap) is False or force is True):
|
||||
with open(cvcap, 'wb') as f:
|
||||
f.write(certs['cvca']['cert'].encode())
|
||||
f.write(base64.urlsafe_b64decode(certs['cvca']['cert']))
|
||||
if (os.path.exists(dvcap) is False or force is True):
|
||||
with open(dvcap, 'wb') as f:
|
||||
f.write(certs['dvca']['cert'].encode())
|
||||
f.write(base64.urlsafe_b64decode(certs['dvca']['cert']))
|
||||
|
||||
def pki(card, args):
|
||||
if (args.subcommand == 'initialize'):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue