X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=sigcheck.h;h=20dcb13951257b6344a870e7e26feeec2fb7bb2a;hb=76f079e5ebdb34acaaa2462a8d915ee06d3c8425;hp=394dd65f56b0a44ebe4cefd7d71601dc7a5f7421;hpb=4c8bebffd4bc105ebaa09256b7a57f4a6201bd52;p=onak.git diff --git a/sigcheck.h b/sigcheck.h index 394dd65..20dcb13 100644 --- a/sigcheck.h +++ b/sigcheck.h @@ -2,8 +2,23 @@ #define __SIGCHECK_H__ #include "keystructs.h" -int check_packet_sighash(struct openpgp_publickey *key, +onak_status_t calculate_packet_sighash(struct openpgp_publickey *key, struct openpgp_packet *packet, - struct openpgp_packet *sig); + struct openpgp_packet *sig, + uint8_t *hashtype, + uint8_t *hash, + uint8_t **sighash); + +/** + * onak_check_hash_sig - check the signature on a hash is valid + * @sigkey: The public key that made the signature + * @sig: The signature packet + * @hash: Hash digest the signature is over + * @hashtype: Type of hash (OPENPGP_HASH_*) + */ +onak_status_t onak_check_hash_sig(struct openpgp_publickey *sigkey, + struct openpgp_packet *sig, + uint8_t *hash, + uint8_t hashtype); #endif /* __SIGCHECK_H__ */