File: pymodule-mac.h

package info (click to toggle)
ntpsec 1.2.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,360 kB
  • sloc: ansic: 62,698; python: 32,477; sh: 1,575; yacc: 1,331; makefile: 193; javascript: 138
file content (27 lines) | stat: -rw-r--r-- 634 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * pymodule-mac.h -- hack for moving routines that call OpenSSL
 * out of pymodule.c because of shadow warnings for freefunc
 *
 * Copyright the NTPsec project contributors
 * SPDX-License-Identifier: BSD-2-Clause
 *
 */

#ifndef GUARD_PYMODULE_MAC_H
#define GUARD_PYMODULE_MAC_H

#include <stdbool.h>
#include <stddef.h>

/* can't include Python.h or anything from openssl */

#define MAX_MAC_LENGTH 64

int do_checkname(const char *name);

void do_mac(char *name,
        uint8_t *data, size_t datalen,
        uint8_t *key, size_t keylen,
        uint8_t mac[MAX_MAC_LENGTH], size_t *maclen);

#endif /* GUARD_PYMODULE_MAC_H */