#include <string.h>
#include <unistd.h>
#include <signal.h>
#include "gwlib/gwlib.h"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
◆ EVP_MAX_MD_SIZE
#define EVP_MAX_MD_SIZE 1 |
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 85 of file test_hmac.c.
References debug(), EVP_MAX_MD_SIZE, filename, get_and_set_debugs(), gwlib_init(), gwlib_shutdown(), octstr_binary_to_hex(), octstr_create, octstr_create_from_data, octstr_destroy(), octstr_dump, octstr_get_cstr, octstr_len(), octstr_read_file(), panic, and warning().
99 panic(0,
"Syntax: %s <key> <file>\n", argv[0]);
106 panic(0,
"Cannot read file.");
112 #if OPENSSL_VERSION_NUMBER < 0x10100000L 115 ctx = HMAC_CTX_new();
120 #if OPENSSL_VERSION_NUMBER < 0x10100000L 129 warning(0,
"No SSL support. Can't calculate HMAC value.");
135 debug(
"",0,
"HMAC of file `%s' and key `%s' is:",
#define octstr_get_cstr(ostr)
void octstr_binary_to_hex(Octstr *ostr, int uppercase)
#define octstr_dump(ostr, level,...)
void warning(int err, const char *fmt,...)
void octstr_destroy(Octstr *ostr)
char filename[FILENAME_MAX+1]
#define octstr_create(cstr)
Octstr * octstr_read_file(const char *filename)
long octstr_len(const Octstr *ostr)
void debug(const char *place, int err, const char *fmt,...)
void gwlib_shutdown(void)
int get_and_set_debugs(int argc, char **argv, int(*find_own)(int index, int argc, char **argv))
#define octstr_create_from_data(data, len)