from typing import Dict
from pathlib import Path


def _certificate_check(path) -> Dict[str, Path]:
    """
    Check if the right certificates are at the given path.
    """
    certi_path = {
        "ca": "ca.crt",
        "crt": "client.crt",
        "key": "client.key",
    }
    r_paths: Dict[str, Path] = {}
    for k, f in certi_path.items():
        r_paths[k] = path / f
        if not r_paths[k].exists():
            raise FileNotFoundError(f"'{f}' was not found in at: {path}")

    return r_paths