diff options
author | Cy Schubert <cy@FreeBSD.org> | 2024-05-10 15:15:56 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2024-05-26 22:55:52 +0000 |
commit | 1f833b3fc9968c3dd7ed79ccf0525ebf16c891ad (patch) | |
tree | 85801af20e3b694584668aeb39ecec75ee71f72c /sntp/crypto.h | |
parent | ab1f1aa8333369a83ff284848fc3fc2e52d5f29f (diff) |
Diffstat (limited to 'sntp/crypto.h')
-rw-r--r-- | sntp/crypto.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sntp/crypto.h b/sntp/crypto.h index 4e75df20a9a3..4afe865e53e5 100644 --- a/sntp/crypto.h +++ b/sntp/crypto.h @@ -17,18 +17,19 @@ struct key { struct key * next; - int key_id; - int key_len; + keyid_t key_id; + size_t key_len; int typei; char typen[20]; char key_seq[64]; }; extern int auth_init(const char *keyfile, struct key **keys); -extern void get_key(int key_id, struct key **d_key); -extern int make_mac(const void *pkt_data, int pkt_size, int mac_size, - const struct key *cmp_key, void *digest); -extern int auth_md5(const void *pkt_data, int pkt_size, int mac_size, - const struct key *cmp_key); +extern void get_key(keyid_t key_id, struct key **d_key); +extern size_t make_mac(const void *pkt_data, size_t pkt_len, + const struct key *cmp_key, void *digest, + size_t dig_sz); +extern int auth_md5(const void *pkt_data, size_t pkt_len, + size_t dig_len, const struct key *cmp_key); #endif |