aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/process_certificates.py
diff options
context:
space:
mode:
authorPetr Svenda2020-01-23 10:52:43 +0100
committerPetr Svenda2020-01-23 10:52:43 +0100
commit119e767adce39e7ea3cac8e4cb97e26f9ea864a5 (patch)
tree592345761984b4fb1550f207e36a724f76412c15 /src/process_certificates.py
parentb7e52160e7706b9ab02871b2caaf7ffe984c3e66 (diff)
downloadsec-certs-119e767adce39e7ea3cac8e4cb97e26f9ea864a5.tar.gz
sec-certs-119e767adce39e7ea3cac8e4cb97e26f9ea864a5.tar.zst
sec-certs-119e767adce39e7ea3cac8e4cb97e26f9ea864a5.zip
added extraction of pdf metadata
Diffstat (limited to 'src/process_certificates.py')
-rw-r--r--src/process_certificates.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/process_certificates.py b/src/process_certificates.py
index 58a6cee0..b074fa51 100644
--- a/src/process_certificates.py
+++ b/src/process_certificates.py
@@ -67,12 +67,14 @@ def main():
#all_pp_front = extract_protectionprofiles_frontpage(pp_dir)
#return
+ all_pdf_meta = extract_certificates_pdfmeta(walk_dir, 'certificate')
if do_extraction:
all_csv = extract_certificates_csv(cc_html_files_dir)
all_html = extract_certificates_html(cc_html_files_dir)
all_front = extract_certificates_frontpage(walk_dir)
all_keywords = extract_certificates_keywords(walk_dir, fragments_dir, 'certificate')
+ all_pdf_meta = extract_certificates_pdfmeta(walk_dir, 'certificate')
if do_extraction_pp:
all_pp_csv = extract_protectionprofiles_csv(cc_html_files_dir)
@@ -139,6 +141,8 @@ def main():
# TODO
+ # extract pdf file metadata (pdf header, file size...), PyPDF2 https://www.blog.pythonlibrary.org/2018/04/10/extracting-pdf-metadata-and-text-with-python/, https://github.com/pdfminer/pdfminer.six
+ # https://pythonhosted.org/PyPDF2/PdfFileReader.html
# add extraction of frontpage for protection profiles
# If None == protection profile => Match PP with its assurance level and recompute
# analyze_sept2019_cleaning(all_cert_items)