(self, subj, sigbytes, hash_alg)
| 620 | return pkt |
| 621 | |
| 622 | def verify(self, subj, sigbytes, hash_alg): |
| 623 | # GnuPG requires a pre-hashing with EdDSA |
| 624 | # https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-06#section-14.8 |
| 625 | digest = hashes.Hash(hash_alg, backend=default_backend()) |
| 626 | digest.update(subj) |
| 627 | subj = digest.finalize() |
| 628 | try: |
| 629 | self.__pubkey__().verify(sigbytes, subj) |
| 630 | except InvalidSignature: |
| 631 | return False |
| 632 | return True |
| 633 | |
| 634 | def parse(self, packet): |
| 635 | oidlen = packet[0] |
nothing calls this directly
no test coverage detected