MCPcopy Create free account
hub / github.com/secdev/scapy / verify

Method verify

scapy/layers/tls/cert.py:509–515  ·  view source on GitHub ↗
(self, msg, sig, h="sha256", **kwargs)

Source from the content-addressed store, hash-verified

507
508 @crypto_validator
509 def verify(self, msg, sig, h="sha256", **kwargs):
510 # 'sig' should be a DER-encoded signature, as per RFC 3279
511 try:
512 self.pubkey.verify(sig, msg, ec.ECDSA(_get_hash(h)))
513 return True
514 except InvalidSignature:
515 return False
516
517
518class PubKeyEdDSA(PubKey):

Callers

nothing calls this directly

Calls 2

_get_hashFunction · 0.90
verifyMethod · 0.45

Tested by

no test coverage detected