• Bug#1067798: marked as done (python-pykmip: FTBFS: failing tests) (3/4)

    From Debian Bug Tracking System@21:1/5 to All on Thu Mar 28 11:30:01 2024
    [continued from previous message]

    serialization.PublicFormat.PKCS1
    )

    result = engine.verify_signature(
    signing_key=public_bytes,
    message=signature_parameters.get('message'),
    signature=signature_parameters.get('signature'),
    padding_method=signature_parameters.get('padding_method'),
    signing_algorithm=signature_parameters.get('signing_algorithm'),
    hashing_algorithm=signature_parameters.get('hashing_algorithm'),
    digital_signature_algorithm=signature_parameters.get(
    'digital_signature_algorithm'
    )
    )

    kmip/tests/unit/services/server/crypto/test_engine.py:2938:
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    self = <kmip.services.server.crypto.engine.CryptographyEngine object at 0x7fe2fc37e0f0>
    signing_key = b'0\x81\x89\x02\x81\x81\x00\xa5nJ\x0ep\x10\x17X\x9aQ\x87\xdc~\xa8A\xd1V\xf2\xec\x0e6\xadR\xa4M\xfe\xb1\xe6\x1fz\xd9\x9...f1\x05\xac\xc2\xd3\xf0\xcb5\xf2\x92\x80\xe18kod\xc4\xef"\xe1\xe1\xf2\r\x0c\xe8\xcf\xfb"I\xbd\x9a!7\x02\x03\x01\x00\x01'
    message = b'\xcd\xc8}\xa2#\xd7\x86\xdf;E\xe0\xbb\xbcr\x13&\xd1\xee*\xf8\x06\xcc1Tu\xcco\r\x9cf\xe1\xb6#q\xd4\\\xe29.\x1a\xc9(D\x...\xca\xb2tO\xd9\xea\x8f\xd2#\xc4%7\x02\x98(\xbd\x16\xbe\x02To\x13\x0f\xd2\xe3;\x93m&v\xe0\x8a\xed\x1bs1\x8bu\n\x01g\xd0'
    signature = b'k\xc3\xa0fV\x84)0\xa2G\xe3\rXd\xb4\xd8\x19#k\xa7\xc6\x89e\x86*\xd7\xdb\xc4\xe2J\xf2\x8e\x86\xbbS\x1f\x035\x8b\xe5\xf...d\x13\xe4r\xd1I\x05G\xc6Y\xc7a\x7f=$\x08}\xdbo+r\tag\xfc\t|\xab\x18\xe9\xa4X\xfc\xb64\xcd\xce\x8e\xe3X\x94\xc4\x84\xd7'
    padding_method = <PaddingMethod.PKCS1v15: 8>
    signing_algorithm = <CryptographicAlgorithm.RSA: 4>
    hashing_algorithm = <HashingAlgorithm.SHA_1: 4>
    digital_signature_algorithm = None

    def verify_signature(self,
    signing_key,
    message,
    signature,
    padding_method,
    signing_algorithm=None,
    hashing_algorithm=None,
    digital_signature_algorithm=None):
    """
    Verify a message signature.

    Args:
    signing_key (bytes): The bytes of the signing key to use for
    signature verification. Required.
    message (bytes): The bytes of the message that corresponds with
    the signature. Required.
    signature (bytes): The bytes of the signature to be verified.
    Required.
    padding_method (PaddingMethod): An enumeration specifying the
    padding method to use during signature verification. Required.
    signing_algorithm (CryptographicAlgorithm): An enumeration
    specifying the cryptographic algorithm to use for signature
    verification. Only RSA is supported. Optional, must match the
    algorithm specified by the digital signature algorithm if both
    are provided. Defaults to None.
    hashing_algorithm (HashingAlgorithm): An enumeration specifying
    the hashing algorithm to use with the cryptographic algortihm,
    if needed. Optional, must match the algorithm specified by the
    digital signature algorithm if both are provided. Defaults to
    None.
    digital_signature_algorithm (DigitalSignatureAlgorithm): An
    enumeration specifying both the cryptographic and hashing
    algorithms to use for signature verification. Optional, must
    match the cryptographic and hashing algorithms if both are
    provided. Defaults to None.

    Returns:
    boolean: the result of signature verification, True for valid
    signatures, False for invalid signatures

    Raises:
    InvalidField: Raised when various settings or values are invalid.
    CryptographicFailure: Raised when the signing key bytes cannot be
    loaded, or when the signature verification process fails
    unexpectedly.
    """
    backend = default_backend()

    hash_algorithm = None
    dsa_hash_algorithm = None
    dsa_signing_algorithm = None

    if hashing_algorithm:
    hash_algorithm = self._encryption_hash_algorithms.get(
    hashing_algorithm
    )
    if digital_signature_algorithm:
    algorithm_pair = self._digital_signature_algorithms.get(
    digital_signature_algorithm
    )
    if algorithm_pair:
    dsa_hash_algorithm = algorithm_pair[0]
    dsa_signing_algorithm = algorithm_pair[1]

    if dsa_hash_algorithm and dsa_signing_algorithm:
    if hash_algorithm and (hash_algorithm != dsa_hash_algorithm):
    raise exceptions.InvalidField(
    "The hashing algorithm does not match the digital "
    "signature algorithm."
    )
    if (signing_algorithm and
    (signing_algorithm != dsa_signing_algorithm)):
    raise exceptions.InvalidField(
    "The signing algorithm does not match the digital "
    "signature algorithm."
    )

    signing_algorithm = dsa_signing_algorithm
    hash_algorithm = dsa_hash_algorithm

    if signing_algorithm == enums.CryptographicAlgorithm.RSA:
    if padding_method == enums.PaddingMethod.PSS:
    if hash_algorithm:
    padding = asymmetric_padding.PSS(
    mgf=asymmetric_padding.MGF1(hash_algorithm()),
    salt_length=asymmetric_padding.PSS.MAX_LENGTH
    )
    else:
    raise exceptions.InvalidField(
    "A hashing algorithm must be specified for PSS "
    "padding."
    )
    elif padding_method == enums.PaddingMethod.PKCS1v15:
    padding = asymmetric_padding.PKCS1v15()
    else:
    raise exceptions.InvalidField(
    "The padding method '{0}' is not supported for signature "
    "verification.".format(padding_method)
    )

    try:
    public_key = backend.load_der_public_key(signing_key)
    except Exception:
    try:
    public_key = backend.load_pem_public_key(signing_key)
    except Exception:
    raise exceptions.CryptographicFailure(
    "The signing key bytes could not be loaded."
    )
    E kmip.core.exceptions.CryptographicFailure: The signing key bytes could not be loaded.

    kmip/services/server/crypto/engine.py:1497: CryptographicFailure _________________ test_verify_signature[signature_parameters1] _________________

    self = <kmip.services.server.crypto.engine.CryptographyEngine object at 0x7fe2fc37f1a0>
    signing_key = b'-----BEGIN RSA PUBLIC KEY-----\nMIGJAoGBAKwT2f2ue3M1tpzZhWfpZH2Zvzc6ngXONDXWZGXzKLf3M0t5Ku5++gRO\nvEx6MLIaXXqJzbOjDf...9T+00pRBvxt+1svdSkf5JSJp\n4WRvbBruBRTpP2y533HQbAYKIQS0e3JgrDfBBoYdx4ylol+qnLLjAgMBAAE=\n-----END RSA PUBLIC KEY-----\n'
    message = b"\xe1\xc0\xf9\x8dS\xf8\xf8\xb1A\x90W\xd5\xb9\xb1\x0b\x07\xfe\xea\xec2\xc0F:Mh8/S\x1b\xa1\xd6\xcf\xe4\xed8\xa2iJ4\xb9\...3\xca\xe1?\xc5\xc6e\x08\xcf\xb7#x\xfd\xd6\xc8\xde$\x97e\x10<\xe8\xfe|\xd3:\xd0\xef\x16\x86\xfe\xb2^j5\xfbd\xe0\x96\xa4"
    signature = b'\x01\xf6\xe5\xff\x04"\x1a\xdcl/"\xa7a\x05;\xc4s\'e\xdd\xdc?vV\xd0\xd1"\xad;\x8aNO\x8f\xe5[\xd0\xc0\x9e\xb1\x07\x80\x...\xea\xa2\x8au\x8c\xa94\xf2\xff\x16\x98\x8f\xe8_\xf8AW\xd9QD\x8a\x85\xec\x1e\xd1q\xf9\xef\x8b\xb8\xa1\x0c\xfa\x14{~\xf8'
    padding_method = <PaddingMethod.PSS: 10>
    signing_algorithm = <CryptographicAlgorithm.RSA: 4>, hashing_algorithm = None digital_signature_algorithm = <DigitalSignatureAlgorithm.SHA1_WITH_RSA_ENCRYPTION: 3>

    def verify_signature(self,
    signing_key,
    message,
    signature,
    padding_method,
    signing_algorithm=None,
    hashing_algorithm=None,
    digital_signature_algorithm=None):
    """
    Verify a message signature.

    Args:
    signing_key (bytes): The bytes of the signing key to use for
    signature verification. Required.
    message (bytes): The bytes of the message that corresponds with
    the signature. Required.
    signature (bytes): The bytes of the signature to be verified.
    Required.
    padding_method (PaddingMethod): An enumeration specifying the
    padding method to use during signature verification. Required.
    signing_algorithm (CryptographicAlgorithm): An enumeration
    specifying the cryptographic algorithm to use for signature
    verification. Only RSA is supported. Optional, must match the
    algorithm specified by the digital signature algorithm if both
    are provided. Defaults to None.
    hashing_algorithm (HashingAlgorithm): An enumeration specifying
    the hashing algorithm to use with the cryptographic algortihm,
    if needed. Optional, must match the algorithm specified by the
    digital signature algorithm if both are provided. Defaults to
    None.
    digital_signature_algorithm (DigitalSignatureAlgorithm): An
    enumeration specifying both the cryptographic and hashing
    algorithms to use for signature verification. Optional, must
    match the cryptographic and hashing algorithms if both are
    provided. Defaults to None.

    Returns:
    boolean: the result of signature verification, True for valid
    signatures, False for invalid signatures

    Raises:
    InvalidField: Raised when various settings or values are invalid.
    CryptographicFailure: Raised when the signing key bytes cannot be
    loaded, or when the signature verification process fails
    unexpectedly.
    """
    backend = default_backend()

    hash_algorithm = None
    dsa_hash_algorithm = None
    dsa_signing_algorithm = None

    if hashing_algorithm:
    hash_algorithm = self._encryption_hash_algorithms.get(
    hashing_algorithm
    )
    if digital_signature_algorithm:
    algorithm_pair = self._digital_signature_algorithms.get(
    digital_signature_algorithm
    )
    if algorithm_pair:
    dsa_hash_algorithm = algorithm_pair[0]
    dsa_signing_algorithm = algorithm_pair[1]

    if dsa_hash_algorithm and dsa_signing_algorithm:
    if hash_algorithm and (hash_algorithm != dsa_hash_algorithm):
    raise exceptions.InvalidField(
    "The hashing algorithm does not match the digital "
    "signature algorithm."
    )
    if (signing_algorithm and
    (signing_algorithm != dsa_signing_algorithm)):
    raise exceptions.InvalidField(
    "The signing algorithm does not match the digital "
    "signature algorithm."
    )

    signing_algorithm = dsa_signing_algorithm
    hash_algorithm = dsa_hash_algorithm

    if signing_algorithm == enums.CryptographicAlgorithm.RSA:
    if padding_method == enums.PaddingMethod.PSS:
    if hash_algorithm:
    padding = asymmetric_padding.PSS(
    mgf=asymmetric_padding.MGF1(hash_algorithm()),
    salt_length=asymmetric_padding.PSS.MAX_LENGTH
    )
    else:
    raise exceptions.InvalidField(
    "A hashing algorithm must be specified for PSS "
    "padding."
    )
    elif padding_method == enums.PaddingMethod.PKCS1v15:
    padding = asymmetric_padding.PKCS1v15()
    else:
    raise exceptions.InvalidField(
    "The padding method '{0}' is not supported for signature "
    "verification.".format(padding_method)
    )

    try:
    public_key = backend.load_der_public_key(signing_key)
    E AttributeError: 'Backend' object has no attribute 'load_der_public_key'

    kmip/services/server/crypto/engine.py:1492: AttributeError

    During handling of the above exception, another exception occurred:

    self = <kmip.services.server.crypto.engine.CryptographyEngine object at 0x7fe2fc37f1a0>
    signing_key = b'-----BEGIN RSA PUBLIC KEY-----\nMIGJAoGBAKwT2f2ue3M1tpzZhWfpZH2Zvzc6ngXONDXWZGXzKLf3M0t5Ku5++gRO\nvEx6MLIaXXqJzbOjDf...9T+00pRBvxt+1svdSkf5JSJp\n4WRvbBruBRTpP2y533HQbAYKIQS0e3JgrDfBBoYdx4ylol+qnLLjAgMBAAE=\n-----END RSA PUBLIC KEY-----\n'
    message = b"\xe1\xc0\xf9\x8dS\xf8\xf8\xb1A\x90W\xd5\xb9\xb1\x0b\x07\xfe\xea\xec2\xc0F:Mh8/S\x1b\xa1\xd6\xcf\xe4\xed8\xa2iJ4\xb9\...3\xca\xe1?\xc5\xc6e\x08\xcf\xb7#x\xfd\xd6\xc8\xde$\x97e\x10<\xe8\xfe|\xd3:\xd0\xef\x16\x86\xfe\xb2^j5\xfbd\xe0\x96\xa4"
    signature = b'\x01\xf6\xe5\xff\x04"\x1a\xdcl/"\xa7a\x05;\xc4s\'e\xdd\xdc?vV\xd0\xd1"\xad;\x8aNO\x8f\xe5[\xd0\xc0\x9e\xb1\x07\x80\x...\xea\xa2\x8au\x8c\xa94\xf2\xff\x16\x98\x8f\xe8_\xf8AW\xd9QD\x8a\x85\xec\x1e\xd1q\xf9\xef\x8b\xb8\xa1\x0c\xfa\x14{~\xf8'
    padding_method = <PaddingMethod.PSS: 10>
    signing_algorithm = <CryptographicAlgorithm.RSA: 4>, hashing_algorithm = None digital_signature_algorithm = <DigitalSignatureAlgorithm.SHA1_WITH_RSA_ENCRYPTION: 3>

    def verify_signature(self,
    signing_key,
    message,
    signature,
    padding_method,
    signing_algorithm=None,
    hashing_algorithm=None,
    digital_signature_algorithm=None):
    """
    Verify a message signature.

    Args:
    signing_key (bytes): The bytes of the signing key to use for
    signature verification. Required.
    message (bytes): The bytes of the message that corresponds with
    the signature. Required.
    signature (bytes): The bytes of the signature to be verified.
    Required.
    padding_method (PaddingMethod): An enumeration specifying the
    padding method to use during signature verification. Required.
    signing_algorithm (CryptographicAlgorithm): An enumeration
    specifying the cryptographic algorithm to use for signature
    verification. Only RSA is supported. Optional, must match the
    algorithm specified by the digital signature algorithm if both
    are provided. Defaults to None.
    hashing_algorithm (HashingAlgorithm): An enumeration specifying
    the hashing algorithm to use with the cryptographic algortihm,
    if needed. Optional, must match the algorithm specified by the
    digital signature algorithm if both are provided. Defaults to
    None.
    digital_signature_algorithm (DigitalSignatureAlgorithm): An
    enumeration specifying both the cryptographic and hashing
    algorithms to use for signature verification. Optional, must
    match the cryptographic and hashing algorithms if both are
    provided. Defaults to None.

    Returns:
    boolean: the result of signature verification, True for valid
    signatures, False for invalid signatures

    Raises:
    InvalidField: Raised when various settings or values are invalid.
    CryptographicFailure: Raised when the signing key bytes cannot be
    loaded, or when the signature verification process fails
    unexpectedly.
    """
    backend = default_backend()

    hash_algorithm = None
    dsa_hash_algorithm = None
    dsa_signing_algorithm = None

    if hashing_algorithm:
    hash_algorithm = self._encryption_hash_algorithms.get(
    hashing_algorithm
    )
    if digital_signature_algorithm:
    algorithm_pair = self._digital_signature_algorithms.get(
    digital_signature_algorithm
    )
    if algorithm_pair:
    dsa_hash_algorithm = algorithm_pair[0]
    dsa_signing_algorithm = algorithm_pair[1]

    if dsa_hash_algorithm and dsa_signing_algorithm:
    if hash_algorithm and (hash_algorithm != dsa_hash_algorithm):
    raise exceptions.InvalidField(
    "The hashing algorithm does not match the digital "
    "signature algorithm."
    )
    if (signing_algorithm and
    (signing_algorithm != dsa_signing_algorithm)):
    raise exceptions.InvalidField(
    "The signing algorithm does not match the digital "
    "signature algorithm."
    )

    signing_algorithm = dsa_signing_algorithm
    hash_algorithm = dsa_hash_algorithm

    if signing_algorithm == enums.CryptographicAlgorithm.RSA:
    if padding_method == enums.PaddingMethod.PSS:
    if hash_algorithm:
    padding = asymmetric_padding.PSS(
    mgf=asymmetric_padding.MGF1(hash_algorithm()),
    salt_length=asymmetric_padding.PSS.MAX_LENGTH
    )
    else:
    raise exceptions.InvalidField(
    "A hashing algorithm must be specified for PSS "
    "padding."
    )
    elif padding_method == enums.PaddingMethod.PKCS1v15:
    padding = asymmetric_padding.PKCS1v15()
    else:
    raise exceptions.InvalidField(
    "The padding method '{0}' is not supported for signature "
    "verification.".format(padding_method)
    )

    try:
    public_key = backend.load_der_public_key(signing_key)
    except Exception:
    try:
    public_key = backend.load_pem_public_key(signing_key)
    E AttributeError: 'Backend' object has no attribute 'load_pem_public_key'

    kmip/services/server/crypto/engine.py:1495: AttributeError

    During handling of the above exception, another exception occurred:

    signature_parameters = {'digital_signature_algorithm': <DigitalSignatureAlgorithm.SHA1_WITH_RSA_ENCRYPTION: 3>, 'encoding': <Encoding.PEM: 'P...xe1?\xc5\xc6e\x08\xcf\xb7#x\xfd\xd6\xc8\xde$\x97e\x10<\xe8\xfe|\xd3:\xd0\xef\x16\x86\xfe\xb2^j5\xfbd\xe0\x96\
    xa4", ...}

    def test_verify_signature(signature_parameters):
    """
    Test that various signature verification methods and settings can be used
    to correctly verify signatures.
    """
    engine = crypto.CryptographyEngine()

    backend = backends.default_backend()
    public_key_numbers = rsa.RSAPublicNumbers(
    signature_parameters.get('public_key').get('e'),
    signature_parameters.get('public_key').get('n')
    )
    public_key = public_key_numbers.public_key(backend)
    public_bytes = public_key.public_bytes(
    signature_parameters.get('encoding'),
    serialization.PublicFormat.PKCS1
    )

    result = engine.verify_signature(
    signing_key=public_bytes,
    message=signature_parameters.get('message'),
    signature=signature_parameters.get('signature'),
    padding_method=signature_parameters.get('padding_method'),
    signing_algorithm=signature_parameters.get('signing_algorithm'),
    hashing_algorithm=signature_parameters.get('hashing_algorithm'),
    digital_signature_algorithm=signature_parameters.get(
    'digital_signature_algorithm'
    )
    )

    kmip/tests/unit/services/server/crypto/test_engine.py:2938:
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    self = <kmip.services.server.crypto.engine.CryptographyEngine object at 0x7fe2fc37f1a0>
    signing_key = b'-----BEGIN RSA PUBLIC KEY-----\nMIGJAoGBAKwT2f2ue3M1tpzZhWfpZH2Zvzc6ngXONDXWZGXzKLf3M0t5Ku5++gRO\nvEx6MLIaXXqJzbOjDf...9T+00pRBvxt+1svdSkf5JSJp\n4WRvbBruBRTpP2y533HQbAYKIQS0e3JgrDfBBoYdx4ylol+qnLLjAgMBAAE=\n-----END RSA PUBLIC KEY-----\n'
    message = b"\xe1\xc0\xf9\x8dS\xf8\xf8\xb1A\x90W\xd5\xb9\xb1\x0b\x07\xfe\xea\xec2\xc0F:Mh8/S\x1b\xa1\xd6\xcf\xe4\xed8\xa2iJ4\xb9\...3\xca\xe1?\xc5\xc6e\x08\xcf\xb7#x\xfd\xd6\xc8\xde$\x97e\x10<\xe8\xfe|\xd3:\xd0\xef\x16\x86\xfe\xb2^j5\xfbd\xe0\x96\xa4"
    signature = b'\x01\xf6\xe5\xff\x04"\x1a\xdcl/"\xa7a\x05;\xc4s\'e\xdd\xdc?vV\xd0\xd1"\xad;\x8aNO\x8f\xe5[\xd0\xc0\x9e\xb1\x07\x80\x...\xea\xa2\x8au\x8c\xa94\xf2\xff\x16\x98\x8f\xe8_\xf8AW\xd9QD\x8a\x85\xec\x1e\xd1q\xf9\xef\x8b\xb8\xa1\x0c\xfa\x14{~\xf8'
    padding_method = <PaddingMethod.PSS: 10>
    signing_algorithm = <CryptographicAlgorithm.RSA: 4>, hashing_algorithm = None digital_signature_algorithm = <DigitalSignatureAlgorithm.SHA1_WITH_RSA_ENCRYPTION: 3>

    def verify_signature(self,
    signing_key,
    message,
    signature,
    padding_method,
    signing_algorithm=None,
    hashing_algorithm=None,
    digital_signature_algorithm=None):
    """
    Verify a message signature.

    Args:
    signing_key (bytes): The bytes of the signing key to use for
    signature verification. Required.
    message (bytes): The bytes of the message that corresponds with
    the signature. Required.
    signature (bytes): The bytes of the signature to be verified.
    Required.
    padding_method (PaddingMethod): An enumeration specifying the
    padding method to use during signature verification. Required.
    signing_algorithm (CryptographicAlgorithm): An enumeration
    specifying the cryptographic algorithm to use for signature
    verification. Only RSA is supported. Optional, must match the
    algorithm specified by the digital signature algorithm if both
    are provided. Defaults to None.
    hashing_algorithm (HashingAlgorithm): An enumeration specifying
    the hashing algorithm to use with the cryptographic algortihm,
    if needed. Optional, must match the algorithm specified by the
    digital signature algorithm if both are provided. Defaults to
    None.
    digital_signature_algorithm (DigitalSignatureAlgorithm): An
    enumeration specifying both the cryptographic and hashing
    algorithms to use for signature verification. Optional, must
    match the cryptographic and hashing algorithms if both are
    provided. Defaults to None.

    Returns:
    boolean: the result of signature verification, True for valid
    signatures, False for invalid signatures

    Raises:
    InvalidField: Raised when various settings or values are invalid.
    CryptographicFailure: Raised when the signing key bytes cannot be
    loaded, or when the signature verification process fails
    unexpectedly.
    """
    backend = default_backend()

    hash_algorithm = None
    dsa_hash_algorithm = None
    dsa_signing_algorithm = None

    if hashing_algorithm:
    hash_algorithm = self._encryption_hash_algorithms.get(
    hashing_algorithm
    )
    if digital_signature_algorithm:
    algorithm_pair = self._digital_signature_algorithms.get(
    digital_signature_algorithm
    )
    if algorithm_pair:
    dsa_hash_algorithm = algorithm_pair[0]
    dsa_signing_algorithm = algorithm_pair[1]

    if dsa_hash_algorithm and dsa_signing_algorithm:
    if hash_algorithm and (hash_algorithm != dsa_hash_algorithm):
    raise exceptions.InvalidField(
    "The hashing algorithm does not match the digital "
    "signature algorithm."
    )
    if (signing_algorithm and
    (signing_algorithm != dsa_signing_algorithm)):
    raise exceptions.InvalidField(
    "The signing algorithm does not match the digital "
    "signature algorithm."
    )

    signing_algorithm = dsa_signing_algorithm
    hash_algorithm = dsa_hash_algorithm

    if signing_algorithm == enums.CryptographicAlgorithm.RSA:
    if padding_method == enums.PaddingMethod.PSS:
    if hash_algorithm:
    padding = asymmetric_padding.PSS(
    mgf=asymmetric_padding.MGF1(hash_algorithm()),
    salt_length=asymmetric_padding.PSS.MAX_LENGTH
    )
    else:
    raise exceptions.InvalidField(
    "A hashing algorithm must be specified for PSS "
    "padding."
    )
    elif padding_method == enums.PaddingMethod.PKCS1v15:
    padding = asymmetric_padding.PKCS1v15()
    else:
    raise exceptions.InvalidField(
    "The padding method '{0}' is not supported for signature "
    "verification.".format(padding_method)
    )

    try:
    public_key = backend.load_der_public_key(signing_key)
    except Exception:
    try:
    public_key = backend.load_pem_public_key(signing_key)
    except Exception:
    raise exceptions.CryptographicFailure(
    "The signing key bytes could not be loaded."
    )
    E kmip.core.exceptions.CryptographicFailure: The signing key bytes could not be loaded.

    kmip/services/server/crypto/engine.py:1497: CryptographicFailure _____________________ TestKmipEngine.test_signature_verify _____________________
    'NoneType' object is not iterable

    During handling of the above exception, another exception occurred:
    NOTE: Incompatible Exception Representation, displaying natively:

    testtools.testresult.real._StringException: Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/kmip/services/server/crypto/engine.py", line 1492, in verify_signature
    public_key = backend.load_der_public_key(signing_key)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    AttributeError: 'Backend' object has no attribute 'load_der_public_key'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/kmip/services/server/crypto/engine.py", line 1495, in verify_signature
    public_key = backend.load_pem_public_key(signing_key)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    AttributeError: 'Backend' object has no attribute 'load_pem_public_key'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/kmip/tests/unit/services/server/test_engine.py", line 10944, in test_signature_verify
    response_payload = e._process_signature_verify(payload)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/<<PKGBUILDDIR>>/kmip/services/server/engine.py", line 154, in wrapper
    return function(self, *args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/<<PKGBUILDDIR>>/kmip/services/server/engine.py", line 3077, in _process_signature_verify
    result = self._cryptography_engine.verify_signature(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/<<PKGBUILDDIR>>/kmip/services/server/crypto/engine.py", line 1497, in verify_signature
    raise exceptions.CryptographicFailure( kmip.core.exceptions.CryptographicFailure: The signing key bytes could not be loaded.

    =============================== warnings summary ===============================
    kmip/pie/sqltypes.py:24
    /<<PKGBUILDDIR>>/kmip/pie/sqltypes.py:24: MovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are
    pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
    Base = declarative_base()

    kmip/tests/unit/pie/objects/test_certificate.py:22
    /<<PKGBUILDDIR>>/kmip/tests/unit/pie/objects/test_certificate.py:22: SAWarning: Mapper mapped class DummyCertificate->certificates does not indicate a polymorphic_identity, yet is part of an inheritance hierarchy that has a polymorphic_on column of '
    managed_objects.class_type'. Objects of this type cannot be loaded polymorphically which can lead to degraded or incorrect loading behavior in some scenarios. Please establish a polmorphic_identity for this class, or leave it un-mapped. To omit
    mapping an intermediary class when using declarative, set the '__abstract__ = True' attribute on that class.
    class DummyCertificate(objects.Certificate):

    kmip/tests/unit/pie/objects/test_cryptographic_object.py:22
    /<<PKGBUILDDIR>>/kmip/tests/unit/pie/objects/test_cryptographic_object.py:22: SAWarning: Mapper mapped class DummyCryptographicObject->crypto_objects does not indicate a polymorphic_identity, yet is part of an inheritance hierarchy that has a
    polymorphic_on column of 'managed_objects.class_type'. Objects of this type cannot be loaded polymorphically which can lead to degraded or incorrect loading behavior in some scenarios. Please establish a polmorphic_identity for this class, or leave it
    un-mapped. To omit mapping an intermediary class when using declarative, set the '__abstract__ = True' attribute on that class.
    class DummyCryptographicObject(CryptographicObject):

    kmip/tests/unit/pie/objects/test_key.py:22
    /<<PKGBUILDDIR>>/kmip/tests/unit/pie/objects/test_key.py:22: SAWarning: Mapper mapped class DummyKey->keys does not indicate a polymorphic_identity, yet is part of an inheritance hierarchy that has a polymorphic_on column of 'managed_objects.class_
    type'. Objects of this type cannot be loaded polymorphically which can lead to degraded or incorrect loading behavior in some scenarios. Please establish a polmorphic_identity for this class, or leave it un-mapped. To omit mapping an intermediary
    class when using declarative, set the '__abstract__ = True' attribute on that class.
    class DummyKey(Key):


    [continued in next message]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)