chia-blockchain/chia/server/ssl_context.py
dustinface 898543b874
server: Enable and fix mypy for all chia.server files (#13990)
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2022-11-28 18:00:45 -06:00

33 lines
867 B
Python

from __future__ import annotations
from pathlib import Path
from typing import Any, Dict, Tuple
def public_ssl_paths(path: Path, config: Dict[str, Any]) -> Tuple[Path, Path]:
return (
path / config["ssl"]["public_crt"],
path / config["ssl"]["public_key"],
)
def private_ssl_paths(path: Path, config: Dict[str, Any]) -> Tuple[Path, Path]:
return (
path / config["ssl"]["private_crt"],
path / config["ssl"]["private_key"],
)
def private_ssl_ca_paths(path: Path, config: Dict[str, Any]) -> Tuple[Path, Path]:
return (
path / config["private_ssl_ca"]["crt"],
path / config["private_ssl_ca"]["key"],
)
def chia_ssl_ca_paths(path: Path, config: Dict[str, Any]) -> Tuple[Path, Path]:
return (
path / config["chia_ssl_ca"]["crt"],
path / config["chia_ssl_ca"]["key"],
)