/usr/include/net-snmp/library/keytools.h is in libsnmp-dev 5.4.3~dfsg-2.4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | /*
* keytools.h
*/
#ifndef _KEYTOOLS_H
#define _KEYTOOLS_H
#ifdef __cplusplus
extern "C" {
#endif
#define USM_LENGTH_EXPANDED_PASSPHRASE (1024 * 1024) /* 1Meg. */
#define USM_LENGTH_KU_HASHBLOCK 64 /* In bytes. */
#define USM_LENGTH_P_MIN 8 /* In characters. */
/*
* Recommended practice given in <draft-ietf-snmpv3-usm-v2-02.txt>,
* * Section 11.2 "Defining Users". Move into cmdline app argument
* * parsing, and out of the internal routine? XXX
*/
/*
* Prototypes.h
*/
int generate_Ku(const oid * hashtype, u_int hashtype_len,
u_char * P, size_t pplen,
u_char * Ku, size_t * kulen);
int generate_kul(const oid * hashtype, u_int hashtype_len,
u_char * engineID, size_t engineID_len,
u_char * Ku, size_t ku_len,
u_char * Kul, size_t * kul_len);
int encode_keychange(const oid * hashtype,
u_int hashtype_len, u_char * oldkey,
size_t oldkey_len, u_char * newkey,
size_t newkey_len, u_char * kcstring,
size_t * kcstring_len);
int decode_keychange(const oid * hashtype,
u_int hashtype_len, u_char * oldkey,
size_t oldkey_len, u_char * kcstring,
size_t kcstring_len, u_char * newkey,
size_t * newkey_len);
/*
* All functions devolve to the following block if we can't do cryptography
*/
#define _KEYTOOLS_NOT_AVAILABLE \
{ \
return SNMPERR_KT_NOT_AVAILABLE; \
}
#ifdef __cplusplus
}
#endif
#endif /* _KEYTOOLS_H */
|