File: cert.py

package info (click to toggle)
python-azure 20250603%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 851,724 kB
  • sloc: python: 7,362,925; ansic: 804; javascript: 287; makefile: 195; sh: 145; xml: 109
file content (15 lines) | stat: -rw-r--r-- 453 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from typing import List


def create_combined_bundle(cert_files: List[str], output_location: str) -> None:
    """
    Combines a list of ascii-encoded PEM certificates into one bundle.
    """
    combined_cert_strings: List[str] = []

    for cert_path in cert_files:
        with open(cert_path, "r") as f:
            combined_cert_strings.extend(f.readlines())

    with open(output_location, "w") as f:
        f.writelines(combined_cert_strings)