Logo
Home page Net-SNMP

Archive Search:

Require all words?

Site Search:
Google
Main Page | Modules | Data Structures | File List | Data Fields | Related Pages | Examples

keytools.h

00001 /*
00002  * keytools.h
00003  */
00004 
00005 #ifndef _KEYTOOLS_H
00006 #define _KEYTOOLS_H
00007 
00008 #ifdef __cplusplus
00009 extern          "C" {
00010 #endif
00011 
00012 
00013 #define USM_LENGTH_EXPANDED_PASSPHRASE  (1024 * 1024)   /* 1Meg. */
00014 
00015 #define USM_LENGTH_KU_HASHBLOCK         64      /* In bytes. */
00016 
00017 #define USM_LENGTH_P_MIN                8       /* In characters. */
00018     /*
00019      * Recommended practice given in <draft-ietf-snmpv3-usm-v2-02.txt>,
00020      * * Section 11.2 "Defining Users".  Move into cmdline app argument
00021      * * parsing, and out of the internal routine?  XXX
00022      */
00023 
00024     /*
00025      * Prototypes.h
00026      */
00027     int             generate_Ku(const oid * hashtype, u_int hashtype_len,
00028                                 u_char * P, size_t pplen,
00029                                 u_char * Ku, size_t * kulen);
00030 
00031     int             generate_kul(const oid * hashtype, u_int hashtype_len,
00032                                  u_char * engineID, size_t engineID_len,
00033                                  u_char * Ku, size_t ku_len,
00034                                  u_char * Kul, size_t * kul_len);
00035 
00036     int             encode_keychange(const oid * hashtype,
00037                                      u_int hashtype_len, u_char * oldkey,
00038                                      size_t oldkey_len, u_char * newkey,
00039                                      size_t newkey_len, u_char * kcstring,
00040                                      size_t * kcstring_len);
00041 
00042     int             decode_keychange(const oid * hashtype,
00043                                      u_int hashtype_len, u_char * oldkey,
00044                                      size_t oldkey_len, u_char * kcstring,
00045                                      size_t kcstring_len, u_char * newkey,
00046                                      size_t * newkey_len);
00047 
00048 
00049     /*
00050      * All functions devolve to the following block if we can't do cryptography
00051      */
00052 #define _KEYTOOLS_NOT_AVAILABLE                 \
00053 {                                               \
00054         return SNMPERR_KT_NOT_AVAILABLE;        \
00055 }
00056 
00057 #ifdef __cplusplus
00058 }
00059 #endif
00060 #endif                          /* _KEYTOOLS_H */

Generated on Fri Dec 30 13:47:45 2005 for net-snmp by  doxygen 1.3.9.1

Valid CSS!


Last modified: Thursday, 01-Mar-2007 16:20:02 PST
For questions regarding web content and site functionality, please write to the net-snmp-users mail list.