Support signature verification.
Bases: object
Look up the signature key type.
Parameters: | name – the name of the signature key type |
---|---|
Returns: | the SignatureKeyType object |
Raises: | SignatureVerificationError if signature key type is invalid |
Register a signature key type.
Parameters: |
|
---|
Create the verifier to use when the key type is DSA
Parameters: |
|
---|---|
Returns: | the verifier to use to verify the signature for DSA |
Create the verifier to use when the key type is ECC_*.
Parameters: |
|
---|---|
Returns: | the verifier to use to verify the signature for ECC_*. |
Create the verifier to use when the key type is RSA-PSS.
Parameters: |
|
---|---|
Raises: | SignatureVerificationError if the RSA-PSS specific properties are invalid |
Returns: | the verifier to use to verify the signature for RSA-PSS |
Create the certificate object from the retrieved certificate data.
Parameters: |
|
---|---|
Returns: | the certificate cryptography object |
Raises: | SignatureVerificationError if the retrieval fails or the format is invalid |
Verify the hash method name and create the hash method.
Parameters: | hash_method_name – the name of the hash method to retrieve |
---|---|
Returns: | the hash method, a cryptography object |
Raises: | SignatureVerificationError if the hash method name is invalid |
Create the public key object from a retrieved certificate.
Parameters: |
|
---|---|
Returns: | the public key cryptography object |
Raises: | SignatureVerificationError if public key format is invalid |
Decode the signature data and returns the signature.
Parameters: | siganture_data – the base64-encoded signature data |
---|---|
Returns: | the decoded signature |
Raises: | SignatureVerificationError if the signature data is malformatted |
Instantiate signature properties and use them to create a verifier.
Parameters: |
|
---|---|
Returns: | instance of cryptography.hazmat.primitives.asymmetric.AsymmetricVerificationContext |
Raises: | SignatureVerificationError if we fail to build the verifier |
Verify that the certificate has not expired.
Parameters: | certificate – the cryptography certificate object |
---|---|
Raises: | SignatureVerificationError if the certificate valid time range does not include now |