def validate_signing_algorithm(signing_algorithm):
    """
    Certificate SigningAlgorithm validation rule.
    Property: Certificate.SigningAlgorithm
    Property: CertificateAuthority.SigningAlgorithm
    """

    VALID_SIGNIN_ALGORITHM = [
        "SHA256WITHECDSA",
        "SHA256WITHRSA",
        "SHA384WITHECDSA",
        "SHA384WITHRSA",
        "SHA512WITHECDSA",
        "SHA512WITHRSA",
    ]

    if signing_algorithm not in VALID_SIGNIN_ALGORITHM:
        raise ValueError(
            "Certificate SigningAlgorithm must be one of: %s"
            % ", ".join(VALID_SIGNIN_ALGORITHM)
        )
    return signing_algorithm