This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Crypto.PublicKey import RSA # nosec B413 | |
from Crypto.Hash import SHA256 # nosec B413 | |
# Read FIEL.cer | |
def read_fiel_cer(directory_file): | |
try: | |
public_key = None | |
with open(directory_file + '.cer', 'rb') as f: | |
public_key = RSA.import_key(f.read()) | |
except Exception as e: |