Coverage for jbank/management/commands/parse_x509.py : 0%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1import logging
2from pprint import pprint
3from django.core.management.base import CommandParser
4from jbank.x509_helpers import get_x509_cert_from_file
5from jutil.command import SafeCommand
8logger = logging.getLogger(__name__)
11class Command(SafeCommand):
12 help = 'Parses x509 cert'
14 def add_arguments(self, parser: CommandParser):
15 parser.add_argument('pem', type=str)
17 def do(self, *args, **options):
18 cert = get_x509_cert_from_file(options['pem'])
19 pprint(cert)