add docstrings to print_ciphers() and display_peercert()

This commit is contained in:
berhsi 2019-09-13 10:29:38 +02:00
parent ee233e65e0
commit 028f7ae2de

View file

@ -13,7 +13,7 @@ import os
import logging
import json
from time import time, ctime, sleep
from sys import exit, byteorder
from sys import exit
def read_config(CONFIGFILE, CONFIG):
@ -80,6 +80,11 @@ def print_config(CONFIG):
def print_ciphers(cipherlist):
'''
This function prints the list of the allowed ciphers.
param1: dictionary
return: boolean
'''
print('Available ciphers')
for i in cipherlist:
print('\n')
@ -90,6 +95,11 @@ def print_ciphers(cipherlist):
def display_peercert(cert):
'''
This function displays the values of a given certificate.
param1: dictionary
return: boolean
'''
for i in cert.keys():
print('{}:'.format(i))
if i in ('subject', 'issuer'):
@ -206,7 +216,6 @@ def read_loglevel(CONFIG):
elif CONFIG['VERBOSITY'] == 'debug':
loglevel = logging.DEBUG
else: loglevel = False
print(loglevel)
return(loglevel)