def verify_signature(certificate, signing_pub_key=None,
                     signing_pub_key_passphrase=None):
    '''
    Verify that ``certificate`` has been signed by ``signing_pub_key``

    certificate:
        The certificate to verify. Can be a path or string containing a
        PEM formatted certificate.

    signing_pub_key:
        The public key to verify, can be a string or path to a PEM formatted
        certificate, csr, or private key.

    signing_pub_key_passphrase:
        Passphrase to the signing_pub_key if it is an encrypted private key.

    CLI Example:

    .. code-block:: bash

        salt '*' x509.verify_signature /etc/pki/mycert.pem \\
                signing_pub_key=/etc/pki/myca.crt
    '''
    cert = _get_certificate_obj(certificate)

    if signing_pub_key:
        signing_pub_key = get_public_key(signing_pub_key,
                                         passphrase=signing_pub_key_passphrase, asObj=True)

    return bool(cert.verify(pkey=signing_pub_key) == 1)